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 51-60 of 68 results. Next

A193729 Mirror of the triangle A193728.

Original entry on oeis.org

1, 1, 2, 3, 10, 8, 9, 42, 64, 32, 27, 162, 360, 352, 128, 81, 594, 1728, 2496, 1792, 512, 243, 2106, 7560, 14400, 15360, 8704, 2048, 729, 7290, 31104, 73440, 103680, 87552, 40960, 8192, 2187, 24786, 122472, 344736, 604800, 677376, 473088, 188416, 32768
Offset: 0

Views

Author

Clark Kimberling, Aug 04 2011

Keywords

Comments

T(n, k) is obtained by reversing the rows of the triangle A193728.
Triangle T(n,k), read by rows, given by [1,2,0,0,0,0,...] DELTA [2,2,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,  10,    8;
   9,  42,   64,   32;
  27, 162,  360,  352,  128;
  81, 594, 1728, 2496, 1792, 512;
		

Crossrefs

Programs

  • Magma
    function T(n, k) // T = A193729
      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) + 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 28 2023
    
  • Mathematica
    (* First program *)
    z = 8; a = 1; b = 2; 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}]]  (* A193728 *)
    TableForm[Table[g[n], {n, -1, z}]]
    Flatten[Table[g[n], {n, -1, z}]]   (* A193729 *)
    (* Second program *)
    T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, If[n<2, k+1, 3*T[n-1,k] + 4*T[n -1, k-1]]];
    Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Nov 28 2023 *)
  • SageMath
    def T(n, k): # T = A193729
        if (k<0 or k>n): return 0
        elif (n<2): return k+1
        else: return 3*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 28 2023

Formula

Let w(n,k) be the triangle of A193728, then the triangle in this sequence is given by w(n,n-k).
T(n,k) = 4*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-2*x*y)/(1-3*x-4*x*y). - R. J. Mathar, Aug 11 2015
From G. C. Greubel, Nov 28 2023: (Start)
T(n, 0) = A133494(n).
T(n, 1) = 2*A081038(n-1).
T(n, n) = A081294(n).
Sum_{k=0..n} T(n, k) = (1/7)*(4*[n=0] + 3*A000420(n)).
Sum_{k=0..n} (-1)^k * T(n, k) = A033999(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = (1/2)*[n=0] + A108981(n-1).
Sum_{k=0..floor(n/2)} (-1)^k * T(n-k, k) = (1/2)*[n=0] + A247560(n-1).
(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)

A193735 Mirror of the triangle A193734.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Aug 04 2011

Keywords

Comments

A193735 is obtained by reversing the rows of the triangle A193734.
Triangle T(n,k), read by rows, given by (2,2,0,0,0,0,0,0,0,...) DELTA (1,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;
    8,   6,   1;
   32,  32,  10,   1;
  128, 160,  72,  14,  1;
  512, 768, 448, 128, 18, 1;
		

Crossrefs

Programs

  • Magma
    function T(n, k) // T = A193735
      if k lt 0 or k gt n then return 0;
      elif n lt 2 then return n-k+1;
      else return 4*T(n-1, k) + 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, n-k+1, 4*T[n-1, k] + T[n -1, k-1]]];
    Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Nov 19 2023 *)
  • SageMath
    def T(n, k): # T = A193735
        if (k<0 or k>n): return 0
        elif (n<2): return n-k+1
        else: return 4*T(n-1, k) + 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) = A193734(n,n-k).
