A275530 Smallest positive integer m such that (m^(2^n) + 1)/2 is prime.
3, 3, 3, 9, 3, 3, 3, 113, 331, 513, 827, 799, 3291, 5041, 71, 220221, 23891, 11559, 187503, 35963
Offset: 0
Examples
a(7) = 113 since 113 is the smallest positive integer m such that (m^(2^7)+1)/2 is prime.
Links
- Richard Fischer, Generalized Fermat numbers with odd base
- Wikipedia, Fermat number
Programs
-
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 *)
-
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
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.
Comments