login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A302138
Period of Kronecker symbol modulo n.
3
1, 8, 3, 2, 5, 24, 7, 8, 3, 40, 11, 6, 13, 56, 15, 2, 17, 24, 19, 10, 21, 88, 23, 24, 5, 104, 3, 14, 29, 120, 31, 8, 33, 136, 35, 6, 37, 152, 39, 40, 41, 168, 43, 22, 15, 184, 47, 6, 7, 40, 51, 26, 53, 24, 55, 56, 57, 232, 59, 30, 61, 248, 21, 2, 65, 264, 67, 34, 69, 280, 71, 24, 73, 296, 15, 38, 77, 312, 79, 10, 3, 328, 83, 42, 85, 344, 87, 88, 89, 120, 91, 46, 93, 376, 95, 24, 97, 56, 33, 10
OFFSET
1,2
COMMENTS
From Jianing Song, Nov 24 2018: (Start)
The sequence {Kronecker(k,n)} forms a Dirichlet character modulo n if and only if n !== 2 (mod 4).
Let n = 2^t*s, s odd, then a(n) = A117888(n) if and only if t is odd or s == 1 (mod 4) (or both); a(n) = A117889(n) if and only if t is odd or s == 3 (mod 4) (or both). (End)
LINKS
FORMULA
Multiplicative with a(p^e) = p, p > 2; a(2^e) = 2 for even e and 8 for odd e.
a(n) = A007947(n) if A007814(n) is even, else 4*A007947(n).
Sum_{k=1..n} a(k) ~ c * n^2, where c = (49/50) * Product_{p prime} (1 - 1/(p*(p+1))) = (49/50) * A065463 = 0.690353... . - Amiram Eldar, Dec 01 2022
EXAMPLE
The Kronecker symbol modulo 2 is 1, 0, -1, 0, -1, 0, 1, 0 with period 8, so a(2) = 8.
The Kronecker symbol modulo 9 is 1, 1, 0 with period 3, so a(9) = 3.
MATHEMATICA
Array[Apply[Times, FactorInteger[#] /. {p_, e_} /; p > 0 :> If[p == 2, 2 + 6 Boole[OddQ@ e], p]] &, 100] (* Michael De Vlieger, Nov 25 2018 *)
PROG
(PARI) a(n)={my(f=factor(n)); prod(i=1, #f~, if(f[i, 1]==2 && f[i, 2]%2, 8, f[i, 1]))} \\ Andrew Howroyd, Apr 29 2018
CROSSREFS
Cf. A117888 (period of Kronecker(n,k)), A117889 (period of Kronecker(-n,k)).
Sequence in context: A346713 A154014 A063568 * A198494 A100668 A194159
KEYWORD
nonn,easy,mult
AUTHOR
Jianing Song, Apr 02 2018
STATUS
approved