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.

Showing 1-4 of 4 results.

A132357 a(n) = 3*a(n-1) - a(n-3) + 3*a(n-4), with initial values 1,4,14,41.

Original entry on oeis.org

1, 4, 14, 41, 122, 364, 1093, 3280, 9842, 29525, 88574, 265720, 797161, 2391484, 7174454, 21523361, 64570082, 193710244, 581130733, 1743392200, 5230176602, 15690529805, 47071589414, 141214768240, 423644304721
Offset: 0

Views

Author

Paul Curtz, Nov 24 2007

Keywords

Crossrefs

First differences of A132353.
Cf. A129339.

Programs

  • Mathematica
    LinearRecurrence[{3,0,-1,3},{1,4,14,41},50] (* Paolo Xausa, Dec 05 2023 *)
  • PARI
    a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; 3,-1,0,3]^n*[1;4;14;41])[1,1] \\ Charles R Greathouse IV, Oct 08 2016

Formula

O.g.f.: -(1+x+2*x^2)/((3*x-1)*(x+1)*(x^2-x+1)) = -(3/2)/(3*x-1)+(1/3)*(x-2)/(x^2-x+1)+(1/ 6)/(x+1). - R. J. Mathar, Nov 28 2007
a(n) = (1/2)*3^(n+1) + (1/6)*(-1)^n - (2/3)*cos(Pi*n/3). Or, a(n) = (1/2)*3^(n+1) + (1/2)*[ -1; -1; 1; 1; 1; -1]. - Richard Choulet, Jan 02 2008
a(n+1) - 3a(n) = A132367(n+1). - Paul Curtz, Dec 02 2007
6*a(n) = (-1)^n +3^(n+2) -2*A057079(n+1). - R. J. Mathar, Oct 03 2021

A177702 Period 3: repeat [1, 1, 2].

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, May 11 2010

Keywords

Comments

Continued fraction expansion of (2+sqrt(10))/3.
Decimal expansion of 112/999.
a(n) = A131534(n+2) = |A132419(n)| = |A132367(n)| = |A131556(n+2)|= |A122876(n)|.

Crossrefs

Programs

  • Magma
    &cat[ [1, 1, 2]: k in [1..35] ];
    
  • Maple
    seq(op([1, 1, 2]), n=1..50); # Wesley Ivan Hurt, Jul 01 2016
  • Mathematica
    PadRight[{},120,{1,1,2}] (* or *) LinearRecurrence[{0,0,1},{1,1,2},120] (* Harvey P. Dale, Dec 19 2014 *)
  • PARI
    a(n)=max(n%3,1) \\ Charles R Greathouse IV, Jul 17 2016

Formula

a(n) = a(n-3) for n > 2, with a(0) = 1, a(1) = 1, a(2) = 2.
G.f.: (1+x+2*x^2)/(1-x^3).
a(n) = 4/3 - cos(2*Pi*n/3)/3 - sin(2*Pi*n/3)/sqrt(3). - R. J. Mathar, Oct 08 2011
a(n) = 1 + A022003(n). - Wesley Ivan Hurt, Jul 01 2016

A135266 Partial sums of A132357.

Original entry on oeis.org

0, 1, 5, 19, 60, 182, 546, 1639, 4919, 14761, 44286, 132860, 398580, 1195741, 3587225, 10761679, 32285040, 96855122, 290565366, 871696099, 2615088299, 7845264901, 23535794706, 70607384120, 211822152360, 635466457081
Offset: 0

Views

Author

Paul Curtz, Dec 02 2007

Keywords

Programs

  • Mathematica
    Join[{0}, Table[(1/4)*3^(n + 1) - (1/12)*(-1)^n + (1/3)*Cos[Pi*n/3] - (Sqrt[3]/3)*Sin[Pi*n/3] - 1, {n, 1, 25}]] (* G. C. Greubel, Oct 07 2016 *)
  • PARI
    a(n)=([0,1,0,0,0; 0,0,1,0,0; 0,0,0,1,0; 0,0,0,0,1; -3,4,-1,-3,4]^n*[0;1;5;19;60])[1,1] \\ Charles R Greathouse IV, Oct 08 2016

Formula

a(n+1) - 3*a(n) = 0, 1, 2, 4, 3, 2,... (periodically extended with period length 6) = partial sums of A132367.
a(n) = (1/4)*3^(n+1) - (1/12)*(-1)^n + (1/3)*cos(Pi*n/3) - (sqrt(3)/3)*sin (Pi*n/3) - 1. Or, a(n) = (1/4)*3^(n+1) + (1/4)*[ -3; -5; -7; -5; -3; -1] for n>=0. - Richard Choulet, Jan 02 2008
O.g.f.: x*(1 +x +2*x^2)/((3*x-1)*(x+1)(x^2-x+1)*(x-1)). - R. J. Mathar, Jul 28 2008

Extensions

Edited and extended by R. J. Mathar, Jul 28 2008

A132401 Period 8: repeat 0, 0, 1, 1, 2, -1, -1, -2.

Original entry on oeis.org

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

Views

Author

Paul Curtz, Nov 12 2007

Keywords

Crossrefs

Cf. A132367.

Programs

Showing 1-4 of 4 results.