|
|
A070027
|
|
Prime numbers whose initial, all intermediate and final iterated sums of digits are primes.
|
|
10
|
|
|
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;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Supersequences: A046704 is primes p with digit sum s(p) also prime; A207294 is primes p with s(p) and s(s(p)) also prime.
Disjoint sequences: A104213 is primes p with s(p) not prime; A207293 is primes p with s(p) also prime, but not s(s(p)); A213354 is primes p with s(p) and s(s(p)) also prime, but not s(s(s(p))); A213355 is smallest prime p with k-fold digit sum s(s(..s(p)).)..)) also prime for all k < n, but not for k = n. - Jonathan Sondow, Jun 13 2012
|
|
LINKS
|
|
|
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.
|
|
MATHEMATICA
|
dspQ[n_] := TrueQ[Union[PrimeQ[NestWhileList[Plus@@IntegerDigits[#] &, n, # > 9 &]]] == {True}]; Select[Prime[Range[200]], dspQ] (* Alonso del Arte, Aug 17 2011 *)
isdpQ[n_]:=AllTrue[Rest[NestWhileList[Total[IntegerDigits[#]]&, n, #>9&]], PrimeQ]; Select[Prime[Range[300]], isdpQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 12 2017 *)
|
|
PROG
|
(PARI) isA070027(n)={ while(isprime(n), n<9 && return(1); n=vector(#n=eval(Vec(Str(n))), i, 1)*n~)} \\ M. F. Hasler, Jun 28 2009
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|