OFFSET
1,2
COMMENTS
Resulting primes: 3, 5, 7, 11, 11, 11, 17, 13, 7, 11, 17, 13, 7, 11, 17, 17, 17, 23, 19, 13, 17, 23, 19, 13, 17, 23, 23, 23, 29, 29, 29, 29, 29.
EXAMPLE
a(1)=1, a(2)=2, 1+2=3 prime,
a(5)=7, a(6)=13, 7+1+3=11 prime,
a(6)=13, a(7)=16, 1+3+1+6=11 prime.
MATHEMATICA
t = {1}; Do[nxt = t[[-1]] + 1; While[! PrimeQ[Total[IntegerDigits[t[[-1]]]] + Total[IntegerDigits[nxt]]], nxt++]; AppendTo[t, nxt], {100}]; t (* T. D. Noe, Nov 14 2011 *)
nxt[b_]:=Module[{c=b+1}, While[!PrimeQ[Total[IntegerDigits[b]]+Total[IntegerDigits[c]]], c++]; c]; NestList[nxt, 1, 60] (* Harvey P. Dale, Sep 11 2023 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Zak Seidov, Nov 13 2011
EXTENSIONS
Typo in example corrected by Vincenzo Librandi, Nov 13 2011
STATUS
approved