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-20 of 31 results. Next

A131333 A131332 * A000012.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 2, 2, 1, 5, 3, 4, 2, 1, 8, 5, 7, 4, 3, 1, 13, 8, 12, 7, 7, 3, 1, 21, 13, 20, 12, 14, 7, 4, 1, 34, 21, 33, 20, 26, 14, 11, 4, 1, 55, 34, 54, 33, 46, 26, 25, 11, 5, 1
Offset: 1

Views

Author

Gary W. Adamson, Jun 29 2007

Keywords

Comments

Leftmost two columns = Fibonacci numbers. Row sums = A029907: (1, 2, 4, 8, 15, 28, 51,...).

Examples

			First few rows of the triangle are:
1;
1, 1;
2, 1, 1;
3, 2, 2, 1;
5, 3, 4, 2, 1;
8, 5, 7, 4, 3, 1;
13, 8, 12, 7, 7, 3, 1;
21, 13, 20, 12, 14, 7, 4, 1;
...
		

Crossrefs

Formula

A131332 * A000012, where A000012 = (1; 1,1; 1,1,1;...). Partial sums of A131332 rows starting from the right.

A268103 T(n,k)=Number of nXk 0..k arrays with every repeated value in every row and column greater than or equal to the previous repeated value.

Original entry on oeis.org

2, 9, 4, 64, 81, 8, 615, 4096, 729, 15, 7536, 378225, 262144, 6084, 28, 112476, 56791296, 232608375, 15625000, 49284, 51, 1981512, 12650850576, 427979206656, 134114290153, 895841344, 386884, 92, 40265487, 3926389806144
Offset: 1

Views

Author

R. H. Hardin, Jan 26 2016

Keywords

Comments

Table starts
..2.....9........64............615.................7536................112476
..4....81......4096.........378225.............56791296...........12650850576
..8...729....262144......232608375.........427979206656......1422917069386176
.15..6084..15625000...134114290153.....3042807800530752.151823094341278467866
.28.49284.895841344.74223748225767.20777755411841736998

Examples

			Some solutions for n=5 k=4
..0..0..0..0....0..0..0..0....0..0..0..0....0..0..0..0....0..0..0..0
..0..0..0..1....0..0..0..0....0..0..0..0....0..0..0..0....0..0..0..1
..0..0..0..1....0..0..0..1....0..0..0..2....0..0..0..3....0..0..0..0
..0..0..0..0....0..0..3..0....0..0..0..4....0..0..1..0....0..0..1..3
..1..1..1..1....0..1..0..4....4..0..1..4....3..4..0..1....4..1..0..4
		

Crossrefs

Column 1 is A029907(n+1).
Column 2 is A268014.
Column 3 is A267994.

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-1) +a(n-2) -2*a(n-3) -a(n-4)
k=2: [order 15]
k=3: [order 40]

A119473 Triangle read by rows: T(n,k) is number of binary words of length n and having k runs of 0's of odd length, 0 <= k <= ceiling(n/2). (A run of 0's is a subsequence of consecutive 0's of maximal length.)

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 1, 5, 8, 3, 8, 15, 8, 1, 13, 28, 19, 4, 21, 51, 42, 13, 1, 34, 92, 89, 36, 5, 55, 164, 182, 91, 19, 1, 89, 290, 363, 216, 60, 6, 144, 509, 709, 489, 170, 26, 1, 233, 888, 1362, 1068, 446, 92, 7, 377, 1541, 2580, 2266, 1105, 288, 34, 1, 610, 2662, 4830
Offset: 0

Views

Author

Emeric Deutsch, May 22 2006

Keywords

Comments

