login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A166849 Primes with digital root 1, 2, 4 or 8. 1

%I #17 Feb 10 2019 03:43:03

%S 2,11,13,17,19,29,31,37,47,53,67,71,73,83,89,101,103,107,109,127,137,

%T 139,157,163,173,179,181,191,193,197,199,211,227,229,233,251,263,269,

%U 271,281,283,307,317,337,353,359,373,379,389,397,409,431,433,443

%N Primes with digital root 1, 2, 4 or 8.

%C Primes which under repeated summation of digits eventually reach 1, 2, 4 or 8.

%H Nathaniel Johnston, <a href="/A166849/b166849.txt">Table of n, a(n) for n = 1..10000</a>

%e The prime 229 is a member since 229 -> 13 -> 4.

%p 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

%t dr[n_]:=NestWhile[Total[IntegerDigits[#]]&,n,#>9&]; Select[Prime[Range[ 100]], MemberQ[{1,2,4,8},dr[#]]&] (* _Harvey P. Dale_, Oct 25 2011 *)

%Y Cf. A010888.

%K nonn,base,easy

%O 1,1

%A _Alexander R. Povolotsky_, Oct 21 2009

%E Edited by _N. J. A. Sloane_ and _Zak Seidov_, Oct 23 2009

%E More terms a(11)-a(51) from _Vincenzo Librandi_, Oct 24 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 8 00:02 EDT 2024. Contains 372317 sequences. (Running on oeis4.)