OFFSET
0,1
COMMENTS
Period 20: repeat [0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, -1, 0, 0, 0, -1, 0, -1].
This sequence is one of the three non-principal real Dirichlet characters modulo 20. The other two are Jacobi or Kronecker symbols {(20/n)} (or {(n/20)}) and {((-100)/n)} (A185276).
Note that (Sum_{i=0..19} i*a(i))/(-20) = 2 gives the class number of the imaginary quadratic field Q(sqrt(-5)). The fact Q(sqrt(-5)) has class number 2 implies that Q(sqrt(-5)) is not a unique factorization domain.
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..10000
Eric Weisstein's World of Mathematics, Kronecker Symbol
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,-1).
FORMULA
Completely multiplicative with a(p) = a(p mod 20) for primes p.
a(n) = -a(n+10) = -a(-n) for all n in Z.
Multiplicative with a(2) = a(5) = 0, a(p) = (-1)^floor(p/10) otherwise; equivalently: a(n) = (-1)^floor(n/10) if n is coprime to 2*5, 0 otherwise. - M. F. Hasler, Feb 28 2022
MATHEMATICA
Array[KroneckerSymbol[-20, #]&, 100, 0] (* Amiram Eldar, Jan 10 2019 *)
PROG
(PARI) a(n) = kronecker(-20, n)
CROSSREFS
Moebius transform of A035170.
Cf. A240920 (primes not inert in Q(sqrt(-5))), A139513 (primes decomposing), A003626 (primes remaining inert).
Kronecker symbols {(D/n)} for negative fundamental discriminants D = -3..-47, -67, -163: A102283, A101455, A175629, A188510, A011582, A316569, A011585, this sequence, A011586, A109017, A011588, A390614, A388073, A388072, A011591, A011592, A011596, A011615.
KEYWORD
sign,mult,easy
AUTHOR
Jianing Song, Dec 27 2018
STATUS
approved
