login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A321568
Least prime p such that p plus the sum of its digits is the n-th prime after p.
2
11, 19, 37, 59, 97, 55787, 26699, 663959, 6974477, 86966771, 1095975857, 4649574977, 349685387573, 988839709939, 86396869388567
OFFSET
1,1
COMMENTS
The other way round is not feasible because p minus the sum of its digits is never a prime but a multiple of 9.
LINKS
Carlos Rivera, Puzzle 935. pi+SOD(pi)=p(i+n), The Prime Puzzles and Problems Connection.
EXAMPLE
a(1) = 11 because 11 + 1 + 1 = 13 that is the first prime after 11.
a(2) = 19 because 19 + 1 + 9 = 29 that is the second prime after 19.
MAPLE
P:=proc(q) local a, b, c, d, n, x; x:=0; d:=[]; for n from 1 to q do
x:=nextprime(x); a:=x+convert(convert(x, base, 10), `+`);
if isprime(a) then c:=0; b:=x; while b<a do b:=nextprime(b); c:=c+1; od;
if numboccur(c, d)=0 then d:=[op(d), c]; lprint(c, x, a); fi; fi;
od; end: P(10^13); # Terms not in order.
MATHEMATICA
Array[Block[{p = 2}, While[p + Total@ IntegerDigits@ p != NextPrime[p, #], p = NextPrime@ p]; p] &, 8] (* Michael De Vlieger, Dec 17 2018 *)
CROSSREFS
KEYWORD
base,nonn,more
AUTHOR
Paolo P. Lava, Dec 17 2018
EXTENSIONS
a(12)-a(15) from Giovanni Resta, Dec 17 2018
STATUS
approved