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.

Previous Showing 11-14 of 14 results.

A136298 a(n) = 3*a(n-1) - 4*a(n-3), with a(0)=1, a(1)=2, a(2)=4, a(3)=9.

Original entry on oeis.org

1, 2, 4, 9, 19, 41, 87, 185, 391, 825, 1735, 3641, 7623, 15929, 33223, 69177, 143815, 298553, 618951, 1281593, 2650567, 5475897, 11301319, 23301689, 48001479, 98799161, 203190727, 417566265, 857502151, 1759743545, 3608965575
Offset: 0

Views

Author

Paul Curtz, Mar 22 2008

Keywords

Crossrefs

Programs

  • Magma
    [1] cat [(2^(n-2)*(31+3*n) - (-1)^n)/9: n in [1..40]]; // G. C. Greubel, Apr 12 2021
    
  • Mathematica
    LinearRecurrence[{3,0,-4}, {1,2,4,9}, 41] (* G. C. Greubel, Apr 12 2021 *)
  • Sage
    [1]+[(2^(n-2)*(31+3*n) - (-1)^n)/9 for n in (1..40)] # G. C. Greubel, Apr 12 2021

Formula

From R. J. Mathar, Apr 04 2008: (Start)
O.g.f.: (1 -x -2*x^2 +x^3)/((1+x)*(1-2*x)^2).
a(n) = (7*2^n - (-1)^n)/9 + A001787(n+1)/12 if n>0. (End)
From G. C. Greubel, Apr 12 2021: (Start)
a(n) = (2^(n-2)*(3*n+31) - (-1)^n)/9 + (1/4)*[n=0].
E.g.f.: (1/36)*(9 - 4*exp(-x) + (31 + 6*x)*exp(2*x)). (End)

Extensions

More terms from R. J. Mathar, Apr 04 2008

A142474 1 followed by A141015.

Original entry on oeis.org

1, 0, 1, 2, 4, 9, 19, 41, 88, 189, 406, 872, 1873, 4023, 8641, 18560, 39865, 85626, 183916, 395033, 848491, 1822473, 3914488, 8407925, 18059374, 38789712, 83316385, 178955183, 384377665, 825604416, 1773314929, 3808901426, 8181135700, 17572253481, 37743426307
Offset: 1

Views

Author

Roger L. Bagula, Sep 21 2008

Keywords

Comments

Essentially the same as A078039, A141015, and A141683.

Crossrefs

Programs

  • Magma
    [n le 3 select (1-(-1)^n)/2 else Self(n-1) +2*Self(n-2) +Self(n-3): n in [1..50]]; // G. C. Greubel, Apr 14 2021
    
  • Maple
    m:=50; S:=series( x*(1-x-x^2)/(1-x-2*x^2-x^3), x, m+1):
    seq(coeff(S, x, j), j=1..m); # G. C. Greubel, Apr 14 2021
  • Mathematica
    m:= 80; Table[SeriesCoefficient[Series[(1+t)/(1+t+t^3), {t,0,m}], n], {n,0,m,2}]
  • PARI
    Vec(x*(1-x-x^2)/(1-x-2*x^2-x^3) + O(x^50)) \\ Colin Barker, Jun 29 2017
    
  • Sage
    def A142474_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( x*(1-x-x^2)/(1-x-2*x^2-x^3) ).list()
    a=A142474_list(51); a[1:] # G. C. Greubel, Apr 14 2021

Formula

From Colin Barker, Jun 29 2017: (Start)
G.f.: x*(1 - x - x^2) / (1 - x - 2*x^2 - x^3).
a(n) = a(n-1) + 2*a(n-2) + a(n-3) for n>3.
(End)

Extensions

More terms from G. C. Greubel, Jun 26 2017

A084084 Length of lists created by n substitutions k -> Range[0,1+Mod[k+1,3]] starting with {0}.

Original entry on oeis.org

1, 3, 9, 28, 86, 265, 816, 2513, 7739, 23833, 73396, 226030, 696081, 2143648, 6601569, 20330163, 62608681, 192809420, 593775046, 1828587033, 5631308624, 17342153393, 53406819691, 164471408185, 506505428836, 1559831901918
Offset: 0

