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”).

A252005
a(1)=2; for n>1, a(n) is the least prime > a(n-1) such that sum of digits of a(n-1) and a(n) is prime.
2
2, 3, 11, 23, 53, 83, 101, 113, 149, 179, 239, 269, 293, 311, 347, 359, 383, 401, 419, 449, 479, 557, 563, 593, 617, 647, 653, 683, 743, 773, 839, 863, 929, 953, 983, 1019, 1061, 1091, 1151, 1163, 1223, 1301, 1319, 1367, 1373, 1439, 1481, 1493, 1553, 1583, 1607, 1619, 1667, 1697, 1733, 1787, 1823
OFFSET
1,1
EXAMPLE
a(2)=3, next primes are 5, 7, 11 and only 3+1+1 is prime, hence
a(3)=11, next primes are 13, 17, 19, 23 and only 1+1+2+3 is prime, hence a(4)=23, etc.
MATHEMATICA
lp[n_]:=Module[{p=NextPrime[n], tid=Total[IntegerDigits[n]]}, While[ CompositeQ[ Total[ IntegerDigits[p]]+tid], p=NextPrime[p]]; p]; NestList[ lp, 2, 60] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 30 2018 *)
CROSSREFS
Sequence in context: A263729 A246496 A119641 * A074496 A292817 A292112
KEYWORD
base,nonn
AUTHOR
Zak Seidov, Dec 12 2014
STATUS
approved