Learn / Library / Brainteasers
Palindromes and elevens
A palindrome reads the same forwards and backwards. How many palindromes with digits and no leading zero, such as , are divisible by ?
Checking an answer needs JavaScript. The hint and the solution open without it.
Hint
Write the palindrome as and reduce its value modulo to a condition on , and .
Solution
- The palindrome equals , and modulo this is .
- For each of the choices of the digits and , exactly one residue of modulo makes the sum , and it is a usable digit unless that residue is .
- The residue needs , that is modulo ; for this gives , which is not a digit, while each of the other values of gives exactly one digit .
- So pairs are unusable and the count is .
Answer: