OFFSET
1,4
COMMENTS
Motivated by Crandall & Pomerance, Exercise 2.1 p. 108: "Prove that 16 is, modulo any odd number, an eighth power".
REFERENCES
R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see Exercise 2.1 p. 108.
EXAMPLE
a(9)=3 since for odd number 2*9-1=17, 3^8 = 16 (mod 17).
MATHEMATICA
Table[SelectFirst[Range@ 1000, Mod[#^8, 2 n - 1] == Mod[16, 2 n - 1] &], {n, 77}] (* Michael De Vlieger, Mar 24 2016, Version 10 *)
PROG
(PARI) a(n) = { my(m = 2*n-1, k = 1); while(Mod(k, m)^8 != 16, k++); k; }
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Mar 23 2016
STATUS
approved