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.

A146325 Period 3: repeat [1, 4, 1].

Original entry on oeis.org

1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Comments

Continued fraction of (1 + sqrt(26))/5 = A188659.
Digital roots of the centered triangular numbers A005448. - Ant King, May 08 2012
Also the digital roots of centered 12-gonal numbers A003154. - Peter M. Chema, Dec 20 2023

Crossrefs

Cf. A003154, A005448, A021337, A131534 (square roots), A188659.

Programs

  • Magma
    &cat [[1,4,1]^^40]; // Bruno Berselli, Jun 27 2016
  • Maple
    seq(op([1, 4, 1]), n=1..50); # Wesley Ivan Hurt, Jul 01 2016
  • Mathematica
    Table[Round[N[4 (Cos[(2 n - 1) ArcTan[Sqrt[3]]])^2, 100]], {n, 1, 100}]
    PadLeft[{},111,{1,4,1}] (* Harvey P. Dale, Sep 18 2011 *)
  • PARI
    a(n)=1+3*(n%3==2) \\ Jaume Oliver Lafont, Mar 24 2009
    

Formula

a(n) = 4*(cos((2*n - 1)*Pi/3))^2 = 4 - 4*(sin((2*n - 1)*Pi/3))^2.
a(n+3) = a(n).
a(n) = 2 - cos(2*Pi*n/3) + sqrt(3)*sin(2*Pi*n/3).
O.g.f.: x*(1+4*x+x^2)/(1-x^3). [Richard Choulet, Nov 03 2008]
a(n) = 6 - a(n-1) - a(n-2) for n>2. - Ant King, Jun 12 2012
a(n) = (n mod 3)^(n mod 3). - Bruno Berselli, Jun 27 2016
a(n) = 1 + A021337(n) for n>0. - Wesley Ivan Hurt, Jul 01 2016