|
|
A166849
|
|
Primes with digital root 1, 2, 4 or 8.
|
|
1
|
|
|
2, 11, 13, 17, 19, 29, 31, 37, 47, 53, 67, 71, 73, 83, 89, 101, 103, 107, 109, 127, 137, 139, 157, 163, 173, 179, 181, 191, 193, 197, 199, 211, 227, 229, 233, 251, 263, 269, 271, 281, 283, 307, 317, 337, 353, 359, 373, 379, 389, 397, 409, 431, 433, 443
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Primes which under repeated summation of digits eventually reach 1, 2, 4 or 8.
|
|
LINKS
|
|
|
EXAMPLE
|
The prime 229 is a member since 229 -> 13 -> 4.
|
|
MAPLE
|
A166849 := proc(n) option remember: local k: if(n=1)then return 2:fi: k:=nextprime(procname(n-1)): do if((k-1) mod 9 in {0, 1, 3, 7})then return k: fi: k:=nextprime(k): od: end: seq(A166849(n), n = 1..54); # Nathaniel Johnston, May 04 2011
|
|
MATHEMATICA
|
dr[n_]:=NestWhile[Total[IntegerDigits[#]]&, n, #>9&]; Select[Prime[Range[ 100]], MemberQ[{1, 2, 4, 8}, dr[#]]&] (* Harvey P. Dale, Oct 25 2011 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|