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.

A053796 a(n) = (n^2+n) modulo 5.

Original entry on oeis.org

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

Views

Author

Stuart M. Ellerstein (ellerstein(AT)aol.com), Mar 27 2000

Keywords

Crossrefs

Cf. A053793.

Programs

  • Magma
    [(n^2+n) mod 5 : n in [0..100]]; // Wesley Ivan Hurt, Apr 20 2021
  • Mathematica
    Table[Mod[n^2+n,5],{n,0,110}] (* or *) PadRight[{},120,{0,2,1,2,0}] (* Harvey P. Dale, Sep 12 2017 *)

Formula

From Bruno Berselli, Dec 02 2010: (Start)
G.f.: x*(2+x+2*x^2)/(1-x^5);
a(n) = a(n-5) for n > 4. (End)

Extensions

More terms from James Sellers, Apr 08 2000