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

A200088
a(n) is the least number greater than a(n-1) such that the sum of the decimal digits of a(n-1) and a(n) is prime.
0
1, 2, 3, 4, 7, 13, 16, 19, 21, 22, 25, 28, 30, 31, 34, 37, 43, 46, 49, 51, 52, 55, 58, 60, 61, 64, 67, 73, 76, 79, 85, 88, 94, 97, 100, 101, 102, 103, 106, 109, 111, 112, 115, 118, 120, 121, 124, 127, 133, 136, 139, 141, 142, 145, 148, 150, 151, 154, 157
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
Sequence in context: A023162 A022437 A057983 * A004783 A031149 A096723
KEYWORD
nonn,base
AUTHOR
Zak Seidov, Nov 13 2011
EXTENSIONS
Typo in example corrected by Vincenzo Librandi, Nov 13 2011
STATUS
approved