# 1996 AHSME Problems/Problem 24

## Problem

The sequence $1, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2,\ldots$ consists of $1$’s separated by blocks of $2$’s with $n$ $2$’s in the $n^{th}$ block. The sum of the first $1234$ terms of this sequence is $\text{(A)}\ 1996\qquad\text{(B)}\ 2419\qquad\text{(C)}\ 2429\qquad\text{(D)}\ 2439\qquad\text{(E)}\ 2449$

## Solution

The sum of the first $1$ numbers is $1$

The sum of the next $2$ numbers is $2 + 1$

The sum of the next $3$ numbers is $2 + 2 + 1$

In general, we can write "the sum of the next $n$ numbers is $1 + 2(n-1)$", where the word "next" follows the pattern established above.

Thus, we first want to find what triangular numbers $1234$ is between. By plugging in various values of $n$ into $f(n) = \frac{n(n+1)}{2}$, we find: $f(50) = 1275$ $f(49) = 1225$

Thus, we want to add up all those sums from "next $1$ number" to the "next $49$ numbers", which will give us all the numbers up to and including the $1225^{th}$ number. Then, we can manually tack on the remaining $2$s to hit $1234$.

We want to find: $\sum_{n=1}^{49} 1 + 2(n-1)$ $\sum_{n=1}^{49} 2n - 1$ $\sum_{n=1}^{49} 2n - \sum_{n=1}^{49} 1$ $2 \sum_{n=1}^{49} n - 49$ $2\cdot \frac{49\cdot 50}{2} - 49$ $49^2$ $2401$

Thus, the sum of the first $1225$ terms is $2401$. We have to add $9$ more $2$s to get to the $1234^{th}$ term, which gives us $2419$, or option $\boxed{B}$.

Note: If you notice that the above sums form $1 + 3 + 5 + 7... + (2n-1) = n^2$, the fact that $49^2$ appears at the end should come as no surprise.

## Solution 2 (Alcumus)

The $k$th appearance of 1 is at position $1 + 2 + \dots + k = \frac{k(k + 1)}{2}$. Then there are $k$ 1's and $\frac{k(k + 1)}{2} - k = \frac{k(k - 1)}{2}$ 2's among the first $\frac{k(k + 1)}{2}$ numbers, so the sum of these $\frac{k(k + 1)}{2}$ terms is $k + k(k - 1) = k^2$.

When $k = 49$, $\frac{k(k + 1)}{2} = 1225$, and when $k = 50$, $\frac{k(k + 1)}{2} = 1275$.

The sum of the first 1225 terms is $49^2 = 2401$. The numbers in positions 1226 through 1234 are all 2's, so their sum is $(1234 - 1226 + 1) \cdot 2 = 18$. Therefore, the sum of the first 1234 terms is $2401 + 18 = \boxed{2419}$.

The problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions. 