[seqfan] Re: Smallest prime wich is equal to a multiple of his reversal +/- a prime smaller than him in n ways

Richard Mathar mathar at strw.leidenuniv.nl
Tue Mar 13 19:37:20 CET 2012


http://list.seqfan.eu/pipermail/seqfan/2012-March/016549.html

njas> I guess this asks for the smallest prime p for which there are n solutions,
njas> for n=1,2,3,...
njas> But p=71 has three solutions:
njas> 71 = 2*17 +37
njas> 71 = 4*17 + 3
njas> 71 = 6*17 - 31,
njas> so surely the sequence begins 31, 41, 71, 61, 6421, 8501, ... ?
njas> Or am I missing something? The next term, if it exists, is > 48000.

The next terms by brute force search is 8116001.
There is some indication that the sequence is finite: We are searching for
primes p such that we have n solutions to p = k*R(p)+-q with q<p another prime, k=1,2,3...
So we need p +-q = k*R(p), and the left hand side needs to be <= 2p.
so k <= (2p)/R(p). As R(p) has the same number of digits as p, 2*p/R(p) cannot
be much larger than roughly 20 in the best case, supposed that the most significant
digit of p is 9 and the least significant digit is 1. So as the number of solutions
cannot be larger than k, the sequence ought be no longer than (roughly) 20.

Richard Mathar

Maxima code:
Ameller(n) := block(
     [R,s,pi,p,r,L],
     L : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] ,
     for pi : 1 do (
          p : A000040[pi],
          R : digrev(p),
          s : 0 ,
          for k : 1 thru floor(2*p/R) do (
                  r : abs(p-k*R),
                  if primep(r) and r < p then
                          s : s+1
          ),
          if s < length(L) and s> 0 and L[s] = 0 then (
                  L[s] : p ,
                  print(L)
          )
     )
)$
Ameller(2)



More information about the SeqFan mailing list