T(n,k) = T(n-1,k-1) + 4*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)/(1-4*x-x*y). - R. J. Mathar, Aug 11 2015
From G. C. Greubel, Nov 19 2023: (Start)
T(n, 0) = A081294(n).
Sum_{k=0..n} T(n, k) = A005053(n).
Sum_{k=0..n} (-1)^k * T(n, k) = A133494(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A001077(n).
Sum_{k=0..floor(n/2)} (-1)^k * T(n-k, k) = A001075(n). (End)

A358904 Number of finite sets of compositions with all equal sums and total sum n.

Original entry on oeis.org

1, 1, 2, 4, 9, 16, 38, 64, 156, 260, 632, 1024, 2601, 4096, 10208, 16944, 40966, 65536, 168672, 262144, 656980, 1090240, 2620928, 4194304, 10862100, 16781584, 41940992, 69872384, 168403448, 268435456, 693528552, 1073741824, 2695006177, 4473400320, 10737385472
Offset: 0

Views

Author

Gus Wiseman, Dec 13 2022

Keywords

Examples

			The a(1) = 1 through a(4) = 9 sets:
  {(1)}  {(2)}   {(3)}    {(4)}
         {(11)}  {(12)}   {(13)}
                 {(21)}   {(22)}
                 {(111)}  {(31)}
                          {(112)}
                          {(121)}
                          {(211)}
                          {(1111)}
                          {(2),(11)}
		

Crossrefs

This is the constant-sum case of A098407, ordered A358907.
The version for distinct sums is A304961, ordered A336127.
Allowing repetition gives A305552, ordered A074854.
The case of sets of partitions is A359041.
A001970 counts multisets of partitions.
A034691 counts multisets of compositions, ordered A133494.
A261049 counts sets of partitions, ordered A358906.

Programs

  • Mathematica
    Table[If[n==0,1,Sum[Binomial[2^(d-1),n/d],{d,Divisors[n]}]],{n,0,30}]
  • PARI
    a(n) = if (n, sumdiv(n, d, binomial(2^(d-1), n/d)), 1); \\ Michel Marcus, Dec 14 2022

Formula

a(n>0) = Sum_{d|n} binomial(2^(d-1),n/d).

A383140 Triangle read by rows: the coefficients of polynomials (1/3^(m-n)) * Sum_{k=0..m} k^n * 2^(m-k) * binomial(m,k) in the variable m.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 2, 6, 1, 0, -6, 20, 12, 1, 0, -30, 10, 80, 20, 1, 0, 42, -320, 270, 220, 30, 1, 0, 882, -1386, -770, 1470, 490, 42, 1, 0, 954, 7308, -15064, 2800, 5180, 952, 56, 1, 0, -39870, 101826, -39340, -61992, 29820, 14364, 1680, 72, 1, 0, -203958, -40680, 841770, -666820, -86940, 139440, 34020, 2760, 90, 1
Offset: 0

Views

Author

Seiichi Manyama, Apr 17 2025

Keywords

Examples

			f_n(m) = (1/3^(m-n)) * Sum_{k=0..m} k^n * 2^(m-k) * binomial(m,k).
f_0(m) = 1.
f_1(m) =    m.
f_2(m) =  2*m +   m^2.
f_3(m) =  2*m + 6*m^2 + m^3.
Triangle begins:
  1;
  0,   1;
  0,   2,    1;
  0,   2,    6,   1;
  0,  -6,   20,  12,   1;
  0, -30,   10,  80,  20,  1;
  0,  42, -320, 270, 220, 30, 1;
  ...
		

Crossrefs

Columns k=0..1 give A000007, A179929(n-1).
Row sums give A133494.
Alternating row sums give A212846.

Programs

  • PARI
    T(n, k) = sum(j=k, n, 3^(n-j)*stirling(n, j, 2)*stirling(j, k, 1));
    
  • Sage
    def a_row(n):
        s = sum(3^(n-k)*stirling_number2(n, k)*falling_factorial(x, k) for k in (0..n))
        return expand(s).list()
    for n in (0..10): print(a_row(n))

Formula

T(n,k) = Sum_{j=k..n} 3^(n-j) * Stirling2(n,j) * Stirling1(j,k).
T(n,k) = [x^k] Sum_{k=0..n} 3^(n-k) * Stirling2(n,k) * FallingFactorial(x,k).
E.g.f. of column k (with leading zeros): g(x)^k / k! with g(x) = log(1 + (exp(3*x) - 1)/3).

A183190 Triangle T(n,k), read by rows, given by (1, 1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (0, 1, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 1, 0, 2, 1, 0, 4, 4, 1, 0, 8, 12, 6, 1, 0, 16, 32, 24, 8, 1, 0, 32, 80, 80, 40, 10, 1, 0, 64, 192, 240, 160, 60, 12, 1, 0, 128, 448, 672, 560, 280, 84, 14, 1, 0, 256, 1024, 1792, 1792, 1120, 448, 112, 16, 1, 0, 512, 2304, 4608, 5376, 4032, 2016, 672, 144, 18, 1, 0
Offset: 0

Views

Author

Philippe Deléham, Dec 14 2011

Keywords

Comments

A071919*A007318 as infinite lower triangular matrices.
A129186*A038207 as infinite lower triangular matrices.
From Paul Curtz, Nov 12 2019: (Start)
If a new main diagonal of 0's is added to the triangle, then for this variant the following propositions hold:
The first column is A166444.
The second column is A139756.
The antidiagonal sums are A000129 (Pell numbers).
The row sums are (-1)^n*A141413.
The signed row sums are 0 followed by 1's, autosequence companion to A054977.
(End)

Examples

			Triangle begins:
   1;
   1,  0;
   2,  1,  0;
   4,  4,  1,  0;
   8, 12,  6,  1,  0;
  16, 32, 24,  8,  1, 0;
  32, 80, 80, 40, 10, 1, 0;
  ...
		

Crossrefs

Essentially the same as A038207, A062715, A065109.
Cf. A001787, A001788, A139756, A000129 (antidiagonals sums).

Programs

  • Maple
    T:= proc(n, k) option remember; `if`(k<0 or k>n, 0,
          `if`(n<2, 1-k, 2*T(n-1, k) +T(n-1, k-1)))
        end:
    seq(seq(T(n,k), k=0..n), n=0..12);  # Alois P. Heinz, Nov 08 2019
  • Mathematica
    T[n_, k_] /; 0 <= k <= n := T[n, k] = 2 T[n-1, k] + T[n-1, k-1];
    T[0, 0] = T[1, 0] = 1; T[1, 1] = 0; T[, ] = 0;
    Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 08 2019 *)

Formula

T(n,k) = 2*T(n-1,k) + T(n-1,k-1) with T(0,0)=T(1,0)=1 and T(1,1)=0 .
G.f.: (1-(1+y)*x)/(1-(2+y)*x).
Sum_{k, 0<=k<=n} T(n,k)*x^k = A019590(n+1), A000012(n), A011782(n), A133494(n) for x = -2, -1, 0, 1 respectively.
Sum_{k, 0<=k<=n} T(n,k)*x^(n-k) = A000007(n), A133494(n), A020699(n) for x = 0, 1, 2 respectively.
T(2n,n) = A069720(n).

A185081 Triangle T(n,k), read by rows, given by (0, 1, 1, -1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 1, -1, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 2, 4, 3, 0, 3, 9, 10, 5, 0, 5, 18, 28, 22, 8, 0, 8, 35, 68, 74, 45, 13, 0, 13, 66, 154, 210, 177, 88, 21, 0, 21, 122, 331, 541, 574, 397, 167, 34, 0, 34, 222, 686, 1302, 1656, 1446, 850, 310, 55
Offset: 0

Views

Author

Philippe Deléham, Jan 22 2012

Keywords

Comments

Row sums: A133494.

Examples

			Triangle begins:
  1;
  0,  1;
  0,  1,  2;
  0,  2,  4,  3;
  0,  3,  9, 10,  5;
  0,  5, 18, 28, 22,  8;
  0,  8, 35, 68, 74, 45, 13;
From _Philippe Deléham_, Apr 11 2012: (Start)
Triangle in A209138 begins:
  1;
  1,  2;
  2,  4,  3;
  3,  9, 10,  5;
  5, 18, 28, 22,  8;
  8, 35, 68, 74, 45, 13; (End)
		

Crossrefs

Programs

  • Mathematica
    nmax = 9; T[n_, n_] := Fibonacci[n+1]; T[, 0] = 0; T[n, 1] := Fibonacci[n]; T[n_, k_] /; 1 < k < n := T[n, k] = T[n - 1, k] + T[n - 1, k - 1] + T[n - 2, k] + T[n - 2, k - 1] + T[n - 2, k - 2]; T[, ] = 0;
    Table[T[n, k], {n, 0, nmax}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 20 2017 *)

Formula

Sum_{k=0..n} T(n,k)*x^k = A033999(n), A000007(n), A133494(n) for x = -1, 0, 1 respectively.
T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k) + T(n-2,k-1) + T(n-2,k-2), for n > 2, T(0,0) = T(1,1) = T(2,1) = 1, T(1,0) = T(2,0) = 0, T(2,2) = 2.
T(n+1,n) = A004798(n), T(n,n) = T(n+1,1) = A000045(n+1).
T(n,k) = A209138(n,k-1) for k >= 1. - Philippe Deléham, Apr 11 2012
G.f.: (-1 + x^2*y + x + x^2)/(-1 + x^2*y + x + x^2 + x*y + x^2*y^2). - R. J. Mathar, Aug 11 2015

Extensions

Corrected by Jean-François Alcover, Jun 20 2017

A355387 Number of ways to choose a distinct subsequence of an integer composition of n.

Original entry on oeis.org

1, 2, 5, 14, 37, 98, 259, 682, 1791, 4697, 12303, 32196, 84199, 220087, 575067, 1502176, 3923117, 10244069, 26746171, 69825070, 182276806, 475804961, 1241965456, 3241732629, 8461261457, 22084402087, 57640875725, 150442742575, 392652788250, 1024810764496
Offset: 0

Views

Author

Gus Wiseman, Jul 04 2022

Keywords

Comments

By "distinct" we mean equal subsequences are counted only once. For example, the pair (1,1)(1) is counted only once even though (1) is a subsequence of (1,1) in two ways. The version with multiplicity is A025192.

Examples

			The a(3) = 14 pairings of a composition with a chosen subsequence:
  (3)()     (3)(3)
  (21)()    (21)(1)   (21)(2)    (21)(21)
  (12)()    (12)(1)   (12)(2)    (12)(12)
  (111)()   (111)(1)  (111)(11)  (111)(111)
		

Crossrefs

For partitions we have A000712, composable A339006.
The homogeneous version is A011782, without containment A000302.
With multiplicity we have A025192, for partitions A070933.
The strict case is A032005.
The case of strict subsequences is A236002.
The composable case is A355384, homogeneous without containment A355388.
A075900 counts compositions of each part of a partition.
A304961 counts compositions of each part of a strict partition.
A307068 counts strict compositions of each part of a composition.
A336127 counts compositions of each part of a strict composition.

Programs

  • Mathematica
    Table[Sum[Length[Union[Subsets[y]]],{y,Join@@Permutations/@IntegerPartitions[n]}],{n,0,6}]
  • PARI
    lista(n)=my(f=sum(k=1,n,(x^k+x*O(x^n))/(1-x/(1-x)+x^k)));Vec((1-x)/((1-2*x)*(1-f))) \\ Christian Sievers, May 06 2025

Formula

G.f.: (1-x)/((1-2*x)*(1-f)) where f = Sum_{k>=1} x^k/(1-x/(1-x)+x^k) is the generating function for A331330. - Christian Sievers, May 06 2025

Extensions

a(16) and beyond from Christian Sievers, May 06 2025

A329918 Coefficients of orthogonal polynomials related to the Jacobsthal numbers A152046, triangle read by rows, T(n, k) for 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 0, 4, 0, 1, 0, 4, 0, 6, 0, 1, 0, 0, 12, 0, 8, 0, 1, 0, 8, 0, 24, 0, 10, 0, 1, 0, 0, 32, 0, 40, 0, 12, 0, 1, 0, 16, 0, 80, 0, 60, 0, 14, 0, 1, 0, 0, 80, 0, 160, 0, 84, 0, 16, 0, 1, 0, 32, 0, 240, 0, 280, 0, 112, 0, 18, 0, 1
Offset: 0

Views

Author

Peter Luschny, Nov 28 2019

Keywords

Examples

			Triangle starts:
  [0] 1;
  [1] 0,  1;
  [2] 0,  0,  1;
  [3] 0,  2,  0,  1;
  [4] 0,  0,  4,  0,  1;
  [5] 0,  4,  0,  6,  0,  1;
  [6] 0,  0, 12,  0,  8,  0,  1;
  [7] 0,  8,  0, 24,  0, 10,  0,  1;
  [8] 0,  0, 32,  0, 40,  0, 12,  0, 1;
  [9] 0, 16,  0, 80,  0, 60,  0, 14, 0, 1;
The first few polynomials:
  p(0,x) = 1;
  p(1,x) = x;
  p(2,x) = x^2;
  p(3,x) = 2*x + x^3;
  p(4,x) = 4*x^2 + x^4;
  p(5,x) = 4*x + 6*x^3 + x^5;
  p(6,x) = 12*x^2 + 8*x^4 + x^6;
		

Crossrefs

Row sums are A001045 starting with 1, which is A152046. These are in signed form also the alternating row sums. Diagonal sums are aerated A133494.

Programs

  • Julia
    using Nemo # Returns row n.
    function A329918(row)
        R, x = PolynomialRing(ZZ, "x")
        function p(n)
            n < 3 && return x^n
            x*p(n-1) + 2*p(n-2)
        end
        p = p(row)
        [coeff(p, k) for k in 0:row]
    end
    for row in 0:9 println(A329918(row)) end # prints triangle
  • Maple
    T := (n, k) -> `if`((n+k)::odd, 0, 2^((n-k)/2)*binomial((n+k)/2-1, (n-k)/2)):
    seq(seq(T(n, k), k=0..n), n=0..11);

Formula

p(n) = x*p(n-1) + 2*p(n-2) for n >= 3; p(0) = 1, p(1) = x, p(2) = x^2.
T(n, k) = [x^k] p(n).
T(n, k) = 2^((n-k)/2)*binomial((n+k)/2-1, (n-k)/2) if n+k is even otherwise 0.
Previous Showing 51-60 of 68 results. Next