Arithmetic · real student question

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

Question

Find the largest six-digit number that is divisible by 1515 and whose digits read the same forwards and backwards (a palindrome).

Step-by-step solution

  1. Write down the shape of a six-digit palindrome. Any such number looks like

    abccba\overline{abccba}

    with digits a,b,ca,b,c and a0a\neq 0. Three free digits instead of six — that alone cuts the search from 900,000900{,}000 numbers to 900900.

  2. Split the divisibility condition. Since 15=3×515=3\times 5 and gcd(3,5)=1\gcd(3,5)=1, a number is divisible by 1515 exactly when it is divisible by both 33 and 55. Handling the two prime factors separately is what makes the problem doable by hand.

  3. Use the rule for 5 to pin down the first digit. Divisibility by 55 requires the last digit to be 00 or 55. In a palindrome the last digit equals the first, and a six-digit number cannot start with 00, so

    a=5a=5

    and the number has the form 5bccb5\overline{5bccb5}. Every candidate therefore starts in the 55-hundred-thousands — no palindrome multiple of 1515 can begin with 66 or higher.

  4. Apply the rule for 3 to the digit sum. The digits sum to

    5+b+c+c+b+5=10+2b+2c5+b+c+c+b+5=10+2b+2c

    This must be divisible by 33. Working modulo 33, 10+2b+2c1+2(b+c)010+2b+2c\equiv 1+2(b+c)\equiv 0, which forces

    b+c1(mod3)b+c\equiv 1 \pmod 3

  5. Maximise the digits from the left. The leading digits weigh most, so try b=9b=9 first. Then cc must satisfy 9+c1(mod3)9+c\equiv 1\pmod 3, i.e. c1(mod3)c\equiv 1\pmod 3, so c{1,4,7}c\in\{1,4,7\} and the largest is c=7c=7. This is also why the tempting 599995599995 fails: its digit sum is 4646, not a multiple of 33.

  6. Assemble and verify. With a=5a=5, b=9b=9, c=7c=7 the number is

    597795597795

    Check: it ends in 55, so it is divisible by 55; its digits sum to 5+9+7+7+9+5=425+9+7+7+9+5=42, divisible by 33; and indeed

    597795=15×39853597795=15\times 39853

    Since b=9b=9 is the largest possible second digit and c=7c=7 the largest admissible third digit, no larger six-digit palindrome works.

Answer

597795=15×39853597795 = 15 \times 39853

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