login
A339758
a(n) is the least prime p such that p^(2*n+1) == 2*n+1 (mod 2^(2*n+1)).
1
3, 3, 53, 503, 4297, 947, 10589, 17903, 624401, 7151083, 45543077, 30611047, 612126937, 2280521251, 649288301, 26566080479, 28921314337, 303937208923, 1086758949557, 12299159511127, 39118361784041, 18314722943123, 64249761922429, 2484777068103119, 1148475719438129, 14810825716436683
OFFSET
0,1
LINKS
EXAMPLE
For n = 2, 2*n+1 = 5, and 53 is the least prime q such that q^5 == 5 (mod 2^5), so a(2) = 53.
MAPLE
f:= proc(k) local x, m;
for m from subs(msolve(x^k=k, 2^k), x) by 2^k do
if isprime(m) then return m fi
od
end proc:
seq(f(2*i+1), i=0..50);
PROG
(PARI) a(n) = my(p=2); while (Mod(p, 2^(2*n+1))^(2*n+1) != 2*n+1, p = nextprime(p+1)); p; \\ Michel Marcus, Dec 16 2020
(Python)
from itertools import count
from sympy import nthroot_mod, isprime
def A339758(n):
m = (n<<1)+1
r = 1<<m
a = sorted(nthroot_mod(m, m, r, all_roots=True))
for i in count(0):
for k in a:
if isprime(k+i*r):
return int(k+i*r) # Chai Wah Wu, May 07 2024
CROSSREFS
Sequence in context: A268136 A225208 A290567 * A100065 A066807 A165497
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Dec 16 2020
STATUS
approved