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

A036216 Expansion of 1/(1 - 3*x)^4; 4-fold convolution of A000244 (powers of 3).

Original entry on oeis.org

1, 12, 90, 540, 2835, 13608, 61236, 262440, 1082565, 4330260, 16888014, 64481508, 241805655, 892820880, 3252418920, 11708708112, 41712272649, 147219785820, 515269250370, 1789882659180, 6175095174171, 21171754882872
Offset: 0

Views

Author

Keywords

Comments

With three leading zeros, 3rd binomial transform of (0,0,0,1,0,0,0,0,...). - Paul Barry, Mar 07 2003
Number of n-permutations (n=4) of 4 objects u, v, w, z, with repetition allowed, containing exactly three u's. - Zerinvary Lajos, May 23 2008

Crossrefs

Cf. A027465.
Sequences of the form 3^n*binomial(n+m, m): A000244 (m=0), A027471 (m=1), A027472 (m=2), this sequence (m=3), A036217 (m=4), A036219 (m=5), A036220 (m=6), A036221 (m=7), A036222 (m=8), A036223 (m=9), A172362 (m=10).

Programs

  • Magma
    [3^n* Binomial(n+3, 3): n in [0..30]]; // Vincenzo Librandi, Oct 14 2011
    
  • Maple
    seq(3^n*binomial(n+3, 3), n=0..30)]; # Zerinvary Lajos, Dec 21 2006
  • Mathematica
    CoefficientList[Series[1/(1-3x)^4,{x,0,30}],x] (* or *) LinearRecurrence[ {12,-54,108,-81},{1,12,90,540},30] (* Harvey P. Dale, Jul 27 2017 *)
  • PARI
    a(n) = 3^n*binomial(n+3, 3) \\ Charles R Greathouse IV, Oct 03 2016
  • Sage
    [3^n*binomial(n+3,3) for n in range(30)] # Zerinvary Lajos, Mar 10 2009
    

Formula

a(n) = 3^n*binomial(n+3, 3).
a(n) = A027465(n+4, 4).
G.f.: 1/(1 - 3*x)^4.
With three leading zeros, a(n) = 12*a(n-1) - 54*a(n-2) + 108*a(n-3) - 81*a(n-4), a(0) = a(1) = a(2) = 0, a(3) = 1. - Paul Barry, Mar 07 2003
With three leading zeros, C(n, 3)*3^(n-3) is the second binomial transform of C(n, 3). - Paul Barry, Jul 24 2003
E.g.f.: (1/2)*(2 + 18*x + 27*x^2 + 9*x^3)*exp(3*x). - Franck Maminirina Ramaharo, Nov 23 2018
From Amiram Eldar, Jan 05 2022: (Start)
Sum_{n>=0} 1/a(n) = 36*log(3/2) - 27/2.
Sum_{n>=0} (-1)^n/a(n) = 144*log(4/3) - 81/2. (End)

A013610 Triangle of coefficients in expansion of (1+3*x)^n.

Original entry on oeis.org

1, 1, 3, 1, 6, 9, 1, 9, 27, 27, 1, 12, 54, 108, 81, 1, 15, 90, 270, 405, 243, 1, 18, 135, 540, 1215, 1458, 729, 1, 21, 189, 945, 2835, 5103, 5103, 2187, 1, 24, 252, 1512, 5670, 13608, 20412, 17496, 6561, 1, 27, 324, 2268, 10206, 30618, 61236, 78732, 59049, 19683
Offset: 0

Views

Author

Keywords

Comments

T(n,k) is the number of lattice paths from (0,0) to (n,k) with steps (1,0) and three kinds of steps (1,1). The number of paths with steps (1,0) and s kinds of steps (1,1) corresponds to the expansion of (1+s*x)^n. - Joerg Arndt, Jul 01 2011
Rows of A027465 reversed. - Michael Somos, Feb 14 2002
T(n,k) equals the number of n-length words on {0,1,2,3} having n-k zeros. - Milan Janjic, Jul 24 2015
T(n-1,k-1) is the number of 3-compositions of n with zeros having k positive parts; see Hopkins & Ouvry reference. - Brian Hopkins, Aug 16 2020

Examples

			Triangle begins
  1;
  1,    3;
  1,    6,    9;
  1,    9,   27,   27;
  1,   12,   54,  108,   81;
  1,   15,   90,  270,  405,  243;
  1,   18,  135,  540, 1215, 1458,  729;
  1,   21,  189,  945, 2835, 5103, 5103, 2187;
		