Views

Author

Wouter Meeussen, May 11 2003

Keywords

Comments

Transformation invert T109 gave a match with A078039; T100 binomial gave a match with A012781; equivalent to replacements 0 -> {0,1,2}; 1 -> {0,1,2,3}; 2 -> {0,1}, 3 -> {0,1,2} operating n times with {0}.

Examples

			{0}, {0,1,2}, {0,1,2,0,1,2,3,0,1}, {0,1,2,0,1,2,3,0,1,0,1,2,0,1,2,3,0,1,0,1,2,0,1,2,0,1,2,3} have lengths 1, 3, 9, 28.
G.f. = 1 + 3*x + 9*x^2 + 28*x^3 + 86*x^4 + 265*x^5 + 816*x^6 + ...
		

Crossrefs

Programs

  • Magma
    [n le 3 select 3^(n-1) else 2*Self(n-1) +3*Self(n-2) +Self(n-3): n in [1..41]]; // G. C. Greubel, Oct 16 2022
    
  • Mathematica
    Length/@Flatten/@NestList[ # /. k_Integer:>Range[0, 1+Mod[k+1, 3]]&, {0}, 8]
    LinearRecurrence[{2,3,1}, {1,3,9}, 41] (* G. C. Greubel, Oct 16 2022 *)
  • SageMath
    def A084084_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1+x)/(1-2*x-3*x^2-x^3) ).list()
    A084084_list(40) # G. C. Greubel, Oct 16 2022

Formula

G.f.: (1+x)/(1-2*x-3*x^2-x^3).
a(n) = A000931(4*n + 6). - Michael Somos, Sep 18 2012

A104029 Triangle, read by rows, of pairwise sums of trinomial coefficients (A027907).

Original entry on oeis.org

1, 2, 1, 3, 5, 1, 4, 13, 9, 1, 5, 26, 35, 14, 1, 6, 45, 96, 75, 20, 1, 7, 71, 216, 267, 140, 27, 1, 8, 105, 427, 750, 623, 238, 35, 1, 9, 148, 770, 1800, 2123, 1288, 378, 44, 1, 10, 201, 1296, 3858, 6046, 5211, 2436, 570, 54, 1, 11, 265, 2067, 7590, 15115, 17303, 11505
Offset: 0

Views

Author

Paul D. Hanna, Feb 26 2005

Keywords

Comments

Matrix inverse is A104030. Antidiagonal sums form unsigned A078039.

Examples

			Row 3: {4,13,9,1} is formed from the pairwise sums
of row 3 of A027907: {1,3, 6,7, 6,3, 1}.
Rows begin:
1;
2, 1;
3, 5, 1;
4, 13, 9, 1;
5, 26, 35, 14, 1;
6, 45, 96, 75, 20, 1;
7, 71, 216, 267, 140, 27, 1;
8, 105, 427, 750, 623, 238, 35, 1;
9, 148, 770, 1800, 2123, 1288, 378, 44, 1;
10, 201, 1296, 3858, 6046, 5211, 2436, 570, 54, 1;
11, 265, 2067, 7590, 15115, 17303, 11505, 4302, 825, 65, 1;
12, 341, 3157, 13959, 34210, 49721, 43923, 23397, 7194, 1155, 77, 1; ...
		

Crossrefs

Programs

  • PARI
    {T(n,k)=polcoeff((1+x+x^2)^n+x*O(x^(2*k)),2*k)+ polcoeff((1+x+x^2)^n+x*O(x^(2*k+1)),2*k+1)}
    for(n=0,10,for(k=0,n,print1(T(n,k),", "));print(""))
    
  • PARI
    {T(n,k)=polcoeff(polcoeff((1-x*y)/(1-2*x*(1+y)+x^2*(1+y+y^2)) +x*O(x^n),n,x)+y*O(y^k),k,y)}

Formula

G.f.: A(x, y) = (1-x*y)/(1 - 2*x*(1+y) + x^2*(1+y+y^2) ).
T(n, k) = [x^(2k)](1+x+x^2)^n + [x^(2k+1)](1+x+x^2)^n.
Previous Showing 11-14 of 14 results.