OFFSET
1,1
COMMENTS
a(n) is the smallest 6th root of unity (mod 7^n) that is prime. - Robert Israel, Jan 14 2024
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
Wilfrid Keller and Jörg Richstein, Fermat quotients that are divisible by p, 2014. [Wayback Machine link]
MAPLE
f:= proc(n) local R, r, i;
R:= sort(map(rhs@op, [msolve(x^6=1, 7^n)]));
for i from 0 do
for r in R do
if isprime(7^n * i + r) then return 7^n * i + r fi
od od;
end proc:
map(f, [$1..30]); # Robert Israel, Jan 14 2024
PROG
(PARI) \\ See A125609
(Python)
from itertools import count
from sympy import nthroot_mod, isprime
def A125611(n):
m = 7**n
r = sorted(nthroot_mod(1, 6, m, all_roots=True))
for i in count(0, m):
for p in r:
if isprime(i+p): return i+p # Chai Wah Wu, May 02 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, Nov 28 2006
EXTENSIONS
More terms from Ryan Propper, Jan 03 2007
More terms from Martin Fuller, Jan 11 2007
STATUS
approved