|
| |
|
|
A070027
|
|
Prime numbers whose initial, all intermediate and final iterated sums of digits are primes.
|
|
5
| |
|
|
2, 3, 5, 7, 11, 23, 29, 41, 43, 47, 61, 83, 101, 113, 131, 137, 151, 173, 191, 223, 227, 241, 263, 281, 311, 313, 317, 331, 353, 401, 421, 443, 461, 599, 601, 641, 797, 821, 887, 911, 977, 1013, 1019, 1031, 1033, 1051, 1091, 1103, 1109, 1123, 1163, 1181, 1213
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 0,1
|
|
|
COMMENTS
| Subsequence of A046704 ; actually, exactly those numbers for which the orbit under A007953 is a subset of A046704. [From M. F. Hasler (www.univ-ag.fr/~mhasler), Jun 28 2009]
|
|
|
EXAMPLE
| 599 is a term because 599, 5+9+9=23 and 2+3=5 are all prime. 2999 is a term because 2999, 2+9+9+9=29, 2+9=11 and 1+1=2 are all prime. See A062802 and A070026 for related comments.
|
|
|
MAPLE
| P:=proc(i) local a, k, n, w; for n from 1 by 1 to i do a:=ithprime(n); while isprime(a) and floor(a/10)>0 do w:=0; k:=a; while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; a:=w; od; if isprime(a) then print(ithprime(n)); fi; od; end: P(1000); - Paolo P. Lava (paoloplava(AT)gmail.com), Jul 30 2008
|
|
|
MATHEMATICA
| dspQ[n_] := TrueQ[Union[PrimeQ[NestWhileList[Plus@@IntegerDigits[#] &, n, # > 9 &]]] == {True}]; Select[Prime[Range[200]], dspQ] (* From Alonso del Arte, Aug 17 2011 *)
|
|
|
PROG
| (PARI) isA070027(n)={ while(isprime(n), n<9 && return(1); n=vector(#n=eval(Vec(Str(n))), i, 1)*n~)} \\ [From M. F. Hasler (www.univ-ag.fr/~mhasler), Jun 28 2009]
|
|
|
CROSSREFS
| Cf. A070026 (a supersequence), subsequences: A062802, A070028, A070029.
Sequence in context: A046704 A089392 A089695 * A156658 A118723 A118721
Adjacent sequences: A070024 A070025 A070026 * A070028 A070029 A070030
|
|
|
KEYWORD
| base,easy,nonn
|
|
|
AUTHOR
| Rick L. Shepherd (rshepherd2(AT)hotmail.com), Apr 14 2002
|
| |
|
|