# $p$ and $6p+1$ both palindrome - primes. Is $(131/787)$ the only example?

$$131$$ is a palindrome prime as well as $$787$$ , moreover $$6\cdot 131+1=787$$.

Are there further examples for a palindrome-prime $$p$$, such that $$6p+1$$ is a palindrome-prime as well ?

It is clear that $$p$$ must have an odd number od digits (since $$11$$ is the only palindrom-prime with an even number of digits) and the leading digit of $$p$$ must be $$1$$ , otherwise $$6p+1$$ has an even number of digits.

So, $$p$$ must have the form $$1\cdots 1$$ and $$6p+1$$ must have the form $$7\cdots 7$$. Upto $$10^{10}$$ , no further example exits.

• Setting the issue of primality aside, how often is $6p+1$ a palindrome when $p$ is a palindrome? Commented Oct 30, 2018 at 13:43
• @BarryCipra A good question, will already not appear often. Commented Oct 30, 2018 at 13:44
• For $6p+1$ to have the form $7\cdots7$, the palindrome $p$ must either have the form $12\cdots21$ or the form $13\cdots31$. Commented Oct 30, 2018 at 13:53
• @Barry Cipra with Pari Gp we found p=131 and p=12130303121. First of all they both are congruent to -1 (mod 6) and $p+1$ in both cases is divisible by a prime ending with digits 11. Infact 132=2^2*3*11 and $12130303122=2*3^3*7*59*543911$. 543911=70^2*111+11 Commented Oct 30, 2018 at 17:20
• @EnzoCreti, if $s=6p+1$, then $(s+2)/3=2p+1$. I agree, it is interesting that this $p$ is a Sophie Germain prime (as is $131$). Have you checked any of the other $p$'s that you've found? Commented Oct 31, 2018 at 12:41

This is just a long comment, but it might be of help for anyone wanting to go further.

It makes sense to begin by looking for palindromes $$p$$, prime or not, but with an odd number of digits (so that it might be prime), such that $$6p+1$$ is also a palindrome with an odd number of digits (so that it also might be prime). Let's let $$p=a_0a_1\ldots a_{n-1}a_na_{n-1}\ldots a_1a_0$$ with digits $$a_0,a_1,\ldots,a_n\in\{0,1,2,\ldots,9\}$$ and $$6p+1=b_0b_1\ldots b_{n-1}b_nb_{n-1}\ldots b_1b_0$$ with digits $$b_0,b_1,\ldots,b_n\in\{0,1,2,\ldots,9\}$$.

As the OP notes, for $$6p+1$$ to have an odd number of digits, we must have $$a_0=1$$, in which case $$b_0=7$$. But that requires a carry of exactly $$1$$ from the multiplication $$6a_1$$, which means $$a_1\in\{2,3\}$$. In particular we get the three-digit pairs

$$(121,727)\quad\text{and}\quad(131,787)$$

In general, in order for the carries to work to produce a palindrome, we must have $$a_i\in\{0,1\}$$ if $$i$$ is even and $$a_i\in\{2,3\}$$ if $$i$$ is odd; moreover, every such choice produces a palindromic pair $$(p,6p+1)$$. Thus, for example, the five-digit pairs are

$$(12021,72127),\quad(12121,72727),\quad(13031,78187),\quad(13131,78787)$$

Among these numbers, only $$72727$$ and $$78787$$ are prime; the $$p$$ values are all composite. (In particular, $$12021$$ and $$13131$$ are easily identified as multiples of $$3$$.)

The fact that there are only $$2^n$$ candidates for a palindromic pair of $$2n+1$$-digit primes should streamline the search for larger examples considerably. The $$11$$-digit pair $$(12130303121, 72781818727)$$ reported by Enzo Creti, for example, is one of only $$32$$ possible $$11$$-digit pairs, many of which can be ignored as obvious multiples of $$3$$. My guess would be that prime pairs will pop up periodically; perhaps someone can provide a heuristic estimate for their frequency (or an argument to the contrary, that they should eventually cease).