Arithmetic · real student question

Find the largest six-digit palindrome that is divisible by 45.

Question

Find the largest six-digit palindrome (a number that reads the same forwards and backwards) that is divisible by 4545.

Step-by-step solution

  1. Write the general six-digit palindrome. It has the digit pattern abccbaabccba, so

    N=abccba,a0N=\overline{abccba},\qquad a\neq 0

    Only aa, bb, cc are free — three digits, not six.

  2. Split 45 into coprime factors. Since 45=9×545=9\times 5 and gcd(9,5)=1\gcd(9,5)=1, the number must be divisible by 99 and by 55. These give two independent digit conditions.

  3. Apply divisibility by 5 to pin down aa. The last digit must be 00 or 55. In a palindrome the last digit equals the first, and the first digit of a six-digit number cannot be 00. Therefore

    a=5,N=5bccb5a=5,\qquad N=\overline{5bcc b5}

  4. Apply divisibility by 9 to constrain b+cb+c. The digit sum is

    5+b+c+c+b+5=10+2b+2c=2(b+c+5)5+b+c+c+b+5=10+2b+2c=2(b+c+5)

    This must be a multiple of 99. Since gcd(2,9)=1\gcd(2,9)=1, the factor of 22 can be dropped:

    b+c+50(mod9)  b+c4(mod9)b+c+5\equiv 0\pmod 9\ \Longrightarrow\ b+c\equiv 4\pmod 9

    so b+c=4b+c=4 or b+c=13b+c=13 (the only values reachable with two digits).

  5. Maximise place value from the left. With aa fixed at 55, the next most significant free digit is bb, so take b=9b=9. Then cequiv49equiv4pmod9c\\equiv 4-9\\equiv 4\\pmod 9 requires b+c=13b+c=13, giving c=4c=4:

    N=594495N=594495

  6. Verify both divisibility conditions. Digit sum: 5+9+4+4+9+5=365+9+4+4+9+5=36, and 36=4×936=4\times 9 checkmark\\checkmark. Last digit 55 checkmark\\checkmark. Directly:

    594495÷45=13211594495\div 45=13211\quad\checkmark

    A scan downward through all six-digit palindromes confirms nothing larger works, so 594495594495 is the answer.

Answer

594495=45×13211594495=45\times 13211

Need to solve a different problem like this? Open the solver →