Skip to main content

AMC 12 Mock Exam 1 Problem 19

Problem 19 of 25

For a positive integer mm, let S(m)S(m) denote the sum of the digits of mm in base ten. For how many positive integers n<1000n<1000 is S(2n)=S(n)S(2n)=S(n)?

Answer choices

Show solution

Solution

Write nn with three digits a,b,ca,b,c, allowing leading zeros (so n=0n=0 must be excluded at the end). When nn is doubled digit by digit, a digit dd together with an incoming carry of 00 or 11 produces a carry out exactly when 2d+(carry in)≥102d+(\text{carry in})\ge10, i.e., exactly when d≥5d\ge5 (because 2d+1≥102d+1\ge10 iff d≥5d\ge5 for integers). Each carry replaces a 1010 in one place by a 11 in the next, lowering the digit sum by 99. Therefore S(2n)=2S(n)−9k,S(2n)=2S(n)-9k, where kk is the number of digits of nn that are at least 55. So S(2n)=S(n)S(2n)=S(n) iff S(n)=9kS(n)=9k.

k=0k=0: S(n)=0S(n)=0 forces n=0n=0, excluded.

k=1k=1: one digit b∈{5,…,9}b\in\{5,\dots,9\} in any of 33 positions, the other two digits in {0,…,4}\{0,\dots,4\} with sum 9−b∈{4,3,2,1,0}9-b\in\{4,3,2,1,0\}; there are 5,4,3,2,15,4,3,2,1 such pairs respectively, i.e., 1515 in all. Count: 3⋅15=453\cdot15=45.

k=2k=2: one digit s∈{0,…,4}s\in\{0,\dots,4\} in any of 33 positions, and two digits in {5,…,9}\{5,\dots,9\} with sum 18−s∈{18,17,16,15,14}18-s\in\{18,17,16,15,14\}; there are 1,2,3,4,51,2,3,4,5 ordered pairs respectively, i.e., 1515 in all. Count: 3⋅15=453\cdot15=45.

k=3k=3: S(n)=27S(n)=27 forces n=999n=999: 11 number.

The total is 45+45+1=9145+45+1=\boxed{91}.

Tagged: digit sums and carries