A prime $\ p\ $ is called palindrome, if the digits in reverse order give the same prime. For bases $\ b=2,3,4\ $ , there are large examples of palindrome primes that are also palindrome in base $b$ , but for $\ b=5\ $, I know only the trivial primes $\ p=2\ $ and $\ p=3\ $.
Is there a palindrome prime $\ p>3\ $ that is also palindrome in base $\ 5\ $ ?
With this routine :
? z=5;for(a=1,10^10,u=digits(a);if(gcd(u[1],10)==1,for(b=0,9,n=a*10+b;forstep(k=l
ength(u),1,-1,n=n*10+u[k]);if(isprime(n)==1,v=digits(n,z);if(Vecrev(v)==v,print(
n))))))
we can check whether a solution with $\ 21\ $ digits or less exists.
Brute force easily reveals that no prime below $\ 11\ $ does the job, so we can assume that the number of digits is odd and start with $\ 101\ $.
The program generates the palindromes and checks whether there is a solution.
I ran the program with limit $\ 10^8\ $ with no result, so a solution must have more than $\ 17\ $ digits.
You're looking for a number $n$ which fits three criteria:
I start with a heuristic analysis of the situation.
A number which in base $b$ is a palindrome with $d$ digits is divisible by $b+1$ if $d$ is even. Therefore we can consider as a first filter the criteria:
That is already a very tough filter: up to $10^{17}$ only $47$ numbers pass it:
We can filter out a number of those by eye as being non-primes. So let's add a fifth criterion to the filter:
It's easy to enumerate intervals satisfying the first three criteria. We can then estimate for each of those intervals the probability of satisfying the 4th and 5th criteria and the probability of being prime ($\approx \frac{2}{\ln n}$ because of the first criterion).
But the pair of bases here is special, and so the probability of being palindrome in the two bases is definitely not independent. Specifically, each least significant digit in base $5$ corresponds to two possible least significant digits in base $10$. So we can take that into account and discard large intervals of integers.
Taking all this into account, ignoring single-digit numbers, and summing the total estimated primes we cross the threshold of one estimated prime in the range $(4\times 5^{12},10^{9})$, the threshold of two estimated primes in the range $(10^{14}, 2\times 5^{20})$, and the threshold of three estimated primes in the range $(2\times 5^{38} - 8\times 10^{26})$. Check my calculations here.
Conclusion: there probably are primes meeting the criteria, but they're looking to be rare.
To search, I think the best approach is to extend the idea that each least significant digit in base $5$ corresponds to two possible least significant digits in base $10$. More generally, any $d$-digit suffix in base $10$ corresponds to a $d$-digit suffix in base $5$, and since the reverse of the suffix gives you the prefix we can do progressive refinement of intervals.
I used the following C# code to generate odd odd-length double-palindromes and then performed primality testing separately:
After 4121 seconds it found the following number, which is the first to check out as prime:
$$7278175677249196711781595411145951871176919427765718727$$