OFFSET
1,4
COMMENTS
For multiplication Modd n (not to be confused with mod n) see a comment on A203571.
The 0 for n=1 is a primitive root Modd 1, the other zeros indicate that there is no primitive root for this n.
Iff a(n)>0, for n>=2, then the Galois group Gal(Q(2*cos(Pi/n))/Q), which is the multiplicative group of odd reduced residue classes Modd n (hence the notation Modd) is cyclic. For n=1 this group is also cyclic. See A206551 (cyclic moduli n) and A206552 (acyclic, i.e. non-cyclic, moduli n). [Changed by Wolfdieter Lang, Apr 04 2012]
FORMULA
a(1) = 0 == 1 (Modd 1).
If no primitive root exists for n>=2 then a(n):=0. If a primitive root exists for n>=2 then a(n) is the smallest positive integer whose order Modd n is delta(n), with delta(n) = A055034(n). That is, with gcd(a(n),2*n) = 1, n>=2, the least positive exponent k such that a(n)^k == 1 (Modd n) is delta(n), and a(n) is the smallest positive representative Modd n with this property.
EXAMPLE
n=1: delta(1) = 1, a(1) = 1 == 0 (Modd 1): 0^1 = 0 == 1 (Modd 1).
n=2: delta(2) = 1, a(2) = 1 == 1 (Modd 2): 1^1 = 1 == 1 (Modd 2).
n=4: delta(4) = 2, a(2) = 3 == 3 (Modd 4): 3^2 = 9 == 1 (Modd 4).
n=6: delta(4) = 2, a(6) = 5 == 5 (Modd 6): 5^2 = 25. 25 (Modd 6) = 25 (mod 6) =1.
n=12: delta(12) = 4, a(12) = 0, because no primitive root exists: 5^2 == 1 (Modd 12), 7^2 == 1 (Modd 12) and 11^2 == 1 (Modd 12). The cycle structure of this acyclic group is [[5,1],[7,1],[11,1]]. It is the (abelian) group Z_2 x Z_2.
CROSSREFS
KEYWORD
nonn
AUTHOR
Wolfdieter Lang, Mar 27 2012
STATUS
approved