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

A181296 The number of odd entries in all the 2-compositions of n.

Original entry on oeis.org

0, 2, 10, 48, 208, 864, 3472, 13640, 52664, 200616, 755992, 2823688, 10468856, 38570504, 141341944, 515532424, 1872673144, 6777925768, 24453094264, 87966879368, 315629269368, 1129834372744, 4035747287416, 14387491636872
Offset: 0

Views

Author

Emeric Deutsch, Oct 12 2010

Keywords

Comments

Also number of columns with distinct entries in all 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.

Examples

			a(2) = 10 because in the 2-compositions of 2, namely (1/1), (0/2), (2/0), (1,0/0,1), (0,1/1,0), (1,1/0,0), and (0,0/1,1), we have 2+0+0+2+2+2+2=10 odd entries (the 2-compositions are written as (top row / bottom row)).
a(1)=2 because in (0/1) and (1/0) we have a total of 2 columns with distinct entries (the 2-compositions are written as (top row / bottom row)).
		

Crossrefs

Programs

  • Maple
    g := 2*z*(1-z)^2/((1+z)*(1-4*z+2*z^2)^2): gser := series(g, z = 0, 30): seq(coeff(gser, z, n), n = 0 .. 25);
  • Mathematica
    CoefficientList[Series[(2x (1-x)^2)/((1+x)(1-4x+2x^2)^2),{x,0,30}],x] (* or *) LinearRecurrence[{7,-12,-4,12,-4},{0,2,10,48,208},30] (* Harvey P. Dale, Nov 11 2011 *)

Formula

G.f.: 2*z*(1-z)^2/((1+z)*(1-4*z+2*z^2)^2).
a(n) = Sum_{k=0..n} k*A181295(n,k) = Sum_{k=0..n} k*A181302(n,k).
a(n) = 2*A181305(n). - R. J. Mathar, Oct 28 2010
a(n) = 7*a(n-1)- 12*a(n-2)- 4*a(n-3)+12*a(n-4)-4*a(n-5). - Harvey P. Dale, Nov 11 2011
E.g.f.: exp(-x)*(exp(3*x)*(16*(1 + 7*x)*cosh(sqrt(2)*x) + sqrt(2)*(18 + 77*x)*sinh(sqrt(2)*x)) - 16)/98. - Stefano Spezia, May 11 2025

Extensions

Merged with a definition concerning row sums of A181302 - R. J. Mathar, Oct 28 2010

A181297 Triangle read by rows: T(n,k) is the number of 2-compositions of n having k even entries (0<=k<=n).

Original entry on oeis.org

1, 0, 2, 1, 0, 6, 0, 8, 0, 16, 3, 0, 35, 0, 44, 0, 28, 0, 132, 0, 120, 8, 0, 160, 0, 460, 0, 328, 0, 92, 0, 748, 0, 1528, 0, 896, 21, 0, 642, 0, 3117, 0, 4916, 0, 2448, 0, 290, 0, 3552, 0, 12062, 0, 15456, 0, 6688, 55, 0, 2380, 0, 17119, 0, 44318, 0, 47760, 0, 18272, 0, 888, 0
Offset: 0

Views

Author

Emeric Deutsch, Oct 12 2010

Keywords

Comments

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.
For the statistics "number of odd entries" see A181295.

Examples

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

Crossrefs

Programs

  • Maple
    G := (1-z^2)^2/(1-3*z^2+z^4-2*s*z-2*s^2*z^2+s^2*z^4): 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], s, k), k = 0 .. n) end do; # yields sequence in triangular form

Formula

G.f.: G(t,z) = (1-z^2)^2/(1-3*z^2+z^4-2*s*z-2*s^2*z^2+s^2*z^4).
The g.f. H(t,s,z), where z marks the size of the 2-composition and t (s) marks the number of odd (even) entries, is H=1/(1-h), where h=z(t+sz)(2s+tz-sz^2)/(1-z^2)^2.
Sum_{k=0..n} T(n,k) = A003480(n).
T(2*n-1,0) = 0.
T(2*n,0) = A000045(2*n) (Fibonacci numbers).
T(n,k) = 0 if n and k have opposite parities.
T(n,n) = A002605(n+1).
Sum_{k=0..n} k*T(n,k) = A181298(n).

A181298 The number of even entries in all the 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, 12, 56, 246, 1024, 4128, 16248, 62832, 239640, 903944, 3379064, 12536552, 46215672, 169443592, 618303864, 2246863624, 8135066488, 29358346888, 105642047864, 379143054472, 1357496762744, 4849952390792, 17293404551544
Offset: 0

Views

Author

Emeric Deutsch, Oct 12 2010

Keywords

Comments

a(n)=Sum(k*A181297(n,k),k=0..n).

Examples

			a(2)=12 because in the 2-compositions of 2, namely (1/1),(0/2),(2/0),(1,0/0,1),(0,1/1,0),(1,1/0,0), and (0,0/1,1), we have 0+2+2+2+2+2+2=12 odd entries (the 2-compositions are written as (top row/bottom row)).
		

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-z^2)/((1+z)*(1-4*z+2*z^2)^2): gser := series(g, z = 0, 30): seq(coeff(gser, z, n), n = 0 .. 25);

Formula

G.f. = 2z(1-z)^2*(1+z-z^2)/[(1+z)(1-4z+2z^2)^2].
a(n) = 2*A181337(n). - R. J. Mathar, Jul 26 2022
Showing 1-3 of 3 results.