login
A267133
a(n) = (1/n)(2/n)(3/n)...((n-1)/n) where (k/n) is the Kronecker symbol, n >= 1.
1
1, 1, -1, 0, 1, 0, -1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 1, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, -1, 0, 1, 0, 0
OFFSET
1,1
LINKS
FORMULA
A080339(n) = abs(a(n)) = a(n)^2.
a(c) = 0 if c is composite (A002808).
a(p) = 1 for primes p in A002313.
a(p) = -1 for primes p in A002145.
a(n) = A057077(n+3)*A080339(n) for n > 1. - Robert Israel, Jan 14 2016
a(n) = A151763(n), n > 2. - R. J. Mathar, Jan 17 2016
EXAMPLE
a(3) = (1/3)(2/3) = (1)(-1) = -1.
MAPLE
f:= proc(n) if not isprime(n) then 0 elif n mod 4 = 3 then -1 else 1 fi end proc:
f(1):= 1:
map(f, [$1..1000]); # Robert Israel, Jan 14 2016
MATHEMATICA
Table[Product[JacobiSymbol[k, n], {k, n - 1}], {n, 75}] (* Michael De Vlieger, Jan 12 2016 *)
PROG
(PARI) a(n) = prod(k=1, n-1, kronecker(k, n)); \\ Michel Marcus, Jan 11 2016
(PARI) a(n)=if(isprime(n), (-1)^(n%4>2), n==1) \\ Charles R Greathouse IV, Jan 14 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
EXTENSIONS
"Jacobi symbol" in Name changed to "Kronecker symbol" by Jianing Song, Dec 30 2018
STATUS
approved