This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A156604 #14 Jan 29 2019 23:59:03 %S A156604 2,3,5,7,29,47,67,89,179,197,199,379,397,487,577,599,797,887,977,1499, %T A156604 1697,1787,1877,1949,2399,2579,2687,2777,2939,2957,2999,3989,4799, %U A156604 4889,4999,6997,7699,7789,7879,8599,8689,8779,8887,9679,9697,9769,9787,9859 %N A156604 a(1)=2; for n > 0, a(n+1) is the smallest prime of A046704 larger than a(n) such that the sequence of digit sums of a(n) is nondecreasing. %C A156604 The slowest increasing sequence that is a subsequence of A046704 such that the sequence of A007953(a(n)) is nondecreasing. - _R. J. Mathar_, Mar 29 2010 %e A156604 The first several terms after a(1)=2 are %e A156604 3 (3 > 2); %e A156604 5 (5 > 3); %e A156604 7 (7 > 5); %e A156604 29 (2 + 9 > 7); %e A156604 47 (4 + 7 = 2 + 9); %e A156604 67 (6 + 7 > 4 + 9); %e A156604 89 (8 + 9 > 6 + 7); %e A156604 179 (1 + 7 + 9 = 8 + 9); %e A156604 197 (1 + 9 + 7 = 8 + 9). %p A156604 A007953 := proc(n) local d ; add(d,d= convert(n,base,10)) ; end proc: %p A156604 isA046704 := proc(n) isprime(n) and isprime(A007953(n)) ; end proc: %p A156604 A156604 := proc(n) option remember ; local psprev,i ; if n = 1 then 2 ; else psprev := A007953(procname(n-1)) ; for i from procname(n-1)+1 do if isA046704(i) then if A007953(i) >= psprev then return i ; end if; end if; end do: end if ; end proc: %p A156604 seq(A156604(n),n=1..80) ; # _R. J. Mathar_, Mar 18 2010 %p A156604 From _R. J. Mathar_, Mar 29 2010: (Start) %p A156604 A007953 := proc(n) add(d, d= convert(n,base,10)) ; end proc: %p A156604 isA028834 := proc(n) local d; add(d, d= convert(n,base,10)) ; isprime(%) ; end proc: %p A156604 isA046704 := proc(n) isprime(n) and isA028834(n) ; end proc: %p A156604 A156604 := proc(n) option remember; if n = 1 then 2; else for a from procname(n-1)+1 do if isA046704(a) and A007953(a) >= A007953(procname(n-1)) then return a; end if; end do: end if; end proc: seq(A156604(n),n=1..100) ; (End) %Y A156604 Cf. A000040, A007953, A067954. %K A156604 nonn,base %O A156604 1,1 %A A156604 _Juri-Stepan Gerasimov_, Feb 11 2009 %E A156604 Definition, terms and examples corrected by _R. J. Mathar_, Mar 18 2010 %E A156604 179 and 1877 inserted, and 9 terms after 4889 replaced with the single term 4999, by _R. J. Mathar_, Mar 29 2010