login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(1)=2, a(n+1) is the smallest prime > (a(n) + sum of digits of a(n)).
1

%I #10 Jan 22 2019 00:36:23

%S 2,5,11,17,29,41,47,59,79,97,127,139,157,173,191,211,223,233,251,263,

%T 277,307,331,347,367,389,419,439,457,479,503,521,541,557,577,599,631,

%U 643,659,683,701,719,739,761,787,811,823,839,863,881,907,929,953,971

%N a(1)=2, a(n+1) is the smallest prime > (a(n) + sum of digits of a(n)).

%e 2, 5(>4=2+2), 11(>10=5+5), 17(>13=11+1+1), 29(>25=17+1+7), etc.

%p A007953 := proc(n) add(d,d=convert(n,base,10)) ; end: A156850 := proc(n) option remember; if n = 1 then 2; else procname(n-1)+A007953(procname(n-1)) ; nextprime(%) ; fi; end: seq(A156850(n),n=1..120) ; # _R. J. Mathar_, Feb 20 2009

%t NestList[NextPrime[#+Total[IntegerDigits[#]]]&,2,60] (* _Harvey P. Dale_, Aug 21 2011 *)

%Y Cf. A000040, A156672.

%K nonn,base

%O 1,1

%A _Juri-Stepan Gerasimov_, Feb 17 2009

%E Definition clarified by _Harvey P. Dale_, Aug 21 2011