|
|
A201358
|
|
Numbers k such that (2^k + k - 1)*2^k + 1 is prime.
|
|
7
|
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
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
|
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,hard,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|