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”).
%I #29 Sep 11 2023 12:26:50
%S 1,2,3,4,7,13,16,19,21,22,25,28,30,31,34,37,43,46,49,51,52,55,58,60,
%T 61,64,67,73,76,79,85,88,94,97,100,101,102,103,106,109,111,112,115,
%U 118,120,121,124,127,133,136,139,141,142,145,148,150,151,154,157
%N 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.
%C 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.
%e a(1)=1, a(2)=2, 1+2=3 prime,
%e a(5)=7, a(6)=13, 7+1+3=11 prime,
%e a(6)=13, a(7)=16, 1+3+1+6=11 prime.
%t 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 *)
%t 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 *)
%K nonn,base
%O 1,2
%A _Zak Seidov_, Nov 13 2011
%E Typo in example corrected by _Vincenzo Librandi_, Nov 13 2011