%I #62 Aug 18 2022 14:21:25
%S 3,3,3,9,3,3,3,113,331,513,827,799,3291,5041,71,220221,23891,11559,
%T 187503,35963
%N Smallest positive integer m such that (m^(2^n) + 1)/2 is prime.
%C 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
%C 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
%H Richard Fischer, <a href="http://www.fermatquotient.com/PrimSerien/GenFermOdd.txt">Generalized Fermat numbers with odd base</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Fermat_number">Fermat number</a>
%e a(7) = 113 since 113 is the smallest positive integer m such that (m^(2^7)+1)/2 is prime.
%p a:= proc(n) option remember; local m; for m by 2
%p while not isprime((m^(2^n)+1)/2) do od; m
%p end:
%p seq(a(n), n=0..8);
%t Table[m = 1; While[! PrimeQ[(m^(2^n) + 1)/2], m++]; m, {n, 0, 9}] (* _Michael De Vlieger_, Sep 23 2016 *)
%o (PARI) a(n) = {my(m = 1); while (! isprime((m^(2^n)+1)/2), m += 2); m;} \\ _Michel Marcus_, Aug 01 2016
%o (Python)
%o from sympy import isprime
%o def a(n):
%o m, pow2 = 1, 2**n
%o while True:
%o if isprime((m**pow2 + 1)//2): return m
%o m += 2
%o print([a(n) for n in range(9)]) # _Michael S. Branicky_, Mar 03 2021
%Y Cf. A056993, A027862.
%K nonn,more
%O 0,1
%A _Walter Kehowski_, Jul 31 2016
%E a(13)-a(14) from _Robert Price_, Sep 23 2016
%E a(15) from _Serge Batalov_, Mar 29 2018
%E a(16) from _Serge Batalov_, Mar 30 2018
%E a(17) from _Serge Batalov_, Apr 01 2018
%E 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.