OFFSET
0,6
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
FORMULA
MAPLE
K := (n, k) -> NumberTheory:-KroneckerSymbol(n, k):
seq(nops(select(k -> K(n, k) = -1, [seq(0..n)])), n = 0..85);
# Peter Luschny, May 15 2024
MATHEMATICA
Table[Count[Table[KroneckerSymbol[n, k], {k, 0, n}], -1], {n, 0, 70}]
(* Peter Luschny, May 15 2024 *)
PROG
(PARI) a(n) = sum(i=0, n, if(kronecker(n, i) + 1, 0, 1))
(SageMath)
print([sum(kronecker(n, k) == -1 for k in range(n + 1)) for n in range(86)])
# Peter Luschny, May 16 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Aug 06 2004
EXTENSIONS
Offset set to 0, a(0) = 0 added, and name adapted by Peter Luschny, May 15 2024
STATUS
approved