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

A181308 Triangle read by rows: T(n,k) is the number of 2-compositions of n having k columns with an odd sum (0<=k<=n). A 2-composition of n is a nonnegative matrix with two rows, such that each column has at least one nonzero entry and whose entries sum up to n.

Original entry on oeis.org

1, 0, 2, 3, 0, 4, 0, 16, 0, 8, 14, 0, 52, 0, 16, 0, 104, 0, 144, 0, 32, 64, 0, 460, 0, 368, 0, 64, 0, 616, 0, 1624, 0, 896, 0, 128, 292, 0, 3428, 0, 5056, 0, 2112, 0, 256, 0, 3456, 0, 14688, 0, 14528, 0, 4864, 0, 512, 1332, 0, 23132, 0, 53920, 0, 39488, 0, 11008, 0, 1024, 0
Offset: 0

Views

Author

Emeric Deutsch, Oct 13 2010

Keywords

Comments

The sum of entries in row n is A003480(n).
T(n,k) = 0 if n and k have opposite parities.
T(2n,0) = A060801(n).
Sum(k*T(n,k), k=0..n) = A181326(n).
For the statistic "number of column with an even sum" see A181327.

Examples

			T(2,2) = 4 because we have (1,0/0,1), (0,1/1,0), (1,1/0,0), and (0,0/1,1) (the 2-compositions are written as (top row/bottom row)).
Triangle starts:
1;
0,  2;
3,  0,  4;
0, 16,  0, 8;
14, 0, 52, 0, 16;
		

Crossrefs

Programs

  • Maple
    G := (1-z^2)^2/(1-5*z^2+2*z^4-2*t*z): Gser := simplify(series(G, z = 0, 15)): for n from 0 to 11 do P[n] := sort(coeff(Gser, z, n)) end do; for n from 0 to 11 do seq(coeff(P[n], t, k), k = 0 .. n) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n) option remember; `if`(n=0, 1,
           expand(add(add(`if`(i=0 and j=0, 0, b(n-i-j)*
           `if`(irem(i+j,2)=1, x, 1)), i=0..n-j), j=0..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n)):
    seq(T(n), n=0..15); # Alois P. Heinz, Mar 16 2014
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, Expand[Sum[Sum[If[i == 0 && j == 0, 0, b[n-i-j]* If[Mod[i+j, 2] == 1, x, 1]], {i, 0, n-j}], {j, 0, n}]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n]]; Table[T[n], {n, 0, 15}] // Flatten (* Jean-François Alcover, Feb 19 2015, after Alois P. Heinz *)

Formula

G.f.: G(t,z) = (1-z)^2*(1+z)^2/(1-5z^2+2z^4-2tz).
The g.f. of column k is (2z)^k*(1-z^2)^2/(1-5z^2+2z^4)^{k+1} (we have a Riordan array).
The g.f. H(t,s,z), where z marks size and t (s) marks number of columns with an odd (even) sum, is H=(1-z^2)^2/(1-2z^2+z^4-2tz-3sz^2+sz^4).

A181326 Number of columns with an odd sum in all 2-compositions of n. A 2-composition of n is a nonnegative matrix with two rows, such that each column has at least one nonzero entry and whose entries sum up to n.

Original entry on oeis.org

0, 2, 8, 40, 168, 696, 2776, 10864, 41800, 158816, 597176, 2226512, 8242344, 30328160, 111013784, 404518640, 1468154504, 5309771264, 19143323000, 68823556368, 246805713000, 883028659744, 3152718627672, 11234773009200
Offset: 0

Views

Author

Emeric Deutsch, Oct 13 2010

Keywords

Comments

a(n)=Sum(A181308(n,k), k=0..n).
For the "even sum" case, see A181328.

Examples

			a(2)=8 because in (0/2),(1/1),(2,0),(1,0/0,1),(0,1/1,0),(1,1/0,0), and (0,0/1,1) (the 2-compositions are written as (top row/bottom row)) we have 0+0+0+2+2+2+2=8 columns with odd sums.
		

