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.

A058207 Three steps forward, two steps back.

Original entry on oeis.org

0, 1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 3, 4, 5, 4, 3, 4, 5, 6, 5, 4, 5, 6, 7, 6, 5, 6, 7, 8, 7, 6, 7, 8, 9, 8, 7, 8, 9, 10, 9, 8, 9, 10, 11, 10, 9, 10, 11, 12, 11, 10, 11, 12, 13, 12, 11, 12, 13, 14, 13, 12, 13, 14, 15, 14, 13, 14, 15, 16, 15, 14, 15, 16, 17, 16, 15, 16, 17, 18, 17, 16, 17, 18
Offset: 0

Views

Author

Henry Bottomley, Nov 29 2000

Keywords

Crossrefs

Cf. A008611.

Programs

Formula

a(n) = a(n-5) + 1.
a(n) = a(n-1) + 1 if n=1, 2 or 3 mod 5.
a(n) = a(n-1) - 1 if n=0 or 4 mod 5.
G.f.: (x*(1+x+x^2-x^3-x^4))/((x-1)^2*(1+x+x^2+x^3+x^4)). [Corrected by Georg Fischer, May 18 2019]
a(n) = n/5 + 4/5*((n mod 5) mod 4) + (6/5)*floor((n mod 5)/4). - Rolf Pleisch, Jul 26 2009
a(n) = Sum_{i=1..n} (-1)^floor((2*i-2)/5). - Wesley Ivan Hurt, Oct 28 2015

Extensions

Second formula corrected by Charles R Greathouse IV, Jul 28 2011