OFFSET
0,1
COMMENTS
The terms of this sequence with n > 11 correspond to probable primes which are too large to be proven prime currently. - Serge Batalov, Apr 01 2018
a(15) is a statistically significant outlier; the sequence (m^(2^15)+1)/2 may require a double-check with software that is not GWNUM-based. - Serge Batalov, Apr 01 2018
LINKS
Richard Fischer, Generalized Fermat numbers with odd base
Wikipedia, Fermat number
EXAMPLE
a(7) = 113 since 113 is the smallest positive integer m such that (m^(2^7)+1)/2 is prime.
MAPLE
a:= proc(n) option remember; local m; for m by 2
while not isprime((m^(2^n)+1)/2) do od; m
end:
seq(a(n), n=0..8);
MATHEMATICA
Table[m = 1; While[! PrimeQ[(m^(2^n) + 1)/2], m++]; m, {n, 0, 9}] (* Michael De Vlieger, Sep 23 2016 *)
PROG
(PARI) a(n) = {my(m = 1); while (! isprime((m^(2^n)+1)/2), m += 2); m; } \\ Michel Marcus, Aug 01 2016
(Python)
from sympy import isprime
def a(n):
m, pow2 = 1, 2**n
while True:
if isprime((m**pow2 + 1)//2): return m
m += 2
print([a(n) for n in range(9)]) # Michael S. Branicky, Mar 03 2021
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Walter Kehowski, Jul 31 2016
EXTENSIONS
a(13)-a(14) from Robert Price, Sep 23 2016
a(15) from Serge Batalov, Mar 29 2018
a(16) from Serge Batalov, Mar 30 2018
a(17) from Serge Batalov, Apr 01 2018
a(18)-a(19) from Ryan Propper, Aug 16 2022. These correspond to 1382288- and 2388581-digit PRPs, respectively, found using an exhaustive search with Jean Penne's LLR2.
STATUS
approved