logoalt Hacker News

jodrellblank01/23/20251 replyview on HN

I wondered if we map English letters to digits (a=0, b=1, c=2, ... , z=25) is there anything which is both a palindrome in its English form and in its number form, and prime? I took a list of palindromes from Wikipedia[1] and tested them, and yes:

deified 3485843

bib 181

did 383

I note that none of them use letters which map to double-digits (k=10, l=11, m=12, etc.); none of the palindrome sentences make palindromic numbers (ignoring case, stripping all punctuation); could there be one which does?

[1] https://en.wiktionary.org/wiki/Appendix:English_palindromes


Replies

tkgally01/23/2025

How about representing the words as numbers in base 26? That would preserve the palidromicity for both the word and the number, and primality would not be affected by the base representation.

Might not be as much fun, though.

show 1 reply