OFFSET
1,1
REFERENCES
Dorin Andrica, Vlad Crişan, The smallest nontrivial solution to x^k == 1 (mod n) ..., Amer. Math. Monthly 126 (2019), 173-178.
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..1000
MATHEMATICA
Do[k = 1; While[ !IntegerQ[(n*k + 1)^(1/3)], k++ ]; Print[k], {n, 1, 58}]
f[n_] := Block[{x = 2}, While[ Mod[x^3 - 1, n] != 0, x++]; (x^3 - 1)/n]; Array[f, 58] (* Robert G. Wilson v, Mar 29 2016 *)
PROG
(PARI) a(n) = my(k = 1); while(! ispower(n*k+1, 3), k++); k; \\ Michel Marcus, Mar 30 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Oct 20 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Oct 21 2002
STATUS
approved