Problems & Puzzles:
Puzzle 804. Palindromes and
Somewhere out there I saw this
question: "find prime P such that (P+1)^2+1=Q is another prime
and Q^2+Rev(Q^2) is palindrome R
I made a preliminary search and found that P=19 is the
smallest solution where R=268862
But more than that I found a total of 38 solutions very
easily being the last P=1616689 where R=7853587698556558967853587,
before I stopped my code.
Thinking in these big quantity of solutions I offer to you
the following questions.
solutions in this range of primes (19 to 1616689) are really too
many or not.
Q2. Why all
of these 38 prime solutions end in digit 9?
Q3. May R
be a prime number? Show it.
Contributions came from Dmitry Kamenetsky, Jan van Delden and Emmanuel
I found 508 solutions for
P<=5,000,000,000. In this range there were 5 solutions with
All P end with 9, but I am not
Q3: Solutions with p,q,r prime:
A property of these solutions is
that there is no carry-over in the computation of
Note my routine did not use this result (otherwise it could be
much faster), does this always happen?
I found 826 primes < 2*10^10
that satisfied the conditions of the problem.
They all end with a 9.
It is clear that p cannot end
with 1 or 7 because then q ends in 5.
But there can be very big primes
ending with 3 that satisfied the conditions of the problem.
That these cases are very sparse
is due to the fact that the corresponding value q end in 7, thus
q^2 ends in 9; numbers m ending in 9 for which m + R(m) is
palindrome are very rarely squares. In fact, actually I don't
know of such an m.
For the following primes p, the r
is prime :
3874728899, 3911806909, 4998501539, 13129010299,
17306619409... (their number is probably infinite).