OFFSET
0,6
COMMENTS
FORMULA
a(n) == 1 (mod 2^n).
EXAMPLE
For n = 5, k = 12; 2^(2^5) + 12*2^5 + 1 = 4294967681 is prime, a(5) = 12.
MATHEMATICA
a[n_] := Module[{k = 0}, While[! PrimeQ[2^(2^n) + k*2^n + 1], k++];
k]; Array[a, 10, 0]
PROG
(PARI) isok(k, n) = isprime(2^(2^n) + k*2^n + 1);
a(n) = my(k=0); while (!isok(k, n), k++); k; \\ Michel Marcus, Apr 15 2019
(Python)
from sympy import isprime
def A307535(n):
r = 2**n
m, k = 2**r+1, 0
w = m
while not isprime(w):
k += 1
w += r
return k # Chai Wah Wu, Apr 29 2019
CROSSREFS
KEYWORD
nonn,more,hard
AUTHOR
Amiram Eldar and Thomas Ordowski, Apr 13 2019
EXTENSIONS
a(15) from Daniel Suteu, Apr 14 2019
a(16)-a(17) from Chai Wah Wu, Apr 30 2019
a(18) from Michael S. Branicky, Jun 05 2024
STATUS
approved