Maths Olympiad Prep

Library / /359 of 860

Algebra Difficulty 5.1 AIME, harder Find the answer

Let AA denote the set of all integers nn such that 1n100001 \leq n \leq 10000, and moreover the sum of the decimal digits of nn is 2. Find the sum of the squares of the elements of AA.

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Solution

From the given conditions, we want to calculate i=03j=i3(10i+10j)2\sum_{i=0}^{3} \sum_{j=i}^{3}\left(10^{i}+10^{j}\right)^{2} By observing the formula, we notice that each term is an exponent of 10.10610.10^{6} shows up 7 times, 10510^{5} shows up 2 times, 10410^{4} shows up 9 times, 10310^{3} shows up 4 times, 10210^{2} shows up 9 times, 10 shows 2 times, 1 shows up 7 times. Thus the answer is 7294927.

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

Source: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.