CEMC Banner

Problem of the Week
Problem D and Solution
Difference Detective

Problem

The non-negative difference between two numbers \(a\) and \(b\) is \(b-a\) or \(a-b\), whichever is greater than or equal to \(0\). For example, the non-negative difference between \(24\) and \(64\) is \(40\).

Consider the sequence with first term \(74\), second term \(60\), and each term after equal to the non-negative difference between the previous two terms. That is, the third term is \(74-60=14\), the fourth term is \(60-14=46\), and the fifth term is \(46-14 = 32\). So, the first five terms in the sequence are: \[74, 60, 14, 46, 32\]

Determine the sum of the first \(1306\) terms in the sequence.

Solution

We start by generating more terms in the sequence in an attempt to find a pattern.

Using the rule for creating the sequence, we determine that the first \(23\) terms are

\(74\), \(60\), \(14\), \(46\), \(32\), \(14\), \(18\), \(4\), \(14\), \(10\), \(4\), \(6\), \(2\), \(4\), \(2\), \(2\), \(0\), \(2\), \(2\), \(0\), \(2\), \(2\), \(0\)

The first \(14\) terms in the sequence have no apparent pattern. Afterwards, the terms repeat \(2\), \(2\), \(0\). Since each term is determined by the previous two, this sequence of \(2\), \(2\), \(0\) will repeat indefinitely.

Thus, the first \(14\) terms in the sequence are followed by \(n\) groups of \(2\), \(2\), \(0\). What is the value of \(n\)? We want a total of \(1306\) terms. If we remove the first \(14\) terms, we require \(1306-14=1292\) more terms. If we divide \(1292\) by \(3\) we are able to determine how many complete sequences of \(2\), \(2\), \(0\) are needed. Since \(1292\div 3=430\frac{2}{3}\), there will be \(430\) complete sequences of \(2\), \(2\), \(0\) followed by \(2\), \(2\).

The required sum is the sum of the first \(14\) terms plus \(430\times (2+2+0) + 2 +2\). The sum of the first \(14\) terms is \(302\). Thus, the sum of the first \(1306\) terms in the sequence is \(302+430\times 4 +4=2026\).

Therefore, the sum of the first \(1306\) terms in the sequence is \(2026\).