OFFSET
0,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
FORMULA
From Reinhard Zumkeller, Mar 24 2012: (Start)
MAPLE
K := (n, k) -> NumberTheory:-KroneckerSymbol(n, k):
seq(nops(select(k -> K(n, k) = 1, [seq(0..n)])), n = 0..80);
# Peter Luschny, May 15 2024
MATHEMATICA
Table[Count[Table[KroneckerSymbol[n, k], {k, 0, n}], 1], {n, 0, 80}]
(* 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(81)])
# Peter Luschny, May 16 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Aug 06 2004
EXTENSIONS
Typo in definition fixed by Reinhard Zumkeller, Mar 24 2012
Offset set to 0, a(0) = 0 added, a(1) and name adapted by Peter Luschny, May 15 2024
STATUS
approved