Example 8 Let an be the number of natural numbers N such that the sum of the digits of N is n and each digit can only be 1, 3, or 4. Prove that a2n is a perfect square. (1991 National High School League Question, see Example 5 in Chapter 10)
This one wants a proof. Work it on paper, read the official solution, then mark
yourself honestly — the ladder only means something if the record is true.
Official solution
Let N=x1x2⋯xk, where x1,x2,⋯,xk∈{1,3,4}, and x1+x2+⋯+xk=n. Assuming n>4, when x1 is removed, then when x1 takes 1,3,4 respectively, x2+x3+⋯+xk equals n−1,n−3,n−4, hence when n>4, an=an−1+an−3+an−4, and it is easy to see that a1=1,a2=1,a3=2,a4=4. (1) is a 4th-order difference equation, whose characteristic equation x4−x3−x−1=0 has four roots ±i,21(1±5). Therefore, the solution to (1) is an=C1in+C2(−i)n+C3(21+5)n+C4(21−5)n, using the initial values (2) we get an=102−i⋅in+102+i(−i)n+51(21+5)n+2+51(21−5)n+2, thus ⎩⎨⎧a2k=51[(21+5)k+1−(21−5)k+1]2;a2k+1=51[(−1)k+(21+5)2k+3+(21−5)2k+3].
It is not difficult to verify that a2k⋅a2k+2=a2k+12. Finally, we prove the conclusion of this problem by mathematical induction. Clearly, the conclusion is correct when n=1. Suppose a2n is a perfect square, then by (3) we know a2n+2 is a perfect square, therefore the conclusion holds for any natural number n.
Source: NuminaMath-1.5,
licensed Apache-2.0.
Statement and solution reproduced as published; topic, difficulty and ordering added
by this site.