To Wit: 2/2

Today is 2/2/22, so here’s a little problem about palindromes. For each set of integers <= 1[0…]1 in base 10, find the cumulative count of palindromes exactly divisible by 1, 2, 3, 4, 5, 6, 7, 8 and 9. For example, 2, 4, 6 and 8 are the 4 palindromes exactly divisible by 2 that are less than 11, so countdiv(2) = 4 for pal <= 11; 3, 6 and 9 are the 3 palindromes exactly divisible by 3, so countdiv(3) = 3; and so on:

count for palindromes <= 11 (prime)

countdiv(1) = 10
countdiv(2) = 4
countdiv(3) = 3
countdiv(4) = 2
countdiv(5) = 1
countdiv(6) = 1
countdiv(7) = 1
countdiv(8) = 1
countdiv(9) = 1


count for palindromes <= 101 (prime)

countdiv(1) = 19
countdiv(2) = 8
countdiv(3) = 6
countdiv(4) = 4
countdiv(5) = 2
countdiv(6) = 2
countdiv(7) = 2
countdiv(8) = 2
countdiv(9) = 2


count for palindromes <= 1001 = 7 * 11 * 13

countdiv(1) = 109
countdiv(2) = 48
countdiv(3) = 36
countdiv(4) = 24
countdiv(5) = 12
countdiv(6) = 15
countdiv(7) = 15
countdiv(8) = 12
countdiv(9) = 12


Some interesting patterns appear as the ceiling-palindromes reach 10001, 100001, 1000001… And one particular pattern doesn’t always disappear when you try the same problem in other bases. I hope to say more on 22/2/22.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.