login
A196697
Number of primes of the form of 2^n +- 2^k +- 1 with 0 <= k < n.
7
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,2
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
LINKS
EXAMPLE
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.
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}]
PROG
(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
CROSSREFS
Cf. A238900 (least k).
Sequence in context: A309358 A143789 A068521 * A068318 A347932 A242337
KEYWORD
nonn
AUTHOR
Lei Zhou, Oct 05 2011
EXTENSIONS
Edited by Jon E. Schoenfield, Mar 15 2021
STATUS
approved