OFFSET
1,2
COMMENTS
From Jianing Song, Nov 24 2018: (Start)
The sequence {Kronecker(-n,k)} forms a Dirichlet character modulo n if and only if n == 0, 3 (mod 4).
LINKS
Jean-Paul Allouche, Leo Goldmakher, Mock characters and the Kronecker symbol, arXiv:1608.03957 [math.NT], 2016.
Eric Weisstein's World of Mathematics, Kronecker Symbol
FORMULA
Let n = 2^t*s, s odd, then a(n) = 4*A007947(n) if t is odd; A007947(n) if t is even and s == 3 (mod 4); 2*A007947(n) if t is even and t > 0 and s == 1 (mod 4); 0 if t = 0 and s == 1 (mod 4). - Jianing Song, Nov 24 2018
MATHEMATICA
per[lst_] := FindTransientRepeat[lst, 4] // Last // Length;
a[n_] := per[Table[KroneckerSymbol[-n, k], {k, 1, 1200}]];
Array[a, 76] (* Jean-François Alcover, Oct 08 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric W. Weisstein, Mar 30 2006
EXTENSIONS
Edited by N. J. A. Sloane, May 31 2009
STATUS
approved