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.

A112347 Kronecker symbol (-1, n) except a(0) = 0.

Original entry on oeis.org

0, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1
Offset: 0

Views

Author

Michael Somos, Sep 12 2005

Keywords

Examples

			x + x^2 - x^3 + x^4 + x^5 - x^6 - x^7 + x^8 + x^9 + x^10 - x^11 - x^12 + x^13 + ...
		

Crossrefs

Cf. A034947.
First differences of A005811.

Programs

  • Mathematica
    Join[{0},KroneckerSymbol[-1,Range[110]]] (* Harvey P. Dale, Jun 02 2019 *)
  • PARI
    {a(n) = if( n, kronecker( -1, n))}

Formula

Multiplicative with a(2^e) = 1, a(p^e) = (-1)^(e(p-1)/2) if p>2.
a(2n) = a(n), a(4*n + 1) = 1, a(4*n + 3) = -1. a(-n) = -a(n).
a(n) = A034947(n) unless n=0.