# 2008 iTest Problems/Problem 60

## Problem

Consider the Harmonic Table $$\begin{array}{c@{\hspace{15pt}}c@{\hspace{15pt}}c@{\hspace{15pt}}c@{\hspace{15pt}}c@{\hspace{15pt}}c@{\hspace{15pt}}c}&&&1&&&\\&&\tfrac12&&\tfrac12&&\\&\tfrac13&&\tfrac16&&\tfrac13&\\\tfrac14&&\tfrac1{12}&&\tfrac1{12}&&\tfrac14\\&&&\vdots&&&\end{array}$$

where $a_{n,1}=1/n$ and $a_{n,k+1}=a_{n-1,k}-a_{n,k}$.

Find the remainder when the sum of the reciprocals of the $2007$ terms on the $2007^\text{th}$ row gets divided by $2008$.

## Solution

Notice that all the denominators have a common factor. If we factor the GCD of the few rows, the denominators seem to replicate the terms of Pascal's Triangle.

We claim that $a_{n,k} = \frac{1}{n \cdot \binom{n-1}{k-1}}.$ Plugging $k = 1$ results in $a_{n,1} = \frac{1}{n \cdot \binom{n-1}{0}} = \frac{1}{n}.$ Now we need to show that $a_{n,k+1}=a_{n-1,k}-a_{n,k}$ if $a_{n,k} = \frac{1}{n \cdot \binom{n-1}{k-1}}.$

If $a_{n,k} = \frac{1}{n \cdot \binom{n-1}{k-1}},$ then $a_{n-1,k} = \frac{1}{(n-1) \cdot \binom{n-2}{k-1}}.$ That means \begin{align*} a_{n-1,k} - a_{n,k} &= \frac{1}{(n-1) \cdot \binom{n-2}{k-1}} - \frac{1}{n \cdot \binom{n-1}{k-1}} \\ &= \frac{(n-k-1)!(k-1)!}{(n-1)(n-2)!} - \frac{(n-k)!(k-1)!}{n(n-1)!} \\ &= \frac{n(n-k-1)!(k-1)!}{n!} - \frac{(n-k)!(k-1)!}{n!} \\ &= \frac{(n-k-1)!(k-1)!(n - n + k)}{n!} \\ &= \frac{(n-k-1)!k!}{n(n-1)!} \\ &= \frac{1}{n \binom{n-1}{k}} \\ &= a_{n,k+1}. \end{align*}

Thus, $a_{n,k} = \frac{1}{n \cdot \binom{n-1}{k-1}}.$ We can use this to find the sum of the $2007$ terms in the $2007^\text{th}$ row. Let $S$ be the wanted sum. \begin{align*} S &= \sum_{i=1}^{2007} \frac{1}{a_{2007,i}} \\ &= \sum_{i=1}^{2007} 2007 \cdot \binom{2006}{i-1} \\ &= 2007 \cdot 2^{2006} \end{align*}

Finally, to find the remainder when $S$ is divided by $2008,$ we need to use modular arithmetic. First, note that $2008 = 8 \cdot 251,$ so we can use the remainder when $S$ is divided by $8$ and $251$ to help us find the remainder when $S$ is divided by $2008$.

The remainder when $S$ is divided by $8$ is $0$ because the exponent of $2$ in $S$ is way over $8.$ By Fermat's Little Theorem, we know that $2^{251} \equiv 2 \pmod{251},$ and since $2$ is relatively prime to $251,$ $2^{250} \equiv 1 \pmod{251}.$ Thus, $2007 \cdot 2^{2006} \equiv -1 \cdot (2^{250})^8 \cdot 2^6 \equiv -64 \equiv 187 \pmod{251},$ so the remainder when $S$ is divided by $251$ is $187.$

From the two pieces of information, we find that the remainder when $S$ is divided by $2008$ is $\boxed{1944}.$