cs2209
s(n) is a n-digit number formed by attaching the first n perfect squares, in order, into one integer. For example, s(1) = 1, s(2) = 14, s(3) = 149, s(4) = 14916, s(5) = 1491625, etc. How many digits are in s(99)?
A. 350
B. 353
C. 354
D. 356
E. 357
VERITAS PREP OFFICIAL SOLUTION:Since this exponent-based problem deals with massive numbers, the Guiding Principles of Exponents urge you to look for a pattern. We know that the first three squares (1, 4, 9) have one digit each. We know that the next six squares (16, 25, 36, 49, 64, and 81) have two digits each. Now we need to see when our squares have three digits and four digits, respectively.
We know that 10^2 = 100, which is the smallest number that has three digits. We know that 30^2 = 900, so we're still at three digits. 31^2 = 961, so that works too, but 32^2 will be put us over 1000. Hence the squares from 10 to 31 all have THREE digits.
100^2 = 10,000, which is the smallest number to have five digits, so 99^2 must have four. Hence all the squares from 32 to 99 must have four digits.
Now we just need to add all this up.
1^2 -> 3^2 have one digit each, so 3*1 = 3 total digits
4^2 -> 9^2 have two digits each, so 6*2 = 12 total digits
10^2 -> 31^2 have three digits each, so 22*3 = 66 total digits
32^2 -> 99^2 have four digits each, so 68*4 = 272 total digits
272 + 66 + 12 + 3 = 353, so that's our answer.