OFFSET
1,3
FORMULA
a(n) = A333500(n,n).
PROG
(PARI) {a(n) = if(n==2, 0, my(cnt=0, k=0); while(cnt<n, k++; if(Mod(n, k^2)^k==1, cnt++)); k)}
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Seiichi Manyama, Mar 24 2020
STATUS
approved