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.

A131743 Period 4: repeat [0, 1, 0, 2].

Original entry on oeis.org

0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0
Offset: 0

Views

Author

Paul Curtz, Sep 20 2007

Keywords

Comments

Least positive integer k such that n^k == 1 (mod 4), or 0 if GCD(n,4) > 1. - Bruno Berselli, Mar 22 2016

Crossrefs

Cf. A006368.

Programs

Formula

G.f.: x*(1+2*x^2)/ ((1-x)*(x+1)*(x^2+1)). - R. J. Mathar, Nov 15 2007
a(n) = 3/4-1/2*sin(1/2*Pi*n)+3/4*(-1)^(1+n). - R. J. Mathar, Nov 15 2007
a(n) = Fibonacci(2*n) mod 3. - Gary Detlefs Feb 13 2011
a(n) == A006368(n) (mod 3). - Philippe Deléham, Oct 24 2011
a(n) = a(n-4) for n>3. - Wesley Ivan Hurt, Jul 09 2016