OFFSET
1,1
LINKS
Jinyuan Wang, Table of n, a(n) for n = 1..432
MATHEMATICA
f[n_] := Block[{k = n + 1}, While[ PrimeQ[k] || PowerMod[n, k - 1, k] != 1, k++ ]; k]; a = {1}; b = {4}; Do[ c = f[n]; If[c > b[[ -1]], AppendTo[a, n]; AppendTo[b, c]; Print[{n, c}]], {n, 2, 10^6}]; b
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Sep 19 2004
EXTENSIONS
Name corrected by Jinyuan Wang, Jul 24 2021
STATUS
approved