OFFSET
0,2
COMMENTS
In the case n=2 and any other case where a(n)=A000010(2n+1), the multiplicative group of units modulo 2n+1 is cyclic and thus 8 (and any other unit) is a generator. These moduli are A167796, so this occurs whenever 2n+1 (caution: not n) is a member of A167796. - Kellen Myers, Feb 06 2015
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Eric Weisstein's World of Mathematics, Multiplicative Order
EXAMPLE
The third term a(2) is 4 because 4 is the smallest integer such that 8^4 is congruent to 1 modulo 2*2+1=5. The orbit of 8 modulo 5 is {3, 4, 2, 1}. - Kellen Myers, Feb 06 2015
MATHEMATICA
Table[MultiplicativeOrder[8, n], {n, 1, 150, 2}] (* Robert G. Wilson v, Apr 05 2011 *)
PROG
(Magma) [1] cat [Modorder(8, 2*n+1): n in [1..100]]; // Vincenzo Librandi, Apr 01 2014
(PARI) vector(80, n, n--; znorder(Mod(8, 2*n+1))) \\ Michel Marcus, Feb 05 2015
(GAP) List([0..80], n->OrderMod(8, 2*n+1)); # Muniru A Asiru, Feb 26 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved
