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

A181366 Least entry in a 2-composition of n, summed over 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, 1, 2, 5, 10, 20, 38, 74, 144, 282, 552, 1086, 2144, 4247, 8430, 16761, 33364, 66479, 132566, 264520, 528078, 1054636, 2106854, 4209853, 8413548, 16817253, 33618758, 67212301, 134384182, 268703498, 537302782, 1074437977, 2148606246
Offset: 1

Views

Author

Emeric Deutsch, Oct 15 2010

Keywords

Comments

a(n) = Sum(k*A181365(n,k), k>=0).

Examples

			a(2)=1 because the 2-compositions of 2, written as (top row / bottom row), are (1/1), (0/2), (2/0), (1,0/0,1), (0,1/1,0), (1,1/0,0), (0,0/1,1) and the least entries are 1 and eight 0's.
		

Crossrefs

Cf. A181365.

Programs

  • Maple
    h := proc (k) if k = 0 then (1-z)^2/(1-4*z+2*z^2) else (1-z)^2/(1-2*z+z^2-z^(2*k)) end if end proc: f := proc (k) options operator, arrow; h(k)-h(k+1) end proc: G := sum(k*f(k), k = 1 .. 50): Gser := series(G, z = 0, 45): seq(coeff(Gser, z, n), n = 1 .. 35);
  • Mathematica
    terms = 100;
    A[n_, k_] := A[n, k] = If[n==0, 1, Sum[If[i==0 && j==0, 0, A[n-i-j, k]], {j, k, n}, {i, k, n-j}]];
    T[n_, k_] := A[n, k] - A[n, k+1];
    a[n_] := Sum[k T[n, k], {k, 0, terms}];
    Array[a, terms] (* Jean-François Alcover, Nov 11 2020, after Alois P. Heinz in A181365 *)

Formula

a(n) = Sum_{k>=0} k*A181365(n,k).
G.f. for 2-compositions with all entries >= k is h(k,z)=(1-z)^2/(1-2z+z^2-z^{2k}) if k>0 and h(0,z)=(1-z)^2/(1-4z+2z^2) if k=0.
G.f. for 2-compositions with least entry k is f(k,z)=h(k,z)-h(k+1,z).
G.f.: G(z) = Sum(k*f(k,z), k=1..infinity).
a(n) ~ 2^(n-2). - Vaclav Kotesovec, Sep 03 2014

A181367 Number of 2-compositions of n containing at least one 0 entry. 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

2, 6, 22, 78, 272, 940, 3232, 11080, 37920, 129648, 443008, 1513248, 5168000, 17647552, 60258304, 205746304, 702484992, 2398480128, 8189016064, 27959235072, 95459170304, 325918735360, 1112757649408, 3799195224064
Offset: 1

Views

Author

Emeric Deutsch, Oct 15 2010

Keywords

Comments

a(n)=A181365(n,0).

Examples

			a(2)=6 because the 2-compositions of 2, written as (top row / bottom row), are (1/1), (0/2), (2/0), (1,0/0,1), (0,1/1,0), (1,1/0,0), (0,0/1,1) and only the first one does not contain a 0 entry.
		

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)^3/((1-2*z)*(1-4*z+2*z^2)): Gser := series(G, z = 0, 30): seq(coeff(Gser, z, n), n = 1 .. 25);
  • Mathematica
    CoefficientList[Series[(2x (1-x)^3)/((1-2x)(1-4x+2x^2)),{x,0,30}],x] (* Harvey P. Dale, Mar 29 2020 *)

Formula

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