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

A317497 Triangle T(n,k) = 3*T(n-1,k) + T(n-3,k-1) for k = 0..floor(n/3) with T(0,0) = 1 and T(n,k) = 0 for n or k < 0, read by rows.

Original entry on oeis.org

1, 3, 9, 27, 1, 81, 6, 243, 27, 729, 108, 1, 2187, 405, 9, 6561, 1458, 54, 19683, 5103, 270, 1, 59049, 17496, 1215, 12, 177147, 59049, 5103, 90, 531441, 196830, 20412, 540, 1, 1594323, 649539, 78732, 2835, 15, 4782969, 2125764, 295245, 13608, 135, 14348907, 6908733, 1082565, 61236, 945, 1
Offset: 0

Views

Author

Zagros Lalo, Jul 31 2018

Keywords

Comments

The numbers in rows of the triangle are along a "second layer" of skew diagonals pointing top-left in center-justified triangle given in A013610 ((1+3*x)^n) and along a "second layer" of skew diagonals pointing top-right in center-justified triangle given in A027465 ((3+x)^n), see links. (Note: First layer of skew diagonals in triangles of coefficients in expansions of (1+3*x)^n and (3+x)^n are given in A304236 and A304249 respectively.)
The coefficients in the expansion of 1/(1-3x-x^3) are given by the sequence generated by the row sums.
The row sums give A052541.
If s(n) is the row sum at n, then the ratio s(n)/s(n-1) is approximately 3.1038034027355..., when n approaches infinity.

Examples

			Triangle begins:
         1;
         3;
         9;
        27,        1;
        81,        6;
       243,       27;
       729,      108,       1;
      2187,      405,       9;
      6561,     1458,      54;
     19683,     5103,     270,      1;
     59049,    17496,    1215,     12;
    177147,    59049,    5103,     90;
    531441,   196830,   20412,    540,    1;
   1594323,   649539,   78732,   2835,   15;
   4782969,  2125764,  295245,  13608,  135;
  14348907,  6908733, 1082565,  61236,  945,  1;
  43046721, 22320522, 3897234, 262440, 5670, 18;
		

References

  • Shara Lalo and Zagros Lalo, Polynomial Expansion Theorems and Number Triangles, Zana Publishing, 2018, ISBN: 978-1-9995914-0-3, pp. 364-366

Crossrefs

Row sums give A052541.
Cf. A000244 (column 0), A027471 (column 1), A027472 (column 2), A036216 (column 3), A036217 (column 4).
Sequences of the form 3^(n-q*k)*binomial(n-(q-1)*k, k): A027465 (q=1), A304249 (q=2), this sequence (q=3), A318773 (q=4).

