CEMC Banner

Problem of the Week
Problem D and Solution
Sum New Year!

Problem

The positive integers are written consecutively in rows, with seven integers in each row. That is, the first row contains the integers \(1\), \(2\), \(3\), \(4\), \(5\), \(6\), and \(7\). The second row contains the integers \(8\), \(9\), \(10\), \(11\), \(12\), \(13\), and \(14\). The third row contains the integers \(15\), \(16\), \(17\), \(18\), \(19\), \(20\), and \(21\), and so on.

The row sum of a row is the sum of the integers in the row. For example, the row sum of the first row is \(1+2+3+4+5+6+7=28\).

Determine the numbers in the row that has a row sum closest to \(2024\).

Solution

Solution 1

The last number in row \(1\) is \(7\), the last number in row \(2\) is \(14\), and the last number in row \(3\) is \(21\). Observe that the last number in each row is a multiple of \(7\). Furthermore, the last number in row \(n\) is \(7n\). Since the last number in row \(n\) is \(7n\), the six preceding numbers in the row are \(7n-1\), \(7n-2\), \(7n-3\), \(7n-4\), \(7n-5\), and \(7n-6\).

The sum of the numbers in row \(n\) is \[(7n-6)+(7n-5)+(7n-4)+(7n-3)+(7n-2)+(7n-1)+7n= 49n-21\] We want to find the integer value of \(n\) so that \(49n-21\) is as close to \(2024\) as possible.

\[\begin{aligned} 49n-21&=2024\\ 49n&=2045\\ n&\approx 41.7 \end{aligned}\]

The closest integer to \(41.7\) is \(42\). The row sum of row \(42\) is \(49n-21=49(42)-21=2037\). The last number in row \(42\) is \(7\times 42=294\). The seven integers in the row \(42\) are \(288\), \(289\), \(290\), \(291\), \(292\), \(293\), and \(294\). Row \(41\) contains the integers \(281\), \(282\), \(283\), \(284\), \(285\), \(286\), and \(287\), and has row sum equal to \(1988\). This row sum is farther from \(2024\) than \(2037\), the row sum of row \(42\).

Therefore, row \(42\) has the row sum closest to \(2024\). This row contains the integers \(288\), \(289\), \(290\), \(291\), \(292\), \(293\), and \(294\).

The second solution approaches the problem by establishing a linear relationship.

Solution 2

Let \(x\) represent the row number and \(y\) represent the sum of the integers in the row. Observe that the seventh integer in any row is a multiple of \(7\). In fact, the seventh integer in any row is \(7\) times the row number or \(7x\). The following table of values summarizes the row sums for the first three rows.

Row Number (\(x\)) Row Sum (\(y\))
\(1\) \(28\)
\(2\) \(77\)
\(3\) \(126\)

Notice that the \(y\) values increase by \(49\) as the \(x\) values increase by \(1\). We will verify that this is true. In Solution \(1\) we saw that the sum of the numbers in row \(n\) is \(49n-21\). Therefore, the sum of the numbers in row \(x\) is \(49x - 21\) and the sum of the numbers in row \((x+1)\) is \(49(x+1) - 21 = (49x -21) + 49\). Thus, the \(y\) values increase by \(49\) as the \(x\) values increase by \(1\). This tells us that the sum of the fourth row should be \(126+49=175\). We can verify this by adding \(22+23+24+25+26+27+28\), the numbers in the fourth row. The sum is indeed \(175\).

As the values of \(x\) increase by \(1\), the values of \(y\) increase by \(49\). The relation is linear. The slope is \(\dfrac{\Delta y}{\Delta x}=\dfrac{49}{1}=49\). Substituting \(x=1\), \(y=28\), \(m=49\) into the equation \(y=mx+b\), we get \[\begin{aligned} 28&=49(1)+b\\ -21&=b \end{aligned}\]

Thus, the equation of the line which passes through the points in the relation is \(y=49x-21\). Note that \(x\) and \(y\) are positive integers. We want to find the value of \(x\), the row number, so that the value of \(y\), the row sum, is as close to \(2024\) as possible. \[\begin{aligned} 49x-21&=2024\\ 49x&=2045\\ x&\approx 41.7 \end{aligned}\] The closest integer to \(41.7\) is \(42\). When \(x=42\), the row sum is \(y=49(42)-21=2037\). The row sum when \(x=41\) is \(y=49(41)-21=1988\). The row sum \(2037\) is closer to \(2024\) than the row sum \(1988\).

Therefore, row \(42\) has the row sum closest to \(2024\). The seventh number in row \(42\) is \(7\times 42=294\). Thus, this row contains the integers \(288\), \(289\), \(290\), \(291\), \(292\), \(293\), and \(294\).