A341211 Smallest prime p such that (p^(2^n) + 1)/2 is prime.
3, 3, 3, 13, 3, 3, 3, 113, 331, 3631, 827, 3109, 4253, 7487, 71
Offset: 0
Examples
No term is smaller than 3 (since 2 is the only smaller prime, and (2^(2^n) + 1)/2 is not an integer). (3^(2^0) + 1)/2 = (3^1 + 1)/2 = (3 + 1)/2 = 4/2 = 2 is prime, so a(0)=3. (3^(2^1) + 1)/2 = (3^2 + 1)/2 = 5 is prime, so a(1)=3. (3^(2^2) + 1)/2 = (3^4 + 1)/2 = 41 is prime, so a(2)=3. (3^(2^3) + 1)/2 = (3^8 + 1)/2 = 3281 = 17*193 is not prime, nor is (p^8 + 1)/2 for any other prime < 13, but (13^8 + 1)/2 = 407865361 is prime, so a(3)=13.
Links
- Dario Alpern, Integer factorization calculator
Programs
-
Alpertron
x=3;x=N(x);NOT IsPrime((x^8192+1)/2);N(x) # Martin Ehrenstein, Feb 08 2021
-
PARI
a(n) = my(p=3); while (!isprime((p^(2^n) + 1)/2), p=nextprime(p+1)); p; \\ Michel Marcus, Feb 07 2021
-
Python
from sympy import isprime, nextprime def a(n): p, pow2 = 3, 2**n while True: if isprime((p**pow2 + 1)//2): return p p = nextprime(p) print([a(n) for n in range(9)]) # Michael S. Branicky, Mar 03 2021
Extensions
a(11) from Daniel Suteu, Feb 07 2021
a(12) from Jinyuan Wang, Feb 07 2021
a(13)-a(14), using Dario Alpern's integer factorization calculator and prior bounds, from Martin Ehrenstein, Feb 08 2021
Comments