Crossrefs

Cf. A007318, A013609, A027465, etc.
Diagonals of the triangle: A000244 (k=n), A027471 (k=n-1), A027472 (k=n-2), A036216 (k=n-3), A036217 (k=n-4), A036219 (k=n-5), A036220 (k=n-6), A036221 (k=n-7), A036222 (k=n-8), A036223 (k=n-9), A172362 (k=n-10).

Programs

  • Haskell
    a013610 n k = a013610_tabl !! n !! k
    a013610_row n = a013610_tabl !! n
    a013610_tabl = iterate (\row ->
       zipWith (+) (map (* 1) (row ++ [0])) (map (* 3) ([0] ++ row))) [1]
    -- Reinhard Zumkeller, May 26 2013
    
  • Magma
    [3^k*Binomial(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, May 19 2021
    
  • Maple
    T:= n-> (p-> seq(coeff(p, x, k), k=0..n))((1+3*x)^n):
    seq(T(n), n=0..10);  # Alois P. Heinz, Jul 25 2015
  • Mathematica
    t[n_, k_] := Binomial[n, k]*3^(n-k); Table[t[n, n-k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Mar 05 2013 *)
    BinomialROW[n_, k_, t_] := Sum[Binomial[n, k]*Binomial[k, j]*(-1)^(k - j)*t^j, {j, 0, k}]; Column[Table[BinomialROW[n, k, 4], {n, 0, 10}, {k, 0, n}], Center] (* Kolosov Petro, Jan 28 2019 *)
    T[0, 0] := 1; T[n_, k_]/;0<=k<=n := T[n, k] = 3T[n-1, k-1]+T[n-1, k]; T[n_, k_] := 0; Flatten@Table[T[n, k], {n, 0, 7}, {k, 0, n}] (* Oliver Seipel, Jan 26 2025 *)
  • PARI
    {T(n, k) = polcoeff((1 + 3*x)^n, k)}; /* Michael Somos, Feb 14 2002 */
    
  • PARI
    /* same as in A092566 but use */
    steps=[[1,0], [1,1], [1,1], [1,1]]; /* note triple [1,1] */
    /* Joerg Arndt, Jul 01 2011 */
    
  • Sage
    flatten([[3^k*binomial(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 19 2021

Formula

G.f.: 1 / (1 - x*(1+3*y)).
Row sums are 4^n. - Joerg Arndt, Jul 01 2011
T(n,k) = 3^k*C(n,k) = Sum_{i=n-k..n} C(i,n-k)*C(n,i)*2^(n-i). - Mircea Merca, Apr 28 2012
From Peter Bala, Dec 22 2014: (Start)
Riordan array ( 1/(1 - x), 3*x/(1 - x) ).
exp(3*x) * e.g.f. for row n = e.g.f. for diagonal n. For example, for n = 3 we have exp(3*x)*(1 + 9*x + 27*x^2/2! + 27*x^3/3!) = 1 + 12*x + 90*x^2/2! + 540*x^3/3! + 2835*x^4/4! + .... The same property holds more generally for Riordan arrays of the form ( f(x), 3*x/(1 - x) ). (End)
T(n,k) = Sum_{j=0..k} (-1)^(k-j) * binomial(n,k) * binomial(k,j) * 4^j. - Kolosov Petro, Jan 28 2019
T(0,0)=1, T(n,k)=3*T(n-1,k-1)+T(n-1,k) for 0<=k<=n, T(n,k)=0 for k<0 or k>n. - Oliver Seipel, Feb 10 2025

A036217 Expansion of 1/(1-3*x)^5; 5-fold convolution of A000244 (powers of 3).

Original entry on oeis.org

1, 15, 135, 945, 5670, 30618, 153090, 721710, 3247695, 14073345, 59108049, 241805655, 967222620, 3794488740, 14635885140, 55616363532, 208561363245, 772903875555, 2833980877035, 10291825290285, 37050571045026
Offset: 0

Views

Author

Keywords

Comments

With a different offset, number of n-permutations (n=5) of 4 objects: u, v, z, x with repetition allowed, containing exactly four (4) u's. Example: a(1)=15 because we have uuuuv uuuvu uuvuu uvuuu vuuuu uuuuz uuuzu uuzuu uzuuu zuuuu uuuux uuuxu uuxuu uxuuu xuuuu. - Zerinvary Lajos, Jun 12 2008

Crossrefs

Sequences of the form 3^n*binomial(n+m, m): A000244 (m=0), A027471 (m=1), A027472 (m=2), A036216 (m=3), this sequence (m=4), A036219 (m=5), A036220 (m=6), A036221 (m=7), A036222 (m=8), A036223 (m=9), A172362 (m=10).

Programs

  • Magma
    [3^n* Binomial(n+4, 4): n in [0..30]]; // Vincenzo Librandi, Oct 14 2011
  • Maple
    seq(3^n*binomial(n+4,4), n=0..30); # Zerinvary Lajos, Jun 12 2008
  • Mathematica
    CoefficientList[Series[1/(1-3x)^5,{x,0,30}],x] (* Harvey P. Dale, Jun 13 2017 *)
  • Sage
    [3^n*binomial(n+4,4) for n in range(30)] # Zerinvary Lajos, Mar 10 2009
    

Formula

a(n) = 3^n*binomial(n+4, 4) = 3^n*A000332(n+4).
a(n) = A027465(n+5, 5).
G.f.: 1/(1-3*x)^5.
E.g.f.: (1/8)*(8 +96*x +216*x^2 +144*x^3 +27*x^4)*exp(3*x). - G. C. Greubel, May 19 2021
From Amiram Eldar, Sep 22 2022: (Start)
Sum_{n>=0} 1/a(n) = 40 - 96*log(3/2).
Sum_{n>=0} (-1)^n/a(n) = 768*log(4/3) - 220. (End)

A036219 Expansion of 1/(1-3*x)^6; 6-fold convolution of A000244 (powers of 3).

Original entry on oeis.org

1, 18, 189, 1512, 10206, 61236, 336798, 1732104, 8444007, 39405366, 177324147, 773778096, 3288556908, 13660159464, 55616363532, 222465454128, 875957725629, 3400777052442, 13036312034361, 49400761393368, 185252855225130, 688082033693340, 2533392942234570
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A027465.
Sequences of the form 3^n*binomial(n+m, m): A000244 (m=0), A027471 (m=1), A027472 (m=2), A036216 (m=3), A036217 (m=4), this sequence (m=5), A036220 (m=6), A036221 (m=7), A036222 (m=8), A036223 (m=9), A172362 (m=10).

Programs

  • Magma
    [3^n*Binomial(n+5, 5): n in [0..30]]; // Vincenzo Librandi, Oct 15 2011
  • Maple
    seq(3^n*binomial(n+5,5), n=0..30); # Zerinvary Lajos, Jun 13 2008
  • Mathematica
    Table[3^n*Binomial[n+5, 5], {n, 0, 30}] (* G. C. Greubel, May 19 2021 *)
    CoefficientList[Series[1/(1-3x)^6,{x,0,30}],x] (* or *) LinearRecurrence[ {18,-135,540,-1215,1458,-729},{1,18,189,1512,10206,61236},30] (* Harvey P. Dale, Jan 02 2022 *)
  • Sage
    [3^n*binomial(n+5,5) for n in range(30)] # Zerinvary Lajos, Mar 10 2009
    

Formula

a(n) = 3^n*binomial(n+5, 5).
a(n) = A027465(n+6, 6).
G.f.: 1/(1-3*x)^6.
E.g.f.: (1/40)*(40 + 600*x + 1800*x^2 + 1800*x^3 + 675*x^4 + 81*x^5)*exp(3*x). - G. C. Greubel, May 19 2021
From Amiram Eldar, Sep 22 2022: (Start)
Sum_{n>=0} 1/a(n) = 240*log(3/2) - 385/4.
Sum_{n>=0} (-1)^n/a(n) = 3840*log(4/3) - 4415/4. (End)

A036220 Expansion of 1/(1-3*x)^7; 7-fold convolution of A000244 (powers of 3).

Original entry on oeis.org

1, 21, 252, 2268, 17010, 112266, 673596, 3752892, 19702683, 98513415, 472864392, 2192371272, 9865670724, 43257171636, 185387878440, 778629089448, 3211844993973, 13036312034361, 52145248137444, 205836505805700, 802762372642230, 3096369151620030
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A027465.
Sequences of the form 3^n*binomial(n+m, m): A000244 (m=0), A027471 (m=1), A027472 (m=2), A036216 (m=3), A036217 (m=4), A036219 (m=5), this sequence (m=6), A036221 (m=7), A036222 (m=8), A036223 (m=9), A172362 (m=10).

Programs

  • Magma
    [3^n*Binomial(n+6, 6): n in [0..30]]; // Vincenzo Librandi, Oct 15 2011
  • Maple
    seq(3^n*binomial(n+6,6), n=0..20); # Zerinvary Lajos, Jun 16 2008
  • Mathematica
    Table[3^n*Binomial[n+6, 6], {n,0,30}] (* G. C. Greubel, May 19 2021 *)
  • Sage
    [3^n*binomial(n+6,6) for n in range(30)] # Zerinvary Lajos, Mar 10 2009
    

Formula

a(n) = 3^n*binomial(n+6, 6).
a(n) = A027465(n+7,7).
G.f.: 1/(1-3*x)^7.
E.g.f.: (1/80)*(80 + 1440*x + 5400*x^2 + 7200*x^3 + 4050*x^4 + 972*x^5 + 81*x^6)*exp(3*x). - G. C. Greubel, May 19 2021
From Amiram Eldar, Sep 22 2022: (Start)
Sum_{n>=0} 1/a(n) = 1173/5 - 576*log(3/2).
Sum_{n>=0} (-1)^n/a(n) = 18432*log(4/3) - 26508/5. (End)

A036221 Expansion of 1/(1-3*x)^8; 8-fold convolution of A000244 (powers of 3).

Original entry on oeis.org

1, 24, 324, 3240, 26730, 192456, 1250964, 7505784, 42220035, 225173520, 1148384952, 5637526128, 26778249108, 123591918960, 556163635320, 2447119995408, 10553204980197, 44695926974952, 186233029062300
Offset: 0

Views

Author

Keywords

Comments

With a different offset, number of n-permutations (n>=7) of 4 objects: u, v, z, x with repetition allowed, containing exactly seven (7) u's. Example: a(1)=24 because we have uuuuuuuv, uuuuuuuz, uuuuuuux, uuuuuuvu, uuuuuuzu, uuuuuuxu, uuuuuvuu, uuuuuzuu, uuuuuxuu, uuuuvuuu, uuuuzuuu, uuuuxuuu, uuuvuuuu, uuuzuuuu, uuuxuuuu, uuvuuuuu, uuzuuuuu, uuxuuuuu, uvuuuuuu, uzuuuuuu, uxuuuuuu, vuuuuuuu, zuuuuuuu, xuuuuuuu. - Zerinvary Lajos, Jun 23 2008

Crossrefs

Cf. A027465.
Sequences of the form 3^n*binomial(n+m, m): A000244 (m=0), A027471 (m=1), A027472 (m=2), A036216 (m=3), A036217 (m=4), A036219 (m=5), A036220 (m=6), this sequence (m=7), A036222 (m=8), A036223 (m=9), A172362 (m=10).

Programs

  • Magma
    [3^n*Binomial(n+7, 7): n in [0..30]]; // Vincenzo Librandi, Oct 15 2011
  • Maple
    seq(3^n*binomial(n+7,7), n=0..30); # Zerinvary Lajos, Jun 23 2008
  • Mathematica
    Table[3^n*Binomial[n+7,7], {n,0,30}] (* G. C. Greubel, May 19 2021 *)
  • Sage
    [3^n*binomial(n+7, 7) for n in range(30)] # Zerinvary Lajos, Mar 13 2009
    

Formula

a(n) = 3^n*binomial(n+7, 7).
a(n) = A027465(n+8, 8.)
G.f.: 1/(1-3*x)^8.
E.g.f.: (1/560)*(560 +11760*x +52920*x^2 +88200*x^3 +66150*x^4 +23814*x^5 +3969*x^6 +243*x^7)*exp(3*x). - G. C. Greubel, May 19 2021
From Amiram Eldar, Sep 22 2022: (Start)
Sum_{n>=0} 1/a(n) = 1344*log(3/2) - 5439/10.
Sum_{n>=0} (-1)^n/a(n) = 86016*log(4/3) - 247443/10. (End)

A036222 Expansion of 1/(1-3*x)^9; 9-fold convolution of A000244 (powers of 3).

Original entry on oeis.org

1, 27, 405, 4455, 40095, 312741, 2189187, 14073345, 84440070, 478493730, 2583866142, 13389124554, 66945622770, 324428787270, 1529449997130, 7035469986798, 31659614940591, 139674771796725, 605257344452475
Offset: 0

Views

Author

Keywords

Comments

With a different offset, number of n-permutations (n>=8) of 4 objects: u, v, z, x with repetition allowed, containing exactly eight (8) u's. Example: a(1)=27 because we have uuuuuuuuv, uuuuuuuuz, uuuuuuuux, uuuuuuuvu, uuuuuuuzu, uuuuuuuxu, uuuuuuvuu, uuuuuuzuu, uuuuuuxuu, uuuuuvuuu, uuuuuzuuu, uuuuuxuuu, uuuuvuuuu, uuuuzuuuu, uuuuxuuuu, uuuvuuuuu, uuuzuuuuu, uuuxuuuuu, uuvuuuuuu, uuzuuuuuu, uuxuuuuuu, uvuuuuuuu, uzuuuuuuu, uxuuuuuuu, vuuuuuuuu, zuuuuuuuu, xuuuuuuuu. - Zerinvary Lajos, Jun 23 2008

Crossrefs

Cf. A027465.
Sequences of the form 3^n*binomial(n+m, m): A000244 (m=0), A027471 (m=1), A027472 (m=2), A036216 (m=3), A036217 (m=4), A036219 (m=5), A036220 (m=6), A036221 (m=7), this sequence (m=8), A036223 (m=9), A172362 (m=10).

Programs

  • Magma
    [3^n*Binomial(n+8, 8): n in [0..30]]; // Vincenzo Librandi, Oct 15 2011
  • Maple
    seq(3^n*binomial(n+8,8), n=0..18); # Zerinvary Lajos, Jun 23 2008
  • Mathematica
    Table[3^n*Binomial[n+8, 8], {n, 0, 20}] (* Zerinvary Lajos, Jan 31 2010 *)
    CoefficientList[Series[1/(1-3x)^9,{x,0,30}],x] (* or *) LinearRecurrence[{27,-324, 2268,-10206,30618,-61236,78732,-59049,19683}, {1,27,405,4455,40095,312741, 2189187,14073345,84440070}, 30] (* Harvey P. Dale, Jan 07 2016 *)
  • Sage
    [3^n*binomial(n+8, 8) for n in range(30)] # Zerinvary Lajos, Mar 13 2009
    

Formula

a(n) = 3^n*binomial(n+8, 8).
a(n) = A027465(n+9, 9).
G.f.: 1/(1-3*x)^9.
a(0)=1, a(1)=27, a(2)=405, a(3)=4455, a(4)=40095, a(5)=312741, a(6)=2189187, a(7)=14073345, a(8)=84440070, a(n) = 27*a(n-1) - 324*a(n-2) + 2268*a(n-3) - 10206*a(n-4) + 30618*a(n-5) - 61236*a(n-6) + 78732*a(n-7) - 59049*a(n-8) + 19683*a(n-9). - Harvey P. Dale, Jan 07 2016
From Amiram Eldar, Sep 22 2022: (Start)
Sum_{n>=0} 1/a(n) = 43632/35 - 3072*log(3/2).
Sum_{n>=0} (-1)^n/a(n) = 393216*log(4/3) - 3959208/35. (End)

A036223 Expansion of 1/(1-3*x)^10; 10-fold convolution of A000244 (powers of 3).

Original entry on oeis.org

1, 30, 495, 5940, 57915, 486486, 3648645, 25019280, 159497910, 956987460, 5454828522, 29753610120, 156206453130, 793048146660, 3908594437110, 18761253298128, 87943374834975, 403504896301650, 1815772033357425
Offset: 0

Views

Author

Keywords

Comments

With a different offset, number of n-permutations (n >= 9) of 4 objects: u, v, z, x with repetition allowed, containing exactly nine (9) u's. - Zerinvary Lajos, Jul 02 2008

Crossrefs

Cf. A027465.
Sequences of the form 3^n*binomial(n+m, m): A000244 (m=0), A027471 (m=1), A027472 (m=2), A036216 (m=3), A036217 (m=4), A036219 (m=5), A036220 (m=6), A036221 (m=7), A036222 (m=8), this sequence (m=9), A172362 (m=10).

Programs

  • Magma
    [3^n*Binomial(n+9, 9): n in [0..30]]; // Vincenzo Librandi, Oct 15 2011
  • Maple
    seq(3^n*binomial(n+9, 9), n=0..20); # Zerinvary Lajos, Jul 02 2008
  • Mathematica
    Table[3^n*Binomial[n+9,9], {n,0,30}] (* G. C. Greubel, May 18 2021 *)
    CoefficientList[Series[1/(1-3x)^10,{x,0,30}],x] (* or *) LinearRecurrence[ {30,-405,3240,-17010,61236,-153090,262440,-295245,196830,-59049},{1,30,495,5940,57915,486486,3648645,25019280,159497910,956987460},30] (* Harvey P. Dale, Jan 16 2022 *)
  • Sage
    [3^n*binomial(n+9,9) for n in range(30)] # Zerinvary Lajos, Mar 13 2009
    

Formula

a(n) = 3^n*binomial(n+9, 9).
a(n) = A027465(n+10, 10).
G.f.: 1/(1-3*x)^10.
E.g.f.: (4480 + 120960*x + 725760*x^2 + 1693440*x^3 + 1905120*x^4 + 1143072*x^5 + 381024*x^6 + 69984*x^7 + 6561*x^8 + 243*x^9)*exp(3*x)/4480. - G. C. Greubel, May 18 2021
From Amiram Eldar, Sep 22 2022: (Start)
Sum_{n>=0} 1/a(n) = 6912*log(3/2) - 784431/280.
Sum_{n>=0} (-1)^n/a(n) = 1769472*log(4/3) - 142532433/280. (End)

A038221 Triangle whose (i,j)-th entry is binomial(i,j)*3^(i-j)*3^j.

Original entry on oeis.org

1, 3, 3, 9, 18, 9, 27, 81, 81, 27, 81, 324, 486, 324, 81, 243, 1215, 2430, 2430, 1215, 243, 729, 4374, 10935, 14580, 10935, 4374, 729, 2187, 15309, 45927, 76545, 76545, 45927, 15309, 2187, 6561, 52488, 183708, 367416, 459270, 367416, 183708, 52488, 6561
Offset: 0

Views

Author

Keywords

Comments

Triangle of coefficients in expansion of (3 + 3x)^n = 3^n (1 +x)^n, where n is a nonnegative integer. (Coefficients in expansion of (1 +x)^n are given in A007318: Pascal's triangle). - Zagros Lalo, Jul 23 2018

Examples

			Triangle begins as:
     1;
     3,     3;
     9,    18,      9;
    27,    81,     81,     27;
    81,   324,    486,    324,     81;
   243,  1215,   2430,   2430,   1215,    243;
   729,  4374,  10935,  14580,  10935,   4374,    729;
  2187, 15309,  45927,  76545,  76545,  45927,  15309,  2187;
  6561, 52488, 183708, 367416, 459270, 367416, 183708, 52488, 6561;
		

References

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

Crossrefs

Columns k: A000244 (k=0), 3*A027471 (k=1), 3^2*A027472 (k=2), 3^3*A036216 (k=3), 3^4*A036217 (k=4), 3^5*A036219 (k=5), 3^6*A036220 (k=6), 3^7*A036221 (k=7), 3^8*A036222 (k=8), 3^9*A036223 (k=9), 3^10*A172362 (k=10).

Programs

  • GAP
    Flat(List([0..8],i->List([0..i],j->Binomial(i,j)*3^(i-j)*3^j))); # Muniru A Asiru, Jul 23 2018
    
  • Haskell
    a038221 n = a038221_list !! n
    a038221_list = concat $ iterate ([3,3] *) [1]
    instance Num a => Num [a] where
       fromInteger k = [fromInteger k]
       (p:ps) + (q:qs) = p + q : ps + qs
       ps + qs         = ps ++ qs
       (p:ps) * qs'@(q:qs) = p * q : ps * qs' + [p] * qs
        *                = []
    -- Reinhard Zumkeller, Apr 02 2011
    
  • Magma
    [3^n*Binomial(n,k): k in [0..n], n in [0..10]]; // G. C. Greubel, Oct 17 2022
    
  • Mathematica
    (* programs from Zagros Lalo, Jul 23 2018 *)
    t[0, 0]=1; t[n_, k_]:= t[n, k]= If[n<0 || k<0, 0, 3 t[n-1, k] + 3 t[n-1, k-1]]; Table[t[n, k], {n,0,10}, {k,0,n}]//Flatten
    Table[CoefficientList[Expand[3^n *(1+x)^n], x], {n,0,10}]//Flatten
    Table[3^n Binomial[n, k], {n,0,10}, {k,0,n}]//Flatten  (* End *)
  • SageMath
    def A038221(n,k): return 3^n*binomial(n,k)
    flatten([[A038221(n,k) for k in range(n+1)] for n in range(10)]) # G. C. Greubel, Oct 17 2022

Formula

G.f.: 1/(1 - 3*x - 3*x*y). - Ilya Gutkovskiy, Apr 21 2017
T(0,0) = 1; T(n,k) = 3 T(n-1,k) + 3 T(n-1,k-1) for k = 0...n; T(n,k)=0 for n or k < 0. - Zagros Lalo, Jul 23 2018
From G. C. Greubel, Oct 17 2022: (Start)
T(n, k) = T(n, n-k).
T(n, n) = A000244(n).
T(n, n-1) = 3*A027471(n).
T(n, n-2) = 9*A027472(n+1).
T(n, n-3) = 27*A036216(n-3).
T(n, n-4) = 81*A036217(n-4).
T(n, n-5) = 243*A036219(n-5).
Sum_{k=0..n} T(n, k) = A000400(n).
Sum_{k=0..n} (-1)^k * T(n, k) = A000007(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A030195(n+1), n >= 0.
Sum_{k=0..floor(n/2)} (-1)^k * T(n-k, k) = A057083(n).
T(n, k) = 3^k * A027465(n, k). (End)

A099097 Riordan array (1, 3+x).

Original entry on oeis.org

1, 0, 3, 0, 1, 9, 0, 0, 6, 27, 0, 0, 1, 27, 81, 0, 0, 0, 9, 108, 243, 0, 0, 0, 1, 54, 405, 729, 0, 0, 0, 0, 12, 270, 1458, 2187, 0, 0, 0, 0, 1, 90, 1215, 5103, 6561, 0, 0, 0, 0, 0, 15, 540, 5103, 17496, 19683, 0, 0, 0, 0, 0, 1, 135, 2835, 20412, 59049, 59049, 0, 0, 0, 0, 0, 0, 18, 945, 13608, 78732, 196830, 177147
Offset: 0

Views

Author

Paul Barry, Sep 25 2004

Keywords

Comments

Row sums are A006190(n+1). Diagonal sums are A052931. The Riordan array (1, s+tx) defines T(n,k) = binomial(k,n-k)*s^k*(t/s)^(n-k). The row sums satisfy a(n) = s*a(n-1) + t*a(n-2) and the diagonal sums satisfy a(n) = s*a(n-2) + t*a(n-3).
Triangle T(n,k), 0 <= k <= n, read by rows given by [0, 1/3, -1/3, 0, 0, 0, 0, 0, ...] DELTA [3, 0, 0, 0, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938. - Philippe Deléham, Nov 10 2008

Examples

			Triangle begins:
  1;
  0, 3;
  0, 1, 9;
  0, 0, 6, 27;
  0, 0, 1, 27,  81;
  0, 0, 0,  9, 108, 243;
  ...
		

Crossrefs

Cf. A027465.
Diagonals are of the form 3^n*binomial(n+m, m): A000244 (m=0), A027471 (m=1), A027472 (m=2), A036216 (m=3), A036217 (m=4), A036219 (m=5), A036220 (m=6), A036221 (m=7), A036222 (m=8), A036223 (m=9), A172362 (m=10).

Programs

  • Mathematica
    Table[3^(2*k-n)*Binomial[k, n-k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, May 19 2021 *)
  • Sage
    flatten([[3^(2*k-n)*binomial(k, n-k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 19 2021

Formula

Triangle: T(n, k) = binomial(k, n-k)*3^k*(1/3)^(n-k).
G.f. of column k: (3*x + x^2)^k.
G.f.: 1/(1 - 3*y*x - y*x^2). - Philippe Deléham, Nov 21 2011
Sum_{k=0..n} T(n,k)*x^k = A000007(n), A006190(n+1), A135030(n+1), A181353(n+1) for x = 0,1,2,3 respectively. - Philippe Deléham, Nov 21 2011
Showing 1-10 of 10 results.