cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A267133 a(n) = (1/n)(2/n)(3/n)...((n-1)/n) where (k/n) is the Kronecker symbol, n >= 1.

Original entry on oeis.org

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

Views

Author

Dimitri Papadopoulos, Jan 10 2016

Keywords

Examples

			a(3) = (1/3)(2/3) = (1)(-1) = -1.
		

Crossrefs

Programs

  • 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 *)
  • 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

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

Extensions

"Jacobi symbol" in Name changed to "Kronecker symbol" by Jianing Song, Dec 30 2018