Row n has 1+ceiling(n/2) terms.
T(n,0) = Fibonacci(n+1) = A000045(n+1).
T(n,1) = A029907(n).
Sum_{k>=0} k*T(n,k) = A059570(n).
Triangle, with zeros included, given by (1,1,-1,0,0,0,0,0,0,0,...) DELTA (1,-1,0,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Dec 07 2011
T(n,k) is the number of compositions of n+1 that have exactly k even parts. - Geoffrey Critzer, Mar 03 2012

Examples

			T(5,2)=8 because we have 00010, 01000, 01011, 01101, 01110, 10101, 10110 and 11010.
T(5,2)=8 because there are 8 compositions of 6 that have 2 even parts: 4+2, 2+4, 2+2+1+1, 2+1+2+1, 2+1+1+2, 1+2+2+1, 1+2+1+2, 1+1+2+2. - _Geoffrey Critzer_, Mar 03 2012
Triangle starts:
  1;
  1,  1;
  2,  2;
  3,  4,  1;
  5,  8,  3;
  8, 15,  8,  1;
From _Philippe Deléham_, Dec 07 2011: (Start)
Triangle (1,1,-1,0,0,0...) DELTA (1,-1,0,0,0,...) begins:
   1;
   1,  1;
   2,  2,  0;
   3,  4,  1,  0;
   5,  8,  3,  0,  0;
   8, 15,  8,  1,  0,  0;
  13, 28, 19,  4,  0,  0,  0;
  21, 51, 42, 13,  1,  0,  0,  0;
  34, 92, 89, 36,  5,  0,  0,  0,  0; ... (End)
		

References

  • I. Goulden and D. Jackson, Combinatorial Enumeration, John Wiley and Sons, 1983, page 54.

Crossrefs

Programs

  • Maple
    G:=(1+t*z)/(1-z-z^2-t*z^2): Gser:=simplify(series(G,z=0,18)): P[0]:=1: for n from 1 to 14 do P[n]:=sort(coeff(Gser,z^n)) od: for n from 0 to 14 do seq(coeff(P[n],t,j),j=0..ceil(n/2)) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n) option remember; local j; if n=0 then 1
          else []; for j to n do zip((x, y)->x+y, %,
          [`if`(irem(j, 2)=0, 0, NULL), b(n-j)], 0) od; %[] fi
        end:
    T:= n-> b(n+1):
    seq(T(n), n=0..14);  # Alois P. Heinz, May 23 2013
  • Mathematica
    f[list_] := Select[list, # > 0 &]; nn = 15; a = (x + y x^2)/(1 - x^2); Map[f, Drop[CoefficientList[Series[1/(1 - a), {x, 0, nn}], {x, y}], 1]] // Flatten  (* Geoffrey Critzer, Mar 03 2012 *)

Formula

G.f.: (1+t*z)/(1-z-z^2-t*z^2).
G.f. of column k (k>=1): z^(2*k-1)*(1-z^2)/(1-z-z^2)^(k+1).
T(n,k) = T(n-1,k) + T(n-2,k) + T(n-2,k-1). - Philippe Deléham, Dec 07 2011
Sum_{k=0..n} T(n,k)*x^k = A000045(n+1), A000079(n), A105476(n+1), A159612(n+1), A189732(n+1) for x = 0, 1, 2, 3, 4 respectively. - Philippe Deléham, Dec 07 2011
G.f.: (1+x*y)*T(0)/2, where T(k) = 1 + 1/(1 - (2*k+1+ x*(1+y))*x/((2*k+2+ x*(1+y))*x + 1/T(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Nov 06 2013

A205575 Triangle read by rows, related to Pascal's triangle, starting with rows 1; 1,0.

Original entry on oeis.org

1, 1, 0, 2, 2, 1, 3, 5, 4, 1, 5, 12, 14, 8, 2, 8, 25, 38, 32, 15, 3, 13, 50, 94, 104, 71, 28, 5, 21, 96, 215, 293, 260, 149, 51, 8, 34, 180, 468, 756, 822, 612, 304, 92, 13, 55, 331, 980, 1828, 2346, 2136, 1376, 604, 164, 21
Offset: 0

Views

Author

Philippe Deléham, Jan 29 2012

Keywords

Comments

Antidiagonal sums are in A052980, row sums are in A046717.
Similar to A091533 and to A091562. Triangle satisfying the same recurrence as A091533 and A091562, but with the initial values T(0,0) = 1, T(0,1) = 1, T(1,1) = 0.

Examples

			Triangle begins :
1
1, 0
2, 2, 1
3, 5, 4, 1
5, 12, 14, 8, 2
8, 25, 38, 32, 15, 3
13, 50, 94, 104, 71, 28, 5
		

Crossrefs

Cf. Column 0: A000045, Diagonals : A000045, A029907, A036681.
Cf. A090171, A090172, A090173, A090174, A091533, A091562 (same recurrence).

Programs

  • PARI
    T(n,k) = {if(n<0, return(0)); if (n==0, if (k<0, return(0)); if (k==0, return(1))); if (n==1, if (k<0, return(0)); if (k==0, return(1)); if (k==1, return(0))); T(n-1,k)+T(n-1,k-1)+T(n-2,k)+T(n-2,k-1)+T(n-2,k-2);} \\ Michel Marcus, Oct 27 2021

Formula

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, k>=0, with initial conditions specified by first two rows. T(0,0) = 1, T(1,0) = 1, T(1,1) = 0.

Extensions

a(46), a(48) corrected by Georg Fischer, Oct 27 2021

A054453 Triangle of partial row sums of triangle A054450(n,m), n >= m >= 0.

Original entry on oeis.org

1, 2, 1, 4, 2, 1, 8, 5, 2, 1, 15, 10, 6, 2, 1, 28, 20, 12, 7, 2, 1, 51, 38, 26, 14, 8, 2, 1, 92, 71, 50, 33, 16, 9, 2, 1, 164, 130, 97, 64, 41, 18, 10, 2, 1, 290, 235, 180, 130, 80, 50, 20, 11, 2, 1, 509, 420, 332, 244, 171, 98, 60, 22, 12, 2, 1
Offset: 0

Views

Author

Wolfdieter Lang, Apr 27 2000 and May 08 2000

Keywords

Comments

In the language of the Shapiro et al. reference (given in A053121) such a lower triangular (ordinary) convolution array, considered as a matrix, belongs to the Riordan-group. The G.f. for the row polynomials p(n,x) (increasing powers of x) is ((1-z^2)*(Fib(z))^2)/(1-x*z/(1-z^2)) Fib(x)=1/(1-x-x^2) = g.f. for A000045(n+1) (Fibonacci numbers without 0).
This is the second member of the family of Riordan-type matrices obtained from the unsigned convolution matrix A049310(n,m) by repeated application of the partial row sums procedure.
The column sequences are A029907, A001629, A054454 for m=0..2.

Examples

			{1}; {2,1}; {4,2,1}; {8,5,2,1};...
Fourth row polynomial (n=3): p(3,x)= 8+5*x+2*x^2+x^3
		

Crossrefs

Cf. A049310, A054450, A000045, A029907, A001629. Row sums: A054455(n).

Formula

a(n, m)=sum(A054450(n, k), k=m..n), n >= m >= 0, a(n, m) := 0 if n
Column m recursion: a(n, m)= sum(a(j-1, m)*|A049310(n-j, 0)|, j=m..n) + A054450(n, m), n >= m >= 0, a(n, m) := 0 if n
G.f. for column m: ((1-x^2)*(Fib(x))^2)*(x/(1-x^2))^m, m >= 0, with Fib(x) G.f. for A000045(n+1).

A099573 Reverse of number triangle A054450.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 4, 5, 1, 1, 5, 5, 8, 8, 1, 1, 6, 6, 12, 12, 13, 1, 1, 7, 7, 17, 17, 21, 21, 1, 1, 8, 8, 23, 23, 33, 33, 34, 1, 1, 9, 9, 30, 30, 50, 50, 55, 55, 1, 1, 10, 10, 38, 38, 73, 73, 88, 88, 89, 1, 1, 11, 11, 47, 47, 103, 103, 138, 138, 144, 144, 1, 1, 12, 12, 57, 57, 141, 141, 211, 211, 232, 232, 233
Offset: 0

Author

Paul Barry, Oct 23 2004

Keywords

Examples

			First few rows of the array:
  1, 1, 2, 3,  5,  8, ... (A000045)
  1, 1, 3, 4,  8, 12, ... (A052952)
  1, 1, 4, 5, 12, 17, ... (A054451)
  1, 1, 5, 6, 17, 23, ... (A099571)
  1, 1, 6, 7, 23, 30, ... (A099572)
  ...
Triangle begins as:
  1;
  1, 1;
  1, 1, 2;
  1, 1, 3, 3;
  1, 1, 4, 4,  5;
  1, 1, 5, 5,  8,  8;
  1, 1, 6, 6, 12, 12, 13;
  1, 1, 7, 7, 17, 17, 21, 21;
  1, 1, 8, 8, 23, 23, 33, 33, 34;
  1, 1, 9, 9, 30, 30, 50, 50, 55, 55;
		

Crossrefs

Cf. A099571, A099572, A099574 (diagonal sums), A099575.

Programs

  • Magma
    [(&+[Binomial(n-j,j): j in [0..Floor(k/2)]]): k in [0..n], n in [0..15]]; // G. C. Greubel, Jul 25 2022
    
  • Mathematica
    T[n_, k_]:= Sum[Binomial[n-j,j], {j,0,Floor[k/2]}];
    Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Jul 25 2022 *)
  • SageMath
    def A099573(n,k): return sum(binomial(n-j, j) for j in (0..(k//2)))
    flatten([[A099573(n,k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Jul 25 2022

Formula

Number triangle T(n, k) = Sum_{j=0..floor(k/2)} binomial(n-j, j) if k <= n, 0 otherwise.
T(n, n) = A000045(n+1).
Sum_{k=0..floor(n/2)} T(n-k, k) = A099574(n).
Sum_{k=0..n} T(n, k) = A029907(n+1).
Antidiagonals of the following array: the first row equals the Fibonacci numbers, (1, 1, 2, 3, 5, ...), and the (n+1)-st row is obtained by the matrix-vector product A128174 * n-th row. - Gary W. Adamson, Jan 19 2011
From G. C. Greubel, Jul 25 2022: (Start)
T(n, n-1) = A052952(n-1), n >= 1.
T(n, n-2) = A054451(n-2), n >= 2.
T(n, n-3) = A099571(n-3), n >= 3.
T(n, n-4) = A099572(n-4), n >= 4. (End)

A099576 Row sums of triangle A099575.

Original entry on oeis.org

1, 2, 6, 12, 35, 72, 210, 440, 1287, 2730, 8008, 17136, 50388, 108528, 319770, 692208, 2042975, 4440150, 13123110, 28614300, 84672315, 185122080, 548354040, 1201610592, 3562467300, 7821594872, 23206929840, 51037462560, 151532656696
Offset: 0

Author

Paul Barry, Oct 23 2004

Keywords

Crossrefs

Programs

  • Magma
    [(&+[Binomial(n+Floor(k/2)+1, Floor(k/2)+1)*(1+Floor(k/2))/(n+1): k in [0..n]]): n in [0..40]]; // G. C. Greubel, Jul 24 2022
    
  • Maple
    seq(op([(1+n/(n+1))*binomial(3*n+1,n),2*binomial(3*n+3,n)]),n=0..20);
  • Mathematica
    a[n_] := Sum[Binomial[n + j, j], {k, 0, n}, {j, 0, k/2}];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jul 06 2018 *)
    a[n_] := Binomial[2*n+2, n]*Hypergeometric2F1[-n, n+1, -2*n-2, -1]; Flatten[Table[a[n], {n, 0, 28}]] (* Detlef Meya, Dec 25 2023 *)
  • PARI
    a(n) = sum(k=0, n, sum(j=0, floor(k/2), binomial(n+j, j))); \\ Andrew Howroyd, Feb 13 2018
    
  • SageMath
    [sum( binomial(n+(k//2)+1, (k//2)+1)*(1+(k//2))/(n+1) for k in (0..n) ) for n in (0..40)] # G. C. Greubel, Jul 24 2022

Formula

a(n) = Sum_{k=0..n} Sum_{j=0..floor(k/2)} binomial(n+j, j).
Conjecture: 4*n*(n-1)*(3*n+2)*(n+2)*a(n) - 36*(n-1)*(n+1)*a(n-1) - 3*n*(3*n+5)*(3*n-1)*(3*n-2)*a(n-2) = 0. - R. J. Mathar, Nov 28 2014
From Robert Israel, May 08 2018: (Start)
a(2*n) = (1+n/(n+1))*binomial(3*n+1,n).
a(2*n+1) = 2*binomial(3*n+3,n).
The conjecture follows from this. (End)
a(n) = (1/(n+1))*Sum_{k=0..n} binomial(n + floor(k/2) + 1, floor(k/2) + 1)*(1 + floor(k/2)). - G. C. Greubel, Jul 24 2022
a(n) = binomial(2*n+2, n)*hypergeom([-n, n+1], [-2*n-2], -1). - Detlef Meya, Dec 25 2023

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

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 4, 2, 1, 4, 8, 8, 3, 1, 5, 13, 19, 15, 5, 1, 6, 19, 36, 42, 28, 8, 1, 7, 26, 60, 91, 89, 51, 13, 1, 8, 34, 92, 170, 216, 182, 92, 21, 1, 9, 43, 133, 288, 446, 489, 363, 164, 34, 1, 10, 53, 184, 455, 826, 1105, 1068, 709, 290, 55, 1, 11, 64, 246, 682, 1414, 2219, 2619, 2266, 1362, 509, 89
Offset: 0

Author

Clark Kimberling, Aug 04 2011

Keywords

Comments

See A193722 for the definition of fusion of two sequences of polynomials or triangular arrays.

Examples

			First six rows:
  1;
  1,  1;
  1,  2,  1;
  1,  3,  4,  2;
  1,  4,  8,  8,  3;
  1,  5, 13, 19, 15,  5;
		

Crossrefs

Cf. A000007, A005314 (diagonal sums), A052542 (row sums), A077962.

Programs

  • Magma
    function T(n,k) // T = A193736
      if k lt 0 or n lt 0 then return 0;
      elif n lt 3 then return Binomial(n,k);
      else return T(n-1, k) + T(n-1, k-1) + T(n-2, k-2);
      end if;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 24 2023
    
  • Mathematica
    (* First program *)
    p[0, x_] := 1
    p[n_, x_] := Fibonacci[n + 1, x] /; n > 0
    q[n_, x_] := (x + 1)^n
    t[n_, k_] := Coefficient[p[n, x], x^(n - k)];
    t[n_, n_] := p[n, x] /. x -> 0;
    w[n_, x_] := Sum[t[n, k]*q[n - k + 1, 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}]] (* A193736 *)
    TableForm[Table[g[n], {n, -1, z}]]
    Flatten[Table[g[n], {n, -1, z}]]          (* A193737 *)
    (* Second program *)
    T[n_, k_]:= T[n, k]= If[n<3, Binomial[n, k], T[n-1,k] +T[n-1,k-1] +T[n -2,k-2]];
    Table[T[n, k], {n,0,12}, {k,0,n}]//TableForm (* G. C. Greubel, Oct 24 2023 *)
  • SageMath
    def T(n,k): # T = A193736
        if (n<3): return binomial(n,k)
        else: return T(n-1,k) +T(n-1,k-1) +T(n-2,k-2)
    flatten([[T(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Oct 24 2023

Formula

T(0,0) = T(1,0) = T(1,1) = T(2,0) = T(2,2) = 1; T(n,k) = 0 if k<0 or k>n; T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k-2). - Philippe Deléham, Feb 13 2020
From G. C. Greubel, Oct 24 2023: (Start)
T(n, k) = A193737(n, n-k).
T(n, n) = Fibonacci(n) + [n=0] = A324969(n+1).
T(n, n-1) = A029907(n).
Sum_{k=0..n} T(n, k) = A052542(n).
Sum_{k=0..n} (-1)^k * T(n, k) = A000007(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A005314(n) + [n=0].
Sum_{k=0..floor(n/2)} (-1)^k * T(n-k, k) = [n=0] + A077962(n-1). (End)

A207611 Triangle of coefficients of polynomials v(n,x) jointly generated with A207610; see Formula section.

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 5, 4, 2, 1, 8, 8, 5, 2, 1, 13, 15, 11, 6, 2, 1, 21, 28, 23, 14, 7, 2, 1, 34, 51, 47, 32, 17, 8, 2, 1, 55, 92, 93, 70, 42, 20, 9, 2, 1, 89, 164, 181, 148, 97, 53, 23, 10, 2, 1, 144, 290, 346, 306, 217, 128, 65, 26, 11, 2, 1, 233, 509, 653, 619, 472
Offset: 1

Author

Clark Kimberling, Feb 19 2012

Keywords

Comments

Column 1: Fibonacci numbers, A000045
Column 2: A029907
Row sums: A003945.
For a discussion and guide to related arrays, see A208510.
Subtriangle of the triangle given by (0, 2, -1/2, -1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Mar 25 2012

Examples

			First five rows:
  1;
  2, 1;
  3, 2, 1;
  5, 4, 2, 1;
  8, 8, 5, 2, 1;
From _Philippe Deléham_, Mar 25 2012: (Start)
(0, 2, -1/2, -1/2, 0, 0, ...) DELTA (1, 0, -1, 1, 0, 0, ...) begins:
  1;
  0,  1;
  0,  2,  1;
  0,  3,  2,  1;
  0,  5,  4,  2,  1;
  0,  8,  8,  5,  2,  1;
  0, 13, 15, 11,  6,  2,  1;
  0, 21, 28, 23, 14,  7,  2,  1; (End)
		

Crossrefs

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := u[n - 1, x] + v[n - 1, x]
    v[n_, x_] := u[n - 1, x] + x*v[n - 1, x] + 1
    Table[Factor[u[n, x]], {n, 1, z}]
    Table[Factor[v[n, x]], {n, 1, z}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]    (* A207610 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]    (* A207611 *)
    T[ n_, k_] := Which[k<0 || n<0, 0, n<2, Boole[k<=n] + Boole[k==0&&n==1], True, T[n, k] = T[n-1, k] + T[n-1, k-1] + T[n-2, k] - T[n-2, k-1] ]; (* Michael Somos, Sep 19 2024 *)
  • PARI
    {T(n, k) = if(k<0 || n<0, 0, n<2, (k<=n) + (k==0 && n==1), T(n-1, k) + T(n-1, k-1) + T(n-2, k) - T(n-2, k-1) )}; /* Michael Somos, Sep 19 2024 */
  • Python
    from sympy import Poly
    from sympy.abc import x
    def u(n, x): return 1 if n==1 else u(n - 1, x) + v(n - 1, x)
    def v(n, x): return 1 if n==1 else u(n - 1, x) + x*v(n - 1, x) + 1
    def a(n): return Poly(v(n, x), x).all_coeffs()[::-1]
    for n in range(1, 13): print(a(n)) # Indranil Ghosh, May 28 2017
    

Formula

u(n,x) = u(n-1,x) + v(n-1,x), v(n,x) = u(n-1,x) + x*v(n-1,x)+1, where u(1,x)=1, v(1,x)=1.
T(n,k) = T(n-1,k) + (n-1,k-1) + T(n-2,k) - T(n-2,k-1), T(1,0) = T(2,1) = 1, T(2,0) = 2 and T(n,k) = 0 if k < 0 or if k >= n.

A239342 Number of 1's in all compositions of n into odd parts.

Original entry on oeis.org

0, 1, 2, 3, 6, 11, 20, 36, 64, 113, 198, 345, 598, 1032, 1774, 3039, 5190, 8839, 15016, 25452, 43052, 72685, 122502, 206133, 346346, 581136, 973850, 1630011, 2725254, 4551683, 7594748, 12660660, 21087448, 35094377, 58360134, 96979089, 161042110, 267248664
Offset: 0

Author

Geoffrey Critzer, Mar 16 2014

Keywords

Comments

a(n+1) is the number of ways to tile a strip of length n+1 using white tiles of only odd lengths, with total length n, and one red square of length one. - Gregory L. Simay, Aug 14 2016
A029907, the number of compositions of n with exactly one even part, is equal to a(n+1-2) + a(n+1-4) + a(n+1-6) + ... - Gregory L. Simay, Aug 14 2016
Apart from the initial 0 and 1, this is the p-INVERT transform of (1,0,1,0,1,0,...) for p(S) = (1 - S)^2. See A291219. - Clark Kimberling, Sep 02 2017

Examples

			a(5) = 11 because in the compositions of 5 into odd parts there are a total of 11 1's: 5, 3+1+1, 1+3+1, 1+1+3, 1+1+1+1+1.
Let r represent the red square and 1,3,5 represent the possible odd lengths of the white squares for n=5. Then a(5+1) = a(6) = 20 because r combined with a tile of length 5 generates 2 compositions; r combined with 3,1,1 generates 12 compositions; and r combined with 1,1,1,1,1 generates 6 compositions. 2+12+6 = 20. - _Gregory L. Simay_, Aug 14 2016
		

References

  • S. Heubach and T. Mansour, Combinatorics of Compositions and Words, Chapman and Hall, 2010, page 70.

Crossrefs

Programs

  • Mathematica
    nn=30;CoefficientList[Series[x (1-x^2)^2/(1-x-x^2)^2,{x,0,nn}],x]
    (* or *)
    Table[Count[Flatten[Level[Map[Permutations,IntegerPartitions[n,n,Table[2k+1,{k,0,n/2}]]],{2}]],1],{n,0,30}]

Formula

For n >= 4, a(n) = a(n-1) + a(n-2) + A000045(n-2).
G.f.: x*(1 - x^2)^2/(1 - x - x^2)^2.
Previous Showing 11-20 of 31 results. Next