# How many massively palindromic primes exist?

A massively palindromic prime is when for in all bases (in which it has more than 2 digits) it is a palindrome:

Edit : My example was broken because of a silly miscalculation, I haven't even found one yet.

Do there exist any palindromic primes? How many massively palindromic primes exist? If infinite, how large percentage of all primes? If none exist, can we maybe calculate some bound of number of bases a prime is palindromic in?

I am very new in number theory and don't have many ideas how to start proving this.

• Find the first few, then look it up in the Online Encyclopedia of Integer Sequences. – Gerry Myerson Apr 11 '17 at 12:43
• @GerryMyerson: Yes I have checked a few, they seem much rarer than I first thought. I wonder if even any exist. – mathreadler Apr 11 '17 at 13:42
• Note that if it has an even number of digits in base 2, then in base 4 it consists only of the digits 0 and 3. Similarly for base 3&9. You can also look at the combination of bases 2&8. This does seem to be somewhat restrictive. – Jaap Scherphuis Apr 11 '17 at 13:51
• I wonder if it is demand too much to be palindromic in all bases, maybe no prime qualifies but we have to aim for some smaller subset of integers for base. – mathreadler Apr 11 '17 at 13:56

## 1 Answer

I will prove this theorem.

Theorem: There is no massively palindromic number larger than $7$.

Proof

For $n>105$, it is obvious that $2(\lfloor\sqrt{n}\rfloor-2)^2>2(\sqrt{n}-3)^2=2n-12\sqrt n+18>n$. Therefore, there exists at least $3$ bases, $\lfloor\sqrt{n}\rfloor$, $\lfloor\sqrt{n}\rfloor-1$ and $\lfloor\sqrt{n}\rfloor-2$ which makes $n$ $3$ digit number starting with $1$ in its base. Therefore, $n$ should also end with $1$ in these bases and it follows that $n-1$ is common multiple of $\lfloor\sqrt{n}\rfloor$, $\lfloor\sqrt{n}\rfloor-1$ and $\lfloor\sqrt{n}\rfloor-2$. However, it can be easily proved that the lcm of $3$ consecutive numbers is at least the half of their product. Then one can see that $$(\lfloor\sqrt{n}\rfloor)(\lfloor\sqrt{n}\rfloor-1)(\lfloor\sqrt{n}\rfloor-2)>(\sqrt{n}-1)(\sqrt{n}-2)(\sqrt{n}-3)>n^{3/2}-6n>2(n-1)$$so this is contradiction.

Now, we only need to check the case $n\le 105$. Filtering by base $2$ gives possible candidates$$1, 2, 3, 5, 7, 9, 15, 17, 21, 27, 31, 33, 45, 51, 63, 65, 73, 85, 93, 99$$ and filtering them by base $3$ gives candidates$$1, 2, 3, 5, 7$$And these numbers are only massively palindromic number. They have only $0$ or $1$ bases which makes them more than $3$ digit number, but they are all palindromes in such bases.

Also, it is known that even palindromic in both bases $2$ and $3$ is extremely rare condition. See this question.

• 1 isn't prime, but other than that this is a great answer. Edit: never mind. You proved there are none apart from the small trivial ones, even if you don't also want them to be prime. – Jaap Scherphuis Apr 11 '17 at 14:07
• Great! I even found out the 7 was a sloppy miscalculation of mine. I didn't find any other. – mathreadler Apr 11 '17 at 14:11
• There is only 1 base that makes 7 more than 3 digit number. In that base, 7 is palindrome. Therefore, by your definition, 7 is still massively palindrome number. – didgogns Apr 11 '17 at 14:13