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.

A336108 Number of compositions of 2*n with n maximal runs.

Original entry on oeis.org

1, 2, 4, 14, 36, 99, 274, 813, 2278, 6692, 19206, 56687, 164416, 486052, 1422654, 4214023, 12408476, 36825663, 108926976, 323856358, 961177042, 2862551860, 8518115200, 25407468667, 75763113682, 226297498429, 675951314988, 2021528322571, 6046881759308, 18104307275968, 54219605813884
Offset: 0

Views

Author

Gus Wiseman, Sep 04 2020

Keywords

Examples

			The a(0) = 1 through a(3) = 14 compositions:
  ()  (2)    (1,3)    (1,2,3)
      (1,1)  (3,1)    (1,3,2)
             (1,1,2)  (1,4,1)
             (2,1,1)  (2,1,3)
                      (2,3,1)
                      (3,1,2)
                      (3,2,1)
                      (1,1,3,1)
                      (1,2,2,1)
                      (1,3,1,1)
                      (2,1,1,2)
                      (1,1,1,2,1)
                      (1,1,2,1,1)
                      (1,2,1,1,1)
		

Crossrefs

A333755 has this as main diagonal n = 2*k.
A337504 is the version for anti-runs.
A337505 is the version for anti-run patterns.
A337564 is the version for patterns.
A003242 counts anti-run compositions.
A011782 counts compositions.
A106356 counts compositions by number of adjacent equal parts.
A124767 counts maximal runs in standard compositions.
A238343 counts compositions by descents.
A272919 ranks runs.
A333213 counts compositions by weak ascents.
A333769 gives run-lengths of standard compositions.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[2*n],Length[Split[#]]==n&]],{n,0,10}]
  • PARI
    a(n)={polcoef(polcoef((1 - y)/(1 - y - y*sum(d=1, 2*n, (1-y)^d*x^d/(1 - x^d) + O(x^(2*n+1)))),  2*n, x), n, y)} \\ Andrew Howroyd, Feb 02 2021

Formula

a(n) = A333755(2*n,n).
a(n) = [x^(2*n)*y^n] (1 - y)/(1 - y - y*Sum_{d>=1} (1-y)^d*x^d/(1 - x^d)). - Andrew Howroyd, Feb 02 2021

Extensions

Terms a(11) and beyond from Andrew Howroyd, Feb 02 2021