%I #14 Jan 29 2019 23:59:03
%S 2,3,5,7,29,47,67,89,179,197,199,379,397,487,577,599,797,887,977,1499,
%T 1697,1787,1877,1949,2399,2579,2687,2777,2939,2957,2999,3989,4799,
%U 4889,4999,6997,7699,7789,7879,8599,8689,8779,8887,9679,9697,9769,9787,9859
%N 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 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 The first several terms after a(1)=2 are
%e 3 (3 > 2);
%e 5 (5 > 3);
%e 7 (7 > 5);
%e 29 (2 + 9 > 7);
%e 47 (4 + 7 = 2 + 9);
%e 67 (6 + 7 > 4 + 9);
%e 89 (8 + 9 > 6 + 7);
%e 179 (1 + 7 + 9 = 8 + 9);
%e 197 (1 + 9 + 7 = 8 + 9).
%p A007953 := proc(n) local d ; add(d,d= convert(n,base,10)) ; end proc:
%p isA046704 := proc(n) isprime(n) and isprime(A007953(n)) ; end proc:
%p 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 seq(A156604(n),n=1..80) ; # _R. J. Mathar_, Mar 18 2010
%p From _R. J. Mathar_, Mar 29 2010: (Start)
%p A007953 := proc(n) add(d, d= convert(n,base,10)) ; end proc:
%p isA028834 := proc(n) local d; add(d, d= convert(n,base,10)) ; isprime(%) ; end proc:
%p isA046704 := proc(n) isprime(n) and isA028834(n) ; end proc:
%p 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 Cf. A000040, A007953, A067954.
%K nonn,base
%O 1,1
%A _Juri-Stepan Gerasimov_, Feb 11 2009
%E Definition, terms and examples corrected by _R. J. Mathar_, Mar 18 2010
%E 179 and 1877 inserted, and 9 terms after 4889 replaced with the single term 4999, by _R. J. Mathar_, Mar 29 2010