OFFSET
1,2
COMMENTS
Numbers k such that the number of solutions to x^6 == 1 (mod k) is a power of 6.
Also numbers k such that (Z/kZ)* has the same 2-rank and 3-rank, where (Z/kZ)* is the multiplicative group of integers modulo k, and the p-rank of a finite abelian group G is equal to log_p(#{x belongs to G : x^p = 1}) with p being a prime number.
k is a term in this sequence iff v(2, k) = 0 or 1, v(3, k) = 0 or >= 2 and k is not divisible by any prime p == 5 (mod 6). Here v(p, k) is the p-adic valuation of k.
Sequence contains all primes p == 1 (mod 6) and their powers and all powers of 3 except for 3 itself.
Decompose the multiplicative group of integers modulo k as a product of cyclic groups C_{s_1} x C_{s_2} x ... x C_{s_m}, where s_i divides s_j for i < j, then k is a term iff s_1 is divisible by 6. For k = 1 or 2, (Z/kZ)* is the trivial group, s_1 does not exist so 1 and 2 are also terms.
If gcd(k_1, k_2) = 1 and both k_1 and k_2 are in this sequence, so is k_1*k_2. For example, 7 and 9 are both here so 7*9 = 63 is also here. Indeed, the number of solutions to x^6 == 1 (mod 7), x^6 == 1 (mod 9) and x^6 == 1 (mod 36) are 6, 6 and 36, respectively.
This is an analog of A008784, since k is a term there iff s_1 (defined as above) is divisible by 4 instead of 6. But on the other hand, if k is in A008784, so are all its divisors, while this is not true for this sequence. However, if k is here and k is not divisible by 9, then all its divisors are also here.
This is a also an analog of A192453 (s_1 divisible by 8).
LINKS
Jianing Song, Table of n, a(n) for n = 1..15917 (all terms below 100000)
EXAMPLE
91 = 7*13 is a term since the number of solutions to x^6 == 1 (mod 91) is 36 = 6^2.
1197 = 7*9*19 is a term since the number of solutions to x^6 == 1 (mod 1197) is 216 = 6^3.
PROG
(PARI) isA319838(n) = if(abs(n)==1||abs(n)==2, 1, my(i=znstar(n)[2]); !(i[#i]%6)==1, 1)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jianing Song, Sep 28 2018
STATUS
approved