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.

Showing 1-2 of 2 results.

A002238 Numbers k such that 21*2^k - 1 is prime.

Original entry on oeis.org

1, 2, 3, 7, 10, 13, 18, 27, 37, 51, 74, 157, 271, 458, 530, 891, 1723, 1793, 1849, 1986, 2191, 2869, 4993, 7777, 11730, 15313, 29171, 35899, 36227, 71570, 199219, 233914, 297499, 332523, 348547, 538657, 986130, 999599
Offset: 1

Views

Author

Keywords

References

  • H. Riesel, Lucasian criteria for the primality of N=h.2^n-1, Math. Comp., 23 (1969), 869-875.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A032360, 21*2^k + 1 is prime.

Programs

Extensions

More terms from Hugo Pfoertner, Jun 22 2004
More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Jan 02 2008

A331539 a(n) gives the number of primes of form (2*n+1)*2^m + 1 where m satisfies 2^m <= 2*n+1.

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 1, 2, 1, 0, 2, 1, 2, 2, 2, 0, 1, 2, 2, 4, 1, 1, 1, 0, 1, 2, 2, 1, 2, 1, 1, 3, 3, 2, 2, 2, 2, 4, 1, 1, 3, 2, 2, 2, 1, 0, 3, 3, 2, 4, 1, 0, 3, 1, 1, 2, 2, 1, 3, 2, 0, 1, 2, 1, 2, 2, 2, 4, 1, 1, 4, 0, 1, 0, 2, 1, 2, 2, 0, 2, 2, 3, 5, 1, 1, 0, 1
Offset: 0

Views

Author

Jeppe Stig Nielsen, Jan 19 2020

Keywords

Comments

For each index n, let k = 2*n+1. Then a(n) gives the number of primes of form k*2^m + 1 that are NOT considered Proth primes (A080076) because their m are too small.
In the edge case n=0, so k=1, we count 1*2^0 + 1 = 2 as a non-Proth prime.

Examples

			For n=10, we consider 21*2^m + 1, where m runs from 0 to 4 (the next value m=5 would make 2^m exceed 21). The number of cases where 21*2^m + 1 is prime, is 2, namely m=1 (prime 43) and m=4 (prime 337). So 2 primes means a(10)=2. Compare with the start of A032360, all k=21 primes.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[Boole @ PrimeQ[(2n+1)*2^m + 1], {m, 0, Log2[2n+1]}]; Array[a, 100, 0] (* Amiram Eldar, Jan 20 2020 *)
  • PARI
    a(n) = my(k=2*n+1);sum(m=0,logint(k,2),ispseudoprime(k<
    				
Showing 1-2 of 2 results.