OFFSET
0,4
COMMENTS
a(n) is minimum e for which 10^e = +/-1 mod 2n+1, or zero if no e exists.
REFERENCES
H. Cohen, Course in Computational Algebraic Number Theory, Springer, 1993, p. 25, Algorithm 1.4.3
LINKS
Eric Weisstein's World of Mathematics, Multiplicative Order.
S. Wolfram, Algebraic Properties of Cellular Automata (1984), Appendix B.
MATHEMATICA
Suborder[k_, n_] := If[n > 1 && GCD[k, n] == 1, Min[MultiplicativeOrder[k, n, {-1, 1}]], 0];
a[n_] := Suborder[10, 2 n + 1];
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Harry J. Smith, Feb 11 2005
STATUS
approved