OFFSET
1,1
COMMENTS
r^(2^(n-1)) == -1 (mod a(n)).
Is there a proof that a(n) always exists?
EXAMPLE
n | t | r | 2^n*t+1
---------------------
1 | 1 | 2 | 3
2 | 1 | 2 | 5
3 | 2 | 2 | 17
4 | 12 | 3 | 193
5 | 11 | 6 | 353
PROG
(Python)
def a(n):
t = 1
while True:
a_n = (t << n) + 1
for r in range(2, t+2):
if pow(r, 1 << (n-1), a_n) + 1 == a_n:
return a_n
t += 1
print([a(n) for n in range(1, 31)])
(PARI) isok(t, n) = for (r=2, t+1, if ((gcd(r, 2^n*t + 1)==1) && znorder(Mod(r, 2^n*t + 1)) == 2^n, return(1))); return(0);
a(n) = my(t=1); while (!isok(t, n), t++); 2^n*t + 1; \\ Michel Marcus, Mar 17 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Darío Clavijo, Mar 03 2024
STATUS
approved