cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A214120 Number of Proth primes < 2^n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 9, 12, 17, 21, 27, 33, 50, 62, 84, 110, 148, 182, 253, 327, 467, 610, 855, 1097, 1548, 1999, 2849, 3648, 5231, 6761, 9781, 12631, 18293, 23770, 34407, 44704, 64911, 84734, 122742, 160055, 233124, 303882, 442949, 578588, 843890, 1103500
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jul 04 2012

Keywords

Examples

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

Crossrefs

Cf. A080076.

Programs

  • Mathematica
    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
  • 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