Maths Olympiad Prep

Library / HMMT February /838 of 1302

HMMT February

Combinatorics Difficulty 5.4 AIME, harder Prove it United States

Problem:

Define a sequence ai,ja_{i, j} of integers such that a1,n=nna_{1, n} = n^{n} for n≥1n \geq 1 and ai,j=ai−1,j+ai−1,j+1a_{i, j} = a_{i-1, j} + a_{i-1, j+1} for all i,j≥1i, j \geq 1. Find the last (decimal) digit of a128,1a_{128,1}.

Solution

Solution:

By applying the recursion multiple times, we find that a1,1=1a_{1,1} = 1, a2,n=nn+(n+1)n+1a_{2, n} = n^{n} + (n+1)^{n+1}, and a3,n=nn+2(n+1)n+1+(n+2)n+2a_{3, n} = n^{n} + 2(n+1)^{n+1} + (n+2)^{n+2}. At this point, we can conjecture and prove by induction that
am,n=∑k=0m−1(m−1k)(n+k)n+k=∑k≥0(m−1k)(n+k)n+k a_{m, n} = \sum_{k=0}^{m-1} \binom{m-1}{k} (n+k)^{n+k} = \sum_{k \geq 0} \binom{m-1}{k} (n+k)^{n+k}
(The second expression is convenient for dealing with boundary cases. The induction relies on (m0)=(m−10)\binom{m}{0} = \binom{m-1}{0} on the k=0k=0 boundary, as well as (mk)=(m−1k)+(m−1k−1)\binom{m}{k} = \binom{m-1}{k} + \binom{m-1}{k-1} for k≥1k \geq 1.) We fix m=128m = 128. Note that (127k)≡1(mod2)\binom{127}{k} \equiv 1 \pmod{2} for all 1≤k≤1271 \leq k \leq 127 and (127k)≡0(mod5)\binom{127}{k} \equiv 0 \pmod{5} for 3≤k≤1243 \leq k \leq 124, by Lucas' theorem on binomial coefficients. Therefore, we find that
a128,1=∑k=0127(127k)(k+1)k+1≡∑k=0127(k+1)k+1≡0 a_{128,1} = \sum_{k=0}^{127} \binom{127}{k} (k+1)^{k+1} \equiv \sum_{k=0}^{127} (k+1)^{k+1} \equiv 0
and
a128,1≡∑k∈[0,2]∪[125,127](127k)(k+1)k+1≡4( mod 5). a_{128,1} \equiv \sum_{k \in [0,2] \cup [125,127]} \binom{127}{k} (k+1)^{k+1} \equiv 4 \quad (\bmod 5).
Therefore, a128,1≡4(mod10)a_{128,1} \equiv 4 \pmod{10}.

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.