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!)
A214120 Number of Proth primes < 2^n. 1

%I #16 Apr 03 2023 10:36:13

%S 0,1,2,3,4,5,7,9,12,17,21,27,33,50,62,84,110,148,182,253,327,467,610,

%T 855,1097,1548,1999,2849,3648,5231,6761,9781,12631,18293,23770,34407,

%U 44704,64911,84734,122742,160055,233124,303882,442949,578588,843890,1103500

%N Number of Proth primes < 2^n.

%H Chris Caldwell, <a href="https://t5k.org/top20/page.php?id=66">The Top 20 Proth Primes</a>

%H Chris Caldwell, The Prime Glossary, <a href="https://t5k.org/glossary/xpage/ProthPrime.html">Proth prime</a>

%e a(5) = 4 since first 4 Proth primes are 3, 5, 13, 17 all < 2^5.

%t lst2 = {}; r = 47; lst1 = Union[Flatten@Table[Select[1 + 2^k*Range[1, 2^Min[k, r - k], 2], # < 2^r && PrimeQ[#] &], {k, r}]]; Do[AppendTo[lst2, Length@Select[lst1, # < 2^n &]], {n, r}]; lst2

%o (PARI) a(n)=my(c=0); for(m=1, n-1, k=1; until(k>2^m, p=k*2^m+1; if(p>2^n, break); if(isprime(p), c++); k=k+2)); c; \\ _Arkadiusz Wesolowski_, Mar 14 2014

%Y Cf. A080076.

%K nonn

%O 1,3

%A _Arkadiusz Wesolowski_, Jul 04 2012

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 April 25 13:41 EDT 2024. Contains 371970 sequences. (Running on oeis4.)