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 14 results. Next

A112467 Riordan array ((1-2x)/(1-x), x/(1-x)).

Original entry on oeis.org

1, -1, 1, -1, 0, 1, -1, -1, 1, 1, -1, -2, 0, 2, 1, -1, -3, -2, 2, 3, 1, -1, -4, -5, 0, 5, 4, 1, -1, -5, -9, -5, 5, 9, 5, 1, -1, -6, -14, -14, 0, 14, 14, 6, 1, -1, -7, -20, -28, -14, 14, 28, 20, 7, 1, -1, -8, -27, -48, -42, 0, 42, 48, 27, 8, 1, -1, -9, -35, -75, -90, -42, 42, 90, 75, 35, 9, 1, -1, -10, -44, -110, -165, -132, 0, 132, 165, 110
Offset: 0

Views

Author

Paul Barry, Sep 06 2005

Keywords

Comments

Row sums are A000007. Diagonal sums are -F(n-2). Inverse is A112468. T(2n,n)=0.
(-1,1)-Pascal triangle. - Philippe Deléham, Aug 07 2006
Apart from initial term, same as A008482. - Philippe Deléham, Nov 07 2006
Each column equals the cumulative sum of the previous column. - Mats Granvik, Mar 15 2010
Reading along antidiagonals generates in essence rows of A192174. - Paul Curtz, Oct 02 2011
Triangle T(n,k), read by rows, given by (-1,2,0,0,0,0,0,0,0,...) DELTA (1,0,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Nov 01 2011

Examples

			Triangle starts:
    1;
   -1,  1;
   -1,  0,   1;
   -1, -1,   1,   1;
   -1, -2,   0,   2,   1;
   -1, -3,  -2,   2,   3,   1;
   -1, -4,  -5,   0,   5,   4,  1;
   -1, -5,  -9,  -5,   5,   9,  5,  1;
   -1, -6, -14, -14,   0,  14, 14,  6,  1;
   -1, -7, -20, -28, -14,  14, 28, 20,  7,  1;
   -1, -8, -27, -48, -42,   0, 42, 48, 27,  8, 1;
   -1, -9, -35, -75, -90, -42, 42, 90, 75, 35, 9, 1;
  ...
From _Paul Barry_, Apr 08 2011: (Start)
Production matrix begins:
   1,  1,
  -2, -1,  1,
   2,  0, -1,  1,
  -2,  0,  0, -1,  1,
   2,  0,  0,  0, -1,  1,
  -2,  0,  0,  0,  0, -1,  1,
   2,  0,  0,  0,  0,  0, -1,  1
  ... (End)
		

Crossrefs

Programs

  • Magma
    [n eq 0 select 1 else (2*k-n)*Binomial(n,k)/n: k in [0..n], n in [0..10]]; // G. C. Greubel, Dec 04 2019
    
  • Maple
    seq(seq( `if`(n=0, 1, (2*k-n)*binomial(n,k)/n), k=0..n), n=0..10); # G. C. Greubel, Dec 04 2019
  • Mathematica
    T[n_, k_]= If[n==0, 1, ((2*k-n)/n)*Binomial[n, k]]; Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* Roger L. Bagula, Feb 16 2009; modified by G. C. Greubel, Dec 04 2019 *)
  • PARI
    T(n, k) = if(n==0, 1, (2*k-n)*binomial(n,k)/n ); \\ G. C. Greubel, Dec 04 2019
    
  • Sage
    def T(n, k):
        if (n==0): return 1
        else: return (2*k-n)*binomial(n,k)/n
    [[T(n, k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Dec 04 2019

Formula

Number triangle T(n, k) = binomial(n, n-k) - 2*binomial(n-1, n-k-1).
Sum_{k=0..n} T(n, k)*x^k = (x-1)*(x+1)^(n-1). - Philippe Deléham, Oct 03 2005
T(n,k) = ((2*k-n)/n)*binomial(n, k), with T(0,0)=1. - Roger L. Bagula, Feb 16 2009; modified by G. C. Greubel, Dec 04 2019
T(n,k) = T(n-1,k-1) + T(n-1,k) with T(0,0)=1, T(1,0)=-1, T(n,k)=0 for k>n or for n<0. - Philippe Deléham, Nov 01 2011
G.f.: (1-2x)/(1-(1+y)*x). - Philippe Deléham, Dec 15 2011
Sum_{k=0..n} T(n,k)*x^k = A000007(n), A133494(n), A081294(n), A005053(n), A067411(n), A199661(n), A083233(n) for x = 1, 2, 3, 4, 5, 6, 7, respectively. - Philippe Deléham, Dec 15 2011
exp(x) * e.g.f. for row n = e.g.f. for diagonal n. For example, for n = 3 we have exp(x)*(-1 - x + x^2/2! + x^3/3!) = -1 - 2*x - 2*x^2/2! + 5*x^4/4! + 14*x^5/5! + .... The same property holds more generally for Riordan arrays of the form ( f(x), x/(1 - x) ). - Peter Bala, Dec 21 2014
Sum_{k=0..n} T(n,k) = 0^n = A000007(n). - G. C. Greubel, Dec 04 2019

A164346 a(n) = 3 * 4^n.

Original entry on oeis.org

3, 12, 48, 192, 768, 3072, 12288, 49152, 196608, 786432, 3145728, 12582912, 50331648, 201326592, 805306368, 3221225472, 12884901888, 51539607552, 206158430208, 824633720832, 3298534883328, 13194139533312, 52776558133248, 211106232532992, 844424930131968
Offset: 0

Views

Author

Klaus Brockhaus, Aug 13 2009

Keywords

Comments

Binomial transform of A000244 without initial 1.
Second binomial transform of A007283.
Third binomial transform of A010701.
Inverse binomial transform of A005053 without initial 1.
First differences of A024036. - Omar E. Pol, Feb 16 2013

Crossrefs

Cf. A000302 (powers of 4), A000244 (powers of 3), A007283 (3*2^n), A010701 (all 3's), A005053, A002001, A096045, A140660 (3*4^n+1), A002023 (6*4^n), A002063(9*4^n), A056120, A084509.

Programs

Formula

a(n) = 4*a(n-1) for n > 1; a(0) = 3.
G.f.: 3/(1-4*x).
a(n) = A002001(n+1). a(n) = A096045(n)+2. a(n) = A140660(n)-1.
a(n) = A002023(n)/2. a(n) = A002063(n)/3. a(n) = A056120(n+3)/9.
Apparently a(n) = A084509(n+3)/2.
a(n) = A110594(n+1), n>1. - R. J. Mathar, Aug 17 2009
a(n) = 3*A000302(n). - Omar E. Pol, Feb 18 2013
a(n) = A000079(2*n) + A000079(2*n+1). - M. F. Hasler, Jul 28 2015
E.g.f.: 3*exp(4*x). - G. C. Greubel, Sep 15 2017

A169634 a(n) = 3*7^n.

Original entry on oeis.org

3, 21, 147, 1029, 7203, 50421, 352947, 2470629, 17294403, 121060821, 847425747, 5931980229, 41523861603, 290667031221, 2034669218547, 14242684529829, 99698791708803, 697891541961621, 4885240793731347, 34196685556119429, 239376798892836003, 1675637592249852021
Offset: 0

Views

Author

Klaus Brockhaus, Apr 04 2010

Keywords

Comments

Essentially first differences of A120741.
Binomial transform of A169604.
Second binomial transform of A005053 without initial term 1.
Inverse binomial transform of A103333 without initial term 1.
Second inverse binomial transform of A013708.
Except for first term 3, these are the integers that satisfy phi(n) = 4*n/7. - Michel Marcus, Jul 14 2015
Number of distinct quadratic residues (QR) over Z_7^n such that gcd(QR, 7^n) = 1 where n >= 1. - Param Mayurkumar Parekh, Feb 11 2023

Crossrefs

Cf. A120741, A169604 (3*6^n), A005053 (expand (1-2x)/(1-5x)), A103333 (expand (1-5x)/(1-8x)), A013708 (3^(2*n+1)), A007283 (3*2^n), A164346 (3*4^n).

Programs

  • Magma
    [ 3*7^n: n in [0..19] ];
  • Mathematica
    3*7^Range[0, 25] (* Paolo Xausa, Jan 17 2025 *)

Formula

a(n) = 7*a(n-1) for n > 0; a(0) = 3.
G.f.: 3/(1-7*x).

A223282 T(n,k)=Rolling icosahedron face footprints: number of nXk 0..19 arrays starting with 0 where 0..19 label faces of an icosahedron and every array movement to a horizontal, diagonal or antidiagonal neighbor moves across an icosahedral edge.

Original entry on oeis.org

1, 3, 20, 9, 15, 400, 27, 87, 75, 8000, 81, 351, 849, 375, 160000, 243, 1575, 4995, 8295, 1875, 3200000, 729, 6831, 38457, 72279, 81057, 9375, 64000000, 2187, 29943, 261819, 1024071, 1048923, 792087, 46875, 1280000000, 6561, 130815, 1881441, 10979127
Offset: 1

Views

Author

R. H. Hardin Mar 19 2013

Keywords

Comments

Table starts
............1.......3..........9...........27..............81...............243
...........20......15.........87..........351............1575..............6831
..........400......75........849.........4995...........38457............261819
.........8000.....375.......8295........72279.........1024071..........10979127
.......160000....1875......81057......1048923........28271577.........473368227
......3200000....9375.....792087.....15229647.......792881031.......20570223999
.....64000000...46875....7740273....221142771.....22392745881......895927195659
...1280000000..234375...75637959...3211159815....634400697159....39047604482055
..25600000000.1171875..739134273..46628577099..17998034165721..1702160040384051
.512000000000.5859375.7222821495.677084057343.510923724667143.74204651599582287

Examples

			Some solutions for n=3 k=4
..0..5..0..5....0..5..0..5....0..5..0..5....0..2..0..2....0..5..7..5
..0..2..0..5....0..2..0..5....0..5..0..1....0..2..0..2....7..5..0..5
..8..2..0..2....3..2..0..1....0..2..0..2....0..5..0..2....9..5..0..2
Face neighbors:
0 -> 1 2 5
1 -> 0 4 6
2 -> 0 3 8
3 -> 2 4 16
4 -> 3 1 17
5 -> 0 7 9
6 -> 1 7 10
7 -> 6 5 11
8 -> 2 9 13
9 -> 8 5 14
10 -> 6 12 17
11 -> 7 12 14
12 -> 11 10 19
13 -> 8 15 16
14 -> 9 11 15
15 -> 14 13 19
16 -> 3 13 18
17 -> 4 10 18
18 -> 16 17 19
19 -> 15 18 12
		

Crossrefs

Column 1 is A009964(n-1)
Column 2 is A005053
Row 1 is A000244(n-1)

Formula

Empirical for column k:
k=1: a(n) = 20*a(n-1)
k=2: a(n) = 5*a(n-1)
k=3: a(n) = 11*a(n-1) -12*a(n-2)
k=4: a(n) = 17*a(n-1) -36*a(n-2)
k=5: a(n) = 45*a(n-1) -518*a(n-2) +1268*a(n-3) +1704*a(n-4) -4064*a(n-5) +1536*a(n-6)
k=6: [order 9]
k=7: [order 20]
Empirical for row n:
n=1: a(n) = 3*a(n-1)
n=2: a(n) = 3*a(n-1) +6*a(n-2) for n>3
n=3: a(n) = 5*a(n-1) +18*a(n-2) -24*a(n-3) for n>4
n=4: a(n) = 5*a(n-1) +92*a(n-2) -56*a(n-3) -920*a(n-4) +192*a(n-5) +1152*a(n-6) for n>7
n=5: [order 12] for n>13
n=6: [order 26] for n>27

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

Original entry on oeis.org

1, 2, 10, 38, 154, 614, 2458, 9830, 39322, 157286, 629146, 2516582, 10066330, 40265318, 161061274, 644245094, 2576980378, 10307921510, 41231686042, 164926744166, 659706976666, 2638827906662, 10555311626650, 42221246506598
Offset: 0

Views

Author

Philippe Deléham, Oct 19 2006

Keywords

Comments

Inverse binomial transform of A005053. Binomial transform of [1, 1, 7, 13, 55, ...] = A015441(n+1).
Convolved with [1, 2, 2, 2, ...] = powers of 4: [1, 4, 16, 64, ...]. - Gary W. Adamson, Jun 02 2009
a(n) is the number of compositions of n when there are 2 types of 1 and 6 types of other natural numbers. - Milan Janjic, Aug 13 2010

Crossrefs

Programs

  • GAP
    a:=[1,2];; for n in [3..30] do a[n]:=3*a[n-1]+4*a[n-2]; od; a; # G. C. Greubel, May 18 2019
    
  • Magma
    I:=[1, 2]; [n le 2 select I[n] else 3*Self(n-1)+4*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Jul 06 2012
    
  • Mathematica
    CoefficientList[Series[(1-x)/(1-3*x-4*x^2),{x,0,30}],x] (* Vincenzo Librandi, Jul 06 2012 *)
  • PARI
    Vec((1-x)/(1-3*x-4*x^2)+O(x^30)) \\ Charles R Greathouse IV, Jan 11 2012
    
  • Python
    def A122117(n): return ((4<<(m:=n<<1))|2)//5-((1<Chai Wah Wu, Apr 22 2025
  • Sage
    from sage.combinat.sloane_functions import recur_gen2b; it = recur_gen2b(1,2,3,4, lambda n: 0); [next(it) for i in range(24)] # Zerinvary Lajos, Jul 03 2008
    
  • Sage
    ((1-x)/(1-3*x-4*x^2)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, May 18 2019
    

Formula

a(n) = 2*A108981(n-1) for n > 0, with a(0) = 1.
a(2*n) = 4*a(2*n-1) + 2, a(2*n+1) = 4*a(2*n) - 2.
a(n) = Sum_{k=0..n} 2^(n-k)*A055380(n,k).
G.f.: (1-x)/(1-3*x-4*x^2).
Lim_{n->infinity} a(n+1)/a(n) = 4.
a(n) = Sum_{k=0..n} A122016(n,k)*2^k. - Philippe Deléham, Nov 05 2008
a(n) = A100088(2*n). - Chai Wah Wu, Apr 22 2025

Extensions

Corrected by T. D. Noe, Nov 07 2006

A169604 a(n) = 3*6^n.

Original entry on oeis.org

3, 18, 108, 648, 3888, 23328, 139968, 839808, 5038848, 30233088, 181398528, 1088391168, 6530347008, 39182082048, 235092492288, 1410554953728, 8463329722368, 50779978334208, 304679870005248, 1828079220031488, 10968475320188928, 65810851921133568, 394865111526801408
Offset: 0

Views

Author

Klaus Brockhaus, Apr 04 2010

Keywords

Comments

a(n) = A081341(n+1).
Essentially first differences of A125682.
Binomial transform of A005053 without initial term 1.
Second binomial transform of A164346.
Inverse binomial transform of A169634.
Second inverse binomial transform of A103333 without initial term 1.
Contribution from Reinhard Zumkeller, May 02 2010: (Start)
a(n) = 3*A000400(n) = A000400(n+1)/2;
subsequence of A003586; a(n)=A003586(A014105(n)) for n<6. (End)

Crossrefs

Cf. A081341, A125682 ((6^n-1)*3/5), A005053 (expand (1-2x)/(1-5x)), A164346 (3*4^n), A169634 (3*7^n), A103333 (expand (1-5x)/(1-8x)).

Programs

Formula

a(n) = 6*a(n-1) for n > 0; a(0) = 3.
G.f.: 3/(1-6*x).

A223209 T(n,k)=Rolling icosahedron face footprints: number of nXk 0..19 arrays starting with 0 where 0..19 label faces of an icosahedron and every array movement to a horizontal or vertical neighbor moves across an icosahedral edge.

Original entry on oeis.org

1, 3, 3, 9, 15, 9, 27, 75, 75, 27, 81, 375, 657, 375, 81, 243, 1875, 5763, 5763, 1875, 243, 729, 9375, 50553, 90111, 50553, 9375, 729, 2187, 46875, 443451, 1412907, 1412907, 443451, 46875, 2187, 6561, 234375, 3889953, 22163655, 39868737, 22163655
Offset: 1

Views

Author

R. H. Hardin Mar 18 2013

Keywords

Comments

Table starts
......1.........3............9..............27.................81
......3........15...........75.............375...............1875
......9........75..........657............5763..............50553
.....27.......375.........5763...........90111............1412907
.....81......1875........50553.........1412907...........39868737
....243......9375.......443451........22163655.........1127761923
....729.....46875......3889953.......347696019........31921015497
...2187....234375.....34122675......5454600015.......903661481115
...6561...1171875....299324169.....85571052219.....25583075832465
..19683...5859375...2625672171...1342427863959....724276345970163
..59049..29296875..23032401201..21059839795875..20504869741550745
.177147.146484375.202040266467.330384125138847.580510427181846027

Examples

			Some solutions for n=3 k=4
..0..2..0..1....0..2..0..2....0..5..0..2....0..2..3..4....0..1..6.10
..2..8..2..0....2..8..2..8....5..9..5..0....2..0..2..3....1..6..1..6
..3..2..3..2....3..2..8.13....0..5..0..5....0..2..8..2....4..1..4..1
Face neighbors:
0 -> 1 2 5
1 -> 0 4 6
2 -> 0 3 8
3 -> 2 4 16
4 -> 3 1 17
5 -> 0 7 9
6 -> 1 7 10
7 -> 6 5 11
8 -> 2 9 13
9 -> 8 5 14
10 -> 6 12 17
11 -> 7 12 14
12 -> 11 10 19
13 -> 8 15 16
14 -> 9 11 15
15 -> 14 13 19
16 -> 3 13 18
17 -> 4 10 18
18 -> 16 17 19
19 -> 15 18 12
		

Crossrefs

Column 1 is A000244(n-1)
Column 2 is A005053

Formula

Empirical for column k:
k=1: a(n) = 3*a(n-1)
k=2: a(n) = 5*a(n-1)
k=3: a(n) = 9*a(n-1) -2*a(n-2)
k=4: a(n) = 19*a(n-1) -54*a(n-2) +32*a(n-3)
k=5: a(n) = 31*a(n-1) -24*a(n-2) -1612*a(n-3) +3816*a(n-4) +1152*a(n-5) -2784*a(n-6) +256*a(n-7)
k=6: [order 12]
k=7: [order 28]

A193734 Triangular array: the fusion of polynomial sequences P and Q given by p(n,x)=(2x+1)^n and q(n,x)=(x+2)^n.

Original entry on oeis.org

1, 1, 2, 1, 6, 8, 1, 10, 32, 32, 1, 14, 72, 160, 128, 1, 18, 128, 448, 768, 512, 1, 22, 200, 960, 2560, 3584, 2048, 1, 26, 288, 1760, 6400, 13824, 16384, 8192, 1, 30, 392, 2912, 13440, 39424, 71680, 73728, 32768, 1, 34, 512, 4480, 25088, 93184, 229376, 360448, 327680, 131072
Offset: 0

Views

Author

Clark Kimberling, Aug 04 2011

Keywords

Comments

See A193722 for the definition of fusion of two sequences of polynomials or triangular arrays.
Triangle T(n,k), read by rows, given by (1,0,0,0,0,0,0,0,...) DELTA (2,2,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Oct 05 2011

Examples

			First six rows:
  1;
  1,  2;
  1,  6,   8;
  1, 10,  32,  32;
  1, 14,  72, 160, 128;
  1, 18, 128, 448, 768, 512;
		

Crossrefs

Programs

  • Magma
    function T(n, k) // T = A193734
      if k lt 0 or k gt n then return 0;
      elif n lt 2 then return k+1;
      else return T(n-1, k) + 4*T(n-1, k-1);
      end if;
    end function;
    [T(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 19 2023
    
  • Mathematica
    (* First program *)
    z = 8; a = 2; b = 1; c = 1; d = 2;
    p[n_, x_] := (a*x + b)^n ; q[n_, x_] := (c*x + d)^n
    t[n_, k_] := Coefficient[p[n, x], x^k]; t[n_, 0] := p[n, x] /. x -> 0;
    w[n_, x_] := Sum[t[n, k]*q[n + 1 - k, x], {k, 0, n}]; w[-1, x_] := 1
    g[n_] := CoefficientList[w[n, x], {x}]
    TableForm[Table[Reverse[g[n]], {n, -1, z}]]
    Flatten[Table[Reverse[g[n]], {n, -1, z}]] (* A193734 *)
    TableForm[Table[g[n], {n, -1, z}]]
    Flatten[Table[g[n], {n, -1, z}]]      (* A193735 *)
    (* Second program *)
    T[n_, k_]:= T[n,k]= If[k<0 || k>n, 0, If[n<2, k+1, T[n-1,k] +4*T[n-1,k-1]]];
    Table[T[n,k], {n,0,12}, {k,0,n}]//TableForm (* G. C. Greubel, Nov 19 2023 *)
  • SageMath
    def T(n, k): # T = A193734
        if (k<0 or k>n): return 0
        elif (n<2): return k+1
        else: return T(n-1, k) +4*T(n-1, k-1)
    flatten([[T(n, k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Nov 19 2023

Formula

T(n,k) = 4*T(n-1,k-1) + T(n-1,k) with T(0,0)=T(1,0)=1 and T(1,1)=2. - Philippe Deléham, Oct 05 2011
G.f.: (1 - 2*x*y)/(1 - x - 4*x*y). - R. J. Mathar, Aug 11 2015
From G. C. Greubel, Nov 19 2023: (Start)
T(n, n) = A081294(n).
Sum_{k=0..n} T(n, k) = A005053(n).
Sum_{k=0..n} (-1)^k * T(n, k) = (-1)^n * A133494(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A026581(n-1) + (1/2)*[n=0]. (End)

A193730 Triangular array: the fusion of polynomial sequences P and Q given by p(n,x) = (2x+1)^n and q(n,x) = (2x+1)^n.

Original entry on oeis.org

1, 2, 1, 4, 8, 3, 8, 28, 30, 9, 16, 80, 144, 108, 27, 32, 208, 528, 648, 378, 81, 64, 512, 1680, 2880, 2700, 1296, 243, 128, 1216, 4896, 10800, 14040, 10692, 4374, 729, 256, 2816, 13440, 36288, 60480, 63504, 40824, 14580, 2187, 512, 6400, 35328, 112896, 229824, 308448, 272160, 151632, 48114, 6561
Offset: 0

Views

Author

Clark Kimberling, Aug 04 2011

Keywords

Comments

See A193722 for the definition of fusion of two sequences of polynomials or triangular arrays.
Triangle T(n,k), read by rows, given by (2,0,0,0,0,0,0,0,...) DELTA (1,2,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Oct 05 2011

Examples

			First six rows:
   1;
   2,   1;
   4,   8,   3;
   8,  28,  30,   9;
  16,  80, 144, 108,  27;
  32, 208, 528, 648, 378, 81;
		

Crossrefs

Programs

  • Magma
    function T(n, k) // T = A193730
      if k lt 0 or k gt n then return 0;
      elif n lt 2 then return n-k+1;
      else return 2*T(n-1, k) + 3*T(n-1, k-1);
      end if;
    end function;
    [T(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 20 2023
    
  • Mathematica
    (* First program *)
    z = 8; a = 2; b = 1; c = 2; d = 1;
    p[n_, x_] := (a*x + b)^n ; q[n_, x_] := (c*x + d)^n
    t[n_, k_] := Coefficient[p[n, x], x^k]; t[n_, 0] := p[n, x] /. x -> 0;
    w[n_, x_] := Sum[t[n, k]*q[n + 1 - k, x], {k, 0, n}]; w[-1, x_] := 1
    g[n_] := CoefficientList[w[n, x], {x}]
    TableForm[Table[Reverse[g[n]], {n, -1, z}]]
    Flatten[Table[Reverse[g[n]], {n, -1, z}]]     (* A193730 *)
    TableForm[Table[g[n], {n, -1, z}]]
    Flatten[Table[g[n], {n, -1, z}]]     (* A193731 *)
    (* Second program *)
    T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, If[n<2, n-k+1, 2*T[n-1, k] + 3*T[n-1, k-1]]];
    Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Nov 20 2023 *)
  • SageMath
    def T(n, k): # T = A193730
        if (k<0 or k>n): return 0
        elif (n<2): return n-k+1
        else: return 2*T(n-1, k) + 3*T(n-1, k-1)
    flatten([[T(n, k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Nov 20 2023

Formula

T(n,k) = 3*T(n-1,k-1) + 2*T(n-1,k) with T(0,0)=T(1,1)=1 and T(1,0)=2. - Philippe Deléham, Oct 05 2011
G.f.: (1-2*x*y)/(1-2*x-3*x*y). - R. J. Mathar, Aug 11 2015
From G. C. Greubel, Nov 20 2023: (Start)
T(n, 0) = A000079(n).
T(n, 1) = A130129(n-1).
T(n, n) = A133494(n).
T(n, n-1) = A199923(n).
Sum_{k=0..n} T(n, k) = A005053(n).
Sum_{k=0..n} (-1)^k * T(n, k) = A165326(n). (End)

A193731 Mirror of the triangle A193730.

Original entry on oeis.org

1, 1, 2, 3, 8, 4, 9, 30, 28, 8, 27, 108, 144, 80, 16, 81, 378, 648, 528, 208, 32, 243, 1296, 2700, 2880, 1680, 512, 64, 729, 4374, 10692, 14040, 10800, 4896, 1216, 128, 2187, 14580, 40824, 63504, 60480, 36288, 13440, 2816, 256, 6561, 48114, 151632, 272160, 308448, 229824, 112896, 35328, 6400, 512
Offset: 0

Views

Author

Clark Kimberling, Aug 04 2011

Keywords

Comments

A193731 is obtained by reversing the rows of the triangle A193730.
Triangle T(n,k), read by rows, given by (1,2,0,0,0,0,0,0,0,...) DELTA (2,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Oct 05 2011

Examples

			First six rows:
   1;
   1,   2;
   3,   8,   4;
   9,  30,  28,   8;
  27, 108, 144,  80,  16;
  81, 378, 648, 528, 208, 32;
		

Crossrefs

Programs

  • Magma
    function T(n, k) // T = A193731
      if k lt 0 or k gt n then return 0;
      elif n lt 2 then return k+1;
      else return 3*T(n-1, k) + 2*T(n-1, k-1);
      end if;
    end function;
    [T(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 20 2023
    
  • Mathematica
    (* First program *)
    z = 8; a = 2; b = 1; c = 2; d = 1;
    p[n_, x_] := (a*x + b)^n ; q[n_, x_] := (c*x + d)^n
    t[n_, k_] := Coefficient[p[n, x], x^k]; t[n_, 0] := p[n, x] /. x -> 0;
    w[n_, x_] := Sum[t[n, k]*q[n + 1 - k, x], {k, 0, n}]; w[-1, x_] := 1
    g[n_] := CoefficientList[w[n, x], {x}]
    TableForm[Table[Reverse[g[n]], {n, -1, z}]]
    Flatten[Table[Reverse[g[n]], {n, -1, z}]]  (* A193730 *)
    TableForm[Table[g[n], {n, -1, z}]]
    Flatten[Table[g[n], {n, -1, z}]]     (* A193731 *)
    (* Second program *)
    T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, If[n<2, k+1, 3*T[n-1, k] + 2*T[n -1, k-1]]];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Nov 20 2023 *)
  • SageMath
    def T(n, k): # T = A193731
        if (k<0 or k>n): return 0
        elif (n<2): return k+1
        else: return 3*T(n-1, k) + 2*T(n-1, k-1)
    flatten([[T(n, k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Nov 20 2023

Formula

T(n,k) = A193730(n,n-k).
T(n,k) = 2*T(n-1,k-1) + 3*T(n-1,k) with T(0,0)=T(1,0)=1 and T(1,1)=2. - Philippe Deléham, Oct 05 2011
G.f.: (1-2*x)/(1-3*x-2*x*y). - R. J. Mathar, Aug 11 2015
From G. C. Greubel, Nov 20 2023: (Start)
T(n, 0) = A133494(n).
T(n, 1) = 2*A006234(n+2).
T(n, 2) = 4*A080420(n-2).
T(n, 3) = 8*A080421(n-3).
T(n, 4) = 16*A080422(n-4).
T(n, 5) = 32*A080423(n-5).
T(n, n) = A000079(n).
T(n, n-1) = A130129(n-1).
Sum_{k=0..n} T(n, k) = A005053(n).
Sum_{k=0..n} (-1)^k * T(n, k) = A153881(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A007483(n-1).
Sum_{k=0..floor(n/2)} (-1)^k * T(n-k, k) = A000012(n). (End)
Showing 1-10 of 14 results. Next