Skip to main content

AMC 12 Mock Exam 5 Problem 25

Problem 25 of 25

A positive integer is a palindrome if its base-ten digits read the same forward and backward; for example, 40044004 and 1232112321 are palindromes. How many palindromes nn with n<107n<10^7 are divisible by 10011001?

Answer choices

Show solution

Solution

The key fact is 103=1001−1≡−1(mod1001)10^3=1001-1\equiv-1\pmod{1001}, so 104≡−1010^4\equiv-10, 105≡−10010^5\equiv-100, and 106≡110^6\equiv1. A palindrome divisible by 10011001 is at least 10011001, so it has 44 to 77 digits. Below, a∈{1,…,9}a\in\{1,\dots,9\} and the other letters are digits.

4 digits, abba‾=a(103+1)+b(102+10)≡110b\overline{abba}=a(10^3+1)+b(10^2+10)\equiv110b. Since gcd⁡(110,1001)=11\gcd(110,1001)=11, we need 91∣b91\mid b, so b=0b=0: 99 palindromes (1001,2002,…,90091001,2002,\dots,9009).

5 digits, abcba‾=a(104+1)+b(103+10)+100c≡−9a+9b+100c\overline{abcba}=a(10^4+1)+b(10^3+10)+100c\equiv-9a+9b+100c. This lies between −81-81 and 981981, so it must equal 00: 100c=9(a−b)100c=9(a-b). Then 9∣c9\mid c; c=9c=9 would need a−b=100a-b=100, so c=0c=0 and b=ab=a: 99 palindromes.

6 digits, abccba‾≡a(−100+1)+b(−10+10)+c(−1+100)=99(c−a)\overline{abccba}\equiv a(-100+1)+b(-10+10)+c(-1+100)=99(c-a). Since gcd⁡(99,1001)=11\gcd(99,1001)=11, we need 91∣c−a91\mid c-a, so c=ac=a, with bb free: 9⋅10=909\cdot10=90 palindromes.

7 digits, abcdcba‾=a(106+1)+b(105+10)+c(104+102)+d⋅103≡2a−90b+90c−d\overline{abcdcba}=a(10^6+1)+b(10^5+10)+c(10^4+10^2)+d\cdot10^3\equiv2a-90b+90c-d. This lies between −817-817 and 828828, so it must equal 00: 2a−d=90(b−c)2a-d=90(b-c). Since ∣2a−d∣≤18<90|2a-d|\le18<90, we need b=cb=c and d=2ad=2a, so a∈{1,2,3,4}a\in\{1,2,3,4\} and bb is free: 4⋅10=404\cdot10=40 palindromes.

The total is 9+9+90+40=1489+9+90+40=\boxed{148}.

Tagged: palindromes and divisibility by 1001 (digit structure, modular bounding)