OFFSET
1,2
REFERENCES
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 864.
R. Osborn, Tables of All Primitive Roots of Odd Primes Less Than 1000, Univ. Texas Press, 1961.
LINKS
T. D. Noe, Table of n, a(n) for n=1..10000
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
MATHEMATICA
f[n_] := Block[{k = Prime[n] - 1, p = Prime[n], t = Table[i, {i, 1, Prime[n] - 1}]}, While[ Union[ PowerMod[ k, t, p]] != t, k-- ]; k]; Table[ f[n], {n, 1, 60}]
PROG
(PARI) a(n) = my(p=prime(n)); forstep(q=p-1, 1, -1, if(znorder(Mod(q, p))==eulerphi(p), return(q))); \\ Michel Marcus, Sep 28 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jun 11, 2002
EXTENSIONS
More terms from Robert G. Wilson v, Jun 11 2002
STATUS
approved