OFFSET
2,1
PROG
(PARI) a(n) = my(i=0); for(b=2, oo, if(Mod(b, n^2)^(n-1)==1, if(i==0, i++, return(b))))
(Python)
def b(n, startk=2):
k, n2 = startk, n*n
while pow(k, n-1, n2) != 1: k += 1
return k
def a(n): return b(n, startk=b(n)+1)
print([a(n) for n in range(2, 54)]) # Michael S. Branicky, Apr 29 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Apr 29 2022
STATUS
approved