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-3 of 3 results.

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

A135263 a(n) = 2*A132357(n).

Original entry on oeis.org

2, 8, 28, 82, 244, 728, 2186, 6560, 19684, 59050, 177148, 531440, 1594322, 4782968, 14348908, 43046722, 129140164, 387420488, 1162261466, 3486784400, 10460353204, 31381059610, 94143178828, 282429536480, 847288609442
Offset: 0

Views

Author

Paul Curtz, Dec 02 2007

Keywords

Comments

Digital roots yield a hexaperiodic sequence A010888(a(n))= 2, (8, 1, 1, 1, 8, 8,...), the period of length 6 put in parenthesis. Digital roots of A132357 are also hexaperiodic: 1, (4, 5, 5, 5, 4, 4, ....).

Crossrefs

Cf. A133448 (hexaperiodic sequence of digital roots).

Programs

  • GAP
    a:=[2,8,28,82];; for n in [5..30] do a[n]:=3*a[n-1]-a[n-3]+ 3*a[n-4]; od; a; # G. C. Greubel, Nov 21 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( 2*(1+x+2*x^2)/((1+x)*(1-3*x)*(1-x+x^2)) )); // G. C. Greubel, Nov 21 2019
    
  • Maple
    seq(coeff(series(2*(1+x+2*x^2)/((1+x)*(1-3*x)*(1-x+x^2)), x, n+1), x, n), n = 0..30); # G. C. Greubel, Nov 21 2019
  • Mathematica
    LinearRecurrence[{3,0,-1,3}, {2,8,28,82}, 30] (* G. C. Greubel, Oct 07 2016 *)
  • PARI
    my(x='x+O('x^30)); Vec(2*(1+x+2*x^2)/((1+x)*(1-3*x)*(1-x+x^2))) \\ G. C. Greubel, Nov 21 2019
    
  • Sage
    def A135263_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P(2*(1+x+2*x^2)/((1+x)*(1-3*x)*(1-x+x^2))).list()
    A135263_list(30) # G. C. Greubel, Nov 21 2019
    

Formula

a(n) = 3*a(n-1) - a(n-3) + a(n-4).
G.f.: 2*(1+x+2*x^2)/((1+x)*(1-3*x)*(1-x+x^2)). - Colin Barker, Jun 16 2012

Extensions

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

A135264 a(n) = 3*A132357(n).

Original entry on oeis.org

3, 12, 42, 123, 366, 1092, 3279, 9840, 29526, 88575, 265722, 797160, 2391483, 7174452, 21523362, 64570083, 193710246, 581130732, 1743392199, 5230176600, 15690529806, 47071589415, 141214768242, 423644304720, 1270932914163
Offset: 0

Views

Author

Paul Curtz, Dec 02 2007

Keywords

Comments

Digital roots yield a hexaperiodic sequence A010888(a(n))= 3*A135265(n+1).

Programs

  • GAP
    a:=[3,12,42,123];; for n in [5..30] do a[n]:=3*a[n-1]-a[n-3]+ 3*a[n-4]; od; a; # G. C. Greubel, Nov 21 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( 3*(1+x+2*x^2)/(1-3*x+x^3-3*x^4) )); // G. C. Greubel, Nov 21 2019
    
  • Maple
    seq(coeff(series(3*(1+x+2*x^2)/(1-3*x+x^3-3*x^4), x, n+1), x, n), n = 0..30); # G. C. Greubel, Nov 21 2019
  • Mathematica
    LinearRecurrence[{3,0,-1,3}, {3,12,42,123}, 25] (* G. C. Greubel, Oct 07 2016 *)
  • PARI
    my(x='x+O('x^30)); Vec(3*(1+x+2*x^2)/(1-3*x+x^3-3*x^4)) \\ G. C. Greubel, Nov 21 2019
    
  • Sage
    def A135264_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P(3*(1+x+2*x^2)/(1-3*x+x^3-3*x^4)).list()
    A135264_list(30) # G. C. Greubel, Nov 21 2019
    

Formula

a(n) = 3*a(n-1) - a(n-3) + 3*a(n-4).
G.f.: 3*(1 + x + 2*x^2)/(1 - 3*x + x^3 - 3*x^4). - G. C. Greubel, Oct 07 2016 [corrected by Georg Fischer, May 10 2019]

Extensions

Edited, corrected and extended by R. J. Mathar, Jul 28 2008
Showing 1-3 of 3 results.