Programs

  • GAP
    Flat(List([0..16],n->List([0..Int(n/3)],k->3^(n-3*k)/(Factorial(n-3*k)*Factorial(k))*Factorial(n-2*k)))); # Muniru A Asiru, Aug 01 2018
    
  • Magma
    [3^(n-3*k)*Binomial(n-2*k,k): k in [0..Floor(n/3)], n in [0..24]]; // G. C. Greubel, May 12 2021
    
  • Mathematica
    T[n_, k_]:= T[n, k] = 3^(n-3k)(n-2k)!/((n-3k)! k!); Table[T[n, k], {n, 0, 15}, {k, 0, Floor[n/3]} ]//Flatten
    T[0, 0] = 1; T[n_, k_]:= T[n, k] = If[n<0 || k<0, 0, 3 T[n-1, k] + T[n-3, k-1]]; Table[T[n, k], {n, 0, 15}, {k, 0, Floor[n/3]}]//Flatten
  • Sage
    flatten([[3^(n-3*k)*binomial(n-2*k,k) for k in (0..n//3)] for n in (0..24)]) # G. C. Greubel, May 12 2021

Formula

T(n,k) = 3^(n-3*k) * (n-2*k)!/(k! * (n-3*k)!) where n is a nonnegative integer and k = 0..floor(n/3).

A117716 Triangle T(n,k) read by rows: the coefficient [x^n] of x^2/(1-(k+1)*x-x^3) in row n, columns 0 <= k <= n.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 1, 2, 3, 4, 1, 4, 9, 16, 25, 2, 9, 28, 65, 126, 217, 3, 20, 87, 264, 635, 1308, 2415, 4, 44, 270, 1072, 3200, 7884, 16954, 32960, 6, 97, 838, 4353, 16126, 47521, 119022, 264193, 534358, 9, 214, 2601, 17676, 81265, 286434, 835569, 2117656, 4815801, 10050030
Offset: 0

Views

Author

Roger L. Bagula, Apr 13 2006, corrected Apr 15 2006

Keywords

Examples

			Triangle begins as:
  0;
  0,  0;
  1,  1,   1;
  1,  2,   3,    4;
  1,  4,   9,   16,   25;
  2,  9,  28,   65,  126,  217;
  3, 20,  87,  264,  635, 1308,  2415;
  4, 44, 270, 1072, 3200, 7884, 16954, 32960;
		

Crossrefs

Cf. A000930 (column 0), A008998 (column 1), A052541 (column 2), A052927 (column 3), A001093 (row 5), A185065 (row 6), A117715, A117724.

Programs

  • Magma
    m:=12;
    R:=PowerSeriesRing(Integers(), m+2);
    A117716:= func< n,k | Coefficient(R!( x^2/(1-(k+1)*x-x^3) ), n) >;
    [[A117716(n,k): k in [0..n]]: n in [0..m]]; // G. C. Greubel, Jul 23 2023
    
  • Maple
    A117716 := proc(n,m)
            x^2/(1-(m+1)*x-x^3) ;
            if n < 0 then
                    0;
            else
                    coeftayl(%,x=0,n) ;
            end if;
    end proc: # R. J. Mathar, May 14 2013
  • Mathematica
    T[n_, k_]:= T[n, k]= Coefficient[Series[x^2/(1-(k+1)*x-x^3), {x,0,n+ 2}], x, n];
    Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten
  • SageMath
    def A117716(n,k):
        P. = PowerSeriesRing(QQ)
        return P( x^2/(1-(k+1)*x-x^3) ).list()[n]
    flatten([[A117716(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Jul 23 2023

Extensions

Edited by G. C. Greubel, Jul 23 2023

A098590 a(n) = 4^n for n = 0..3; for n > 3, a(n) = 4*a(n-1) + a(n-4).

Original entry on oeis.org

1, 4, 16, 64, 257, 1032, 4144, 16640, 66817, 268300, 1077344, 4326016, 17370881, 69751824, 280084640, 1124664576, 4516029185, 18133868564, 72815558896, 292386900160, 1174063629825, 4714388387864, 18930369110352, 76013863341568
Offset: 0

Views

Author

Paul Barry, Sep 16 2004

Keywords

Comments

a(n) equals the number of n-length words on {0,1,2,3,4} such that 0 appears only in a run which length is a multiple of 4. - Milan Janjic, Feb 17 2015

Crossrefs

Cf. A052541.

Programs

  • Magma
    I:=[0,1,4,16]; [n le 4 select I[n] else 4*Self(n-1) +Self(n-4): n in [1..30]]; // G. C. Greubel, Feb 03 2018
  • Maple
    K:=1/(1+4*z-z^4): Kser:=series(K, z=0, 30): seq(abs(coeff(Kser, z, n)), n= 0..23); # Zerinvary Lajos, Nov 08 2007
  • Mathematica
    CoefficientList[Series[1/(1 - 4*x - x^4), {x, 0, 25}], x] (* Zerinvary Lajos, Mar 29 2007 *)
    LinearRecurrence[{4,0,0,1},{0,1,4,16},30] (* Harvey P. Dale, Jul 22 2014 *)
  • PARI
    x='x+O('x^30); Vec(1/(1-4*x-x^4)) \\ G. C. Greubel, Feb 03 2018
    

Formula

G.f.: 1/(1-4*x-x^4).
a(n) = Sum_{k=0..floor(n/3)} binomial(n-3*k, k) * 4^(n-4*k).

A052668 Expansion of e.g.f. 1/(1 - 3*x - x^3).

Original entry on oeis.org

1, 3, 18, 168, 2088, 32400, 603360, 13109040, 325503360, 9092684160, 282219033600, 9635476435200, 358879494758400, 14480588157235200, 629228583138355200, 29295027261916416000, 1454816084780298240000
Offset: 0

Views

Author

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

Keywords

Crossrefs

Cf. A052541.

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 40); Coefficients(R!(Laplace( 1/(1-3*x-x^3) ))); // G. C. Greubel, Sep 03 2022
    
  • Maple
    spec := [S,{S=Sequence(Union(Z,Z,Z,Prod(Z,Z,Z)))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    a[n_]:= a[n]= If[n<3, 3^n*n!, 3*n*a[n-1] + n*(n-1)*(n-2)*a[n-3]];
    Table[a[n], {n, 0, 40}] (* G. C. Greubel, Sep 03 2022 *)
  • SageMath
    def A052668_list(prec):
        P. = PowerSeriesRing(QQ, prec)
        return P( 1/(1-3*x-x^3) ).egf_to_ogf().list()
    A052668_list(40) # G. C. Greubel, Sep 03 2022

Formula

E.g.f.: 1/(1-3*x-x^3).
a(n) = 3*n*a(n-1) + n*(n-1)*(n-2)*a(n-3), a(0)=1, a(1)=3, a(2)=18.
a(n) = (n!/15) * Sum_{alpha=RootOf(-1+3*_Z+_Z^3)} (4 + alpha + 2*alpha^2) * alpha^(-1-n).
a(n) = n!*A052541(n). - R. J. Mathar, Nov 27 2011

A098589 a(n) = 3*a(n-1) + 2*a(n-3), with a(0)=1, a(1)=3.

Original entry on oeis.org

1, 3, 9, 29, 93, 297, 949, 3033, 9693, 30977, 98997, 316377, 1011085, 3231249, 10326501, 33001673, 105467517, 337055553, 1077170005, 3442445049, 11001446253, 35158678769, 112360926405, 359085671721, 1147574372701
Offset: 0

Views

Author

Paul Barry, Sep 16 2004

Keywords

Crossrefs

Cf. A052541.

Programs

  • Magma
    I:=[1,3,9]; [n le 3 select I[n] else 3*Self(n-1) + 2*Self(n-3): n in [1..30]]; // G. C. Greubel, Feb 03 2018
  • Mathematica
    CoefficientList[Series[1/(1-3*x-2*x^3), {x,0,50}], x] (* or *) LinearRecurrence[{3,0,2},{1,3,9}, 50] (* G. C. Greubel, Feb 03 2018 *)
  • PARI
    x='x+O('x^30); Vec(1/(1-3*x-2*x^3)) \\ G. C. Greubel, Feb 03 2018
    

Formula

G.f.: 1/(1-3*x-2*x^3).
a(n) = Sum_{k=0..floor(n/2)} Sum_{i=0..n} Sum_{j=0..i} C(n-2*k,i)*C(i,j) *C(j, k)*2^k.

A183188 a(n) = 3*a(n-1) + a(n-3) with a(0)=1, a(1)=2, a(2)=6.

Original entry on oeis.org

1, 2, 6, 19, 59, 183, 568, 1763, 5472, 16984, 52715, 163617, 507835, 1576220, 4892277, 15184666, 47130218, 146282931, 454033459, 1409230595, 4373974716, 13575957607, 42137103416, 130785284964, 405931812499, 1259932540913, 3910582907703, 12137680535608
Offset: 0

Views

Author

Philippe Deléham, Dec 14 2011

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3,0,1},{1,2,6},30] (* Harvey P. Dale, Nov 02 2024 *)

Formula

G.f.: (1-x)/(1-3*x-x^3).
a(n) = A052541(n) - A051541(n-1). - R. J. Mathar, Dec 15 2011

Extensions

Corrected by R. J. Mathar, Dec 15 2011
Showing 1-6 of 6 results.