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.

A270740 Period 9: repeat 0,1,2,2,0,1,1,2,0.

Original entry on oeis.org

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

Views

Author

William Walkington, Mar 22 2016

Keywords

Crossrefs

Cf. A002264 (floor(n/3)), A010872 (n mod 3).

Programs

Formula

a(n) = (n - floor(n/3)) mod 3.
From Chai Wah Wu, Jun 04 2016: (Start)
a(n) = a(n-1) - a(n-3) + a(n-4) - a(n-6) + a(n-7) for n > 6.
G.f.: x*(1 + x - x^3 + 2*x^4)/((1 - x)*(1 + x^3 + x^6)). (End)