References

  • G. Castiglione, A. Frosini, E. Munarini, A. Restivo and S. Rinaldi, Combinatorial aspects of L-convex polyominoes, European Journal of Combinatorics, 28, 2007, 1724-1741.

Crossrefs

Programs

  • Maple
    g := 2*z*(1-z)^2/((1+z)^2*(1-4*z+2*z^2)^2): gser := series(g, z = 0, 30): seq(coeff(gser, z, n), n = 0 .. 27);

Formula

G.f. = 2z(1-z)^2/[(1+z)(1-4z+2z^2)]^2.

A181328 Number of columns with an even sum in all 2-compositions of n. A 2-composition of n is a nonnegative matrix with two rows, such that each column has at least one nonzero entry and whose entries sum up to n.

Original entry on oeis.org

0, 0, 3, 12, 59, 248, 1024, 4080, 15948, 61312, 232792, 874864, 3260360, 12064928, 44378984, 162399504, 591613880, 2146724864, 7762397576, 27980907248, 100580448920, 360636908000, 1290131211432, 4605675085008, 16410645183928
Offset: 0

Views

Author

Emeric Deutsch, Oct 13 2010

Keywords

Comments

a(n)=Sum(A181327(n,k), k>=0).

Examples

			a(2)=3 because in (0/2), (1/1), (2,0), (1,0 / 0,1), (0,1 / 1,0), (1,1 / 0,0), and (0,0 / 1,1) (the 2-compositions are written as (top row / bottom row)) we have 1+1+1+0+0+0+0=3 columns with even sums.
		

References

  • G. Castiglione, A. Frosini, E. Munarini, A. Restivo and S. Rinaldi, Combinatorial aspects of L-convex polyominoes, European Journal of Combinatorics, 28, 2007, 1724-1741.

Crossrefs

Programs

  • Maple
    g := z^2*(1-z)^2*(3-z^2)/((1+z)^2*(1-4*z+2*z^2)^2): gser := series(g, z = 0, 30): seq(coeff(gser, z, n), n = 0 .. 27);

Formula

G.f. = z^2*(1-z)^2*(3-z^2)/[(1+z)(1-4z+2z^2)]^2.
a(n) = (3*A181326(n-1) -A181326(n-3))/2. - R. J. Mathar, Jul 24 2022

A181329 Number of 2-compositions of n having no column with an even sum. A 2-composition of n is a nonnegative matrix with two rows, such that each column has at least one nonzero entry and whose entries sum up to n.

Original entry on oeis.org

1, 2, 4, 12, 32, 86, 232, 624, 1680, 4522, 12172, 32764, 88192, 237390, 638992, 1720000, 4629792, 12462194, 33544980, 90294348, 243048864, 654224230, 1761001208, 4740156528, 12759266608, 34344622042, 92446776092, 248842639740, 669819565056, 1802979787550, 4853151929120
Offset: 0

Views

Author

Emeric Deutsch, Oct 13 2010

Keywords

Comments

a(n) = A181327(n,0).
Number of compositions of n into odd parts where there is 2 sorts of part 1, 4 sorts of part 3, 6 sorts of part 5, ... , 2*k sorts of part 2*k-1. - Joerg Arndt, Aug 04 2014

Examples

			a(2)=4 because we have (1,0/0,1),(0,1/1,0),(1,1/0,0), and (0,0/1,1) (the 2-compositions are written as (top row/bottom row)).
		

Crossrefs

Cf. A181327.

Programs

  • Maple
    g := (1-z^2)^2/(1-2*z-2*z^2+z^4): gser := series(g, z = 0, 32): seq(coeff(gser, z, n), n = 0 .. 30);
  • Mathematica
    CoefficientList[Series[(1 - x^2)^2/(1 - 2 x - 2 x^2 + x^4), {x, 0, 40}], x] (* Vincenzo Librandi, Aug 05 2014 *)
  • PARI
    Vec((1-z^2)^2/(1-2*z-2*z^2+z^4) + O(z^30)) \\ Stefano Spezia, Sep 05 2025

Formula

G.f.: (1-z^2)^2/(1-2*z-2*z^2+z^4).
Showing 1-4 of 4 results.