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.

A052901 Periodic with period 3: a(3n)=3, a(3n+1)=a(3n+2)=2.

Original entry on oeis.org

3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Continued fraction expansion of (15 + sqrt(365))/10 = A176979. - Klaus Brockhaus, Apr 30 2010
First differences of A047390. - Tom Edgar, Jul 17 2014
Also decimal expansion of 322/999. - Nicolas Bělohoubek, Nov 11 2021

Crossrefs

Cf. A176979 (decimal expansion of (15+sqrt(365))/10).
Cf. A208131 (partial products).

Programs

  • Haskell
    a052901 n = a052901_list !! n
    a052901_list = cycle [3,2,2]  -- Reinhard Zumkeller, Apr 08 2012
    
  • Maple
    spec := [S,{S=Union(Sequence(Z),Sequence(Z),Sequence(Prod(Z,Z,Z)))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    PadRight[{},110,{3,2,2}] (* Harvey P. Dale, Mar 19 2013 *)
    LinearRecurrence[{0, 0, 1},{3, 2, 2},105] (* Ray Chandler, Aug 25 2015 *)
  • PARI
    Vec((2*x^2+2*x+3)/(1-x^3)+O(x^99)) \\ Charles R Greathouse IV, Apr 08 2012

Formula

G.f.: (2*x^2 + 2*x + 3)/(1-x^3).
a(n) = Sum((1/3)*(2*alpha^2 + 3*alpha + 2)*alpha^(-1-n), where alpha = RootOf(-1+x^3)).
a(n) = ceiling(7*(n+1)/3) - ceiling(7*n/3). - Tom Edgar, Jul 17 2014
From Nicolas Bělohoubek, Nov 11 2021: (Start)
a(n) = 12/(a(n-2)*a(n-1)).
a(n) = 7 - a(n-2) - a(n-1). See also A069705 or A144437. (End)

Extensions

More terms from James Sellers, Jun 06 2000