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.

A204688 a(n) = n^n (mod 3).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

For n>0, a(n) is periodic with period 6: repeat [1, 1, 0, 1, 2, 0].
Decimal expansion of 1110119/9999990. - David A. Corneth, Jun 28 2016

Crossrefs

Programs

Formula

G.f.: (1+x+x^2+x^4+2*x^5-x^6) / (1-x^6). - Bruno Berselli, Jan 18 2012
From Wesley Ivan Hurt, Jun 28 2016: (Start)
a(n) = a(n-6) for n>6.
a(n) = sin(n*Pi/3) * (10*sin(n*Pi/3) + 2*sin(2*n*Pi/3) - sqrt(3) - 2*sqrt(3)*cos(n*Pi/3))/6 for n>0. (End)
a(n) = A010872(A000312(n)). - Michel Marcus, Jun 28 2016