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-1 of 1 results.

A196697 Number of primes of the form of 2^n +- 2^k +- 1 with 0 <= k < n.

Original entry on oeis.org

1, 4, 5, 6, 7, 9, 7, 11, 10, 12, 7, 12, 8, 12, 9, 14, 11, 19, 13, 22, 7, 9, 11, 16, 4, 8, 9, 7, 12, 18, 14, 15, 11, 10, 10, 18, 8, 12, 11, 18, 12, 23, 5, 12, 13, 16, 13, 22, 8, 9, 16, 13, 9, 13, 14, 11, 11, 10, 10, 20, 15, 10, 10, 13, 9, 22, 11, 10, 10, 12
Offset: 1

Views

Author

Lei Zhou, Oct 05 2011

Keywords

Comments

Conjecture: all terms of this sequence are greater than 0.
Conjecture tested holds up to n = 10000.
Terms for all n tend to be small integers.
All Mersenne primes and primes of the forms 3*2^n+-1, 5*2^n+-1, 7*2^n+-1, and 15*2^n+-1 form a subgroup of this type of primes.
A large prime that is explicitly found for this type is 2^1048576 - 2^891232 - 1.
I conjecture the contrary: infinitely many elements of this sequence are equal to 0. Probably the first n with a(n) = 0 is less than a million. - Charles R Greathouse IV, Nov 21 2011

Examples

			For n=1,
  2^1 + 2^0 - 1 = 2^1 - 2^0 + 1 = 2: 1 prime, so a(1)=1.
For n=2,
  2^2 - 2^0 - 1 = 2;
  2^2 - 2^1 + 1 = 3;
  2^2 + 2^1 - 1 = 2^2 - 2^1 + 1 = 5;
  2^2 + 2^1 + 1 = 7: 4 primes found, so a(2)=4.
...
For n=11,
  2^11 - 2^5 + 1 = 2017;
  2^11 - 2^3 - 1 = 2039;
  2^11 + 2^2 + 1 = 2053;
  2^11 + 2^4 - 1 = 2063;
  2^11 + 2^5 + 1 = 2081;
  2^11 + 2^6 - 1 = 2111;
  2^11 + 2^6 + 1 = 2113: 7 primes found, so a(11)=7.
		

Crossrefs

Cf. A238900 (least k).

Programs

  • Mathematica
    Table[c1 = 2^i; cs = {};
    Do[c2 = 2^j; cp = c1 + c2 + 1; If[PrimeQ[cp], cs = Union[cs, {cp}]];
      cp = c1 + c2 - 1; If[PrimeQ[cp], cs = Union[cs, {cp}]];
      cp = c1 - c2 + 1; If[PrimeQ[cp], cs = Union[cs, {cp}]];
      cp = c1 - c2 - 1;
      If[PrimeQ[cp], cs = Union[cs, {cp}]], {j, 0, i - 1}];
    Length[cs], {i, 1, 100}]
  • PARI
    a(n)=my(v=List(),t); for(k=0,n-1, if(isprime(t=2^n-2^k-1), listput(v,t)); if(isprime(t=2^n-2^k+1), listput(v,t)); if(isprime(t=2^n+2^k-1), listput(v,t); if(isprime(t=2^n+2^k+1), listput(v,t)))); #Set(v) \\ Charles R Greathouse IV, Oct 06 2011

Extensions

Edited by Jon E. Schoenfield, Mar 15 2021
Showing 1-1 of 1 results.