login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A201358
Numbers k such that (2^k + k - 1)*2^k + 1 is prime.
7
1, 5, 49, 269, 2387, 2945, 5897, 11929, 30433
OFFSET
1,2
EXAMPLE
5 is in the sequence because (2^5 + 5 - 1)*2^5 + 1 = 1153 is prime.
MATHEMATICA
lst={}; Do[If[PrimeQ[(2^n + n-1)*2^n+1], AppendTo[lst, n]], {n, 10000}]; lst
PROG
(PARI) is(n)=ispseudoprime((2^n+n-1)<<n+1) \\ Charles R Greathouse IV, Feb 17 2017
(Python)
from sympy import isprime
def afind(limit, startk=1):
pow2 = 2**startk
for k in range(startk, limit+1):
if isprime((pow2 + k - 1)*pow2 + 1):
print(k, end=", ")
pow2 *= 2
afind(3000) # Michael S. Branicky, Jan 11 2022
KEYWORD
nonn,hard,more
AUTHOR
Michel Lagneau, Nov 30 2011
EXTENSIONS
a(8) from Michael S. Branicky, Jan 11 2022
a(9) from Michael S. Branicky, Apr 09 2023
STATUS
approved