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.

A337564 Number of sequences of length 2*n covering an initial interval of positive integers and splitting into n maximal runs.

Original entry on oeis.org

1, 1, 6, 80, 1540, 38808, 1206744, 44595408, 1908389340, 92780281880, 5050066185736, 304196411024688, 20087958167374552, 1442953024024996400, 112007566256683719600, 9342904053303870936480, 833388624898522799682780, 79159669418651567937733080
Offset: 0

Views

Author

Gus Wiseman, Sep 03 2020

Keywords

Comments

Sequences covering an initial interval of positive integers are counted by A000670 and ranked by A333217.

Examples

			The a(0) = 1 through a(2) = 6 sequences:
  ()  (1,1)  (1,1,1,2)
             (1,1,2,2)
             (1,2,2,2)
             (2,1,1,1)
             (2,2,1,1)
             (2,2,2,1)
The a(3) = 80 sequences:
  212222  111121  122233  333112  211133
  221222  111211  133222  333211  233111
  222122  112111  222133  112233  331112
  222212  121111  222331  113322  332111
  122221  123333  331222  221133  111223
  211222  133332  332221  223311  111322
  221122  213333  122223  331122  221113
  222112  233331  132222  332211  223111
  112221  333312  222213  112223  311122
  122211  333321  222231  113222  322111
  211122  122333  312222  222113  111123
  221112  133322  322221  222311  111132
  111221  221333  112333  311222  211113
  112211  223331  113332  322211  231111
  122111  333122  211333  111233  311112
  211112  333221  233311  111332  321111
		

Crossrefs

A335461 has this as main diagonal n = 2*k.
A336108 is the version for compositions.
A337504 is the version for compositions and anti-runs.
A337505 is the version for anti-runs.
A000670 counts sequences covering an initial interval.
A005649 counts anti-runs covering an initial interval.
A124767 counts maximal runs in standard compositions.
A333769 gives run lengths in standard compositions.
A337504 counts compositions of 2*n with n maximal anti-runs.
A337565 gives anti-run lengths in standard compositions.

Programs

  • Mathematica
    allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
    Table[Length[Select[Join@@Permutations/@allnorm[2*n],Length[Split[#]]==n&]],{n,0,3}]
  • PARI
    \\ here b(n) is A005649.
    b(n) = {sum(k=0, n, stirling(n,k,2)*(k + 1)!)}
    a(n) = {if(n==0, 1, b(n-1)*binomial(2*n-1,n-1))} \\ Andrew Howroyd, Dec 31 2020

Formula

a(n) = A005649(n-1)*binomial(2*n-1,n-1) = A005649(n-1)*A001700(n-1) for n > 0. - Andrew Howroyd, Dec 31 2020

Extensions

Terms a(5) and beyond from Andrew Howroyd, Dec 31 2020

A337505 Number of sequences of length 2*n covering an initial interval of positive integers and splitting into n maximal anti-runs.

Original entry on oeis.org

1, 2, 24, 440, 10780, 329112, 12006456, 508903824, 24559486380, 1328964785720, 79670488601704, 5240336913228144, 375167786246499064, 29038998659140223600, 2416268289647552828400, 215068032231876851531040, 20389611819955706893052460, 2051184695261785540782403320
Offset: 0

Views

Author

Gus Wiseman, Sep 05 2020

Keywords

Comments

An anti-run is a sequence with no adjacent equal parts.

Examples

			The a(2) = 24 sequences:
  (2,1,2,2)  (1,2,3,3)  (1,2,2,3)  (1,1,2,3)
  (2,2,1,2)  (1,3,3,2)  (1,3,2,2)  (1,1,3,2)
  (1,2,2,1)  (2,1,3,3)  (2,2,1,3)  (2,1,1,3)
  (2,1,1,2)  (2,3,3,1)  (2,2,3,1)  (2,3,1,1)
  (1,1,2,1)  (3,3,1,2)  (3,1,2,2)  (3,1,1,2)
  (1,2,1,1)  (3,3,2,1)  (3,2,2,1)  (3,2,1,1)
		

Crossrefs

A336108 is the version for compositions and runs.
A337504 is the version for compositions.
A337506 has this as main diagonal n = 2*k.
A337564 is the version for runs.
A000670 counts sequences covering an initial interval.
A003242 counts anti-run compositions.
A005649 counts anti-runs covering an initial interval.
A124767 counts maximal runs in standard compositions.
A333381 counts maximal anti-runs in standard compositions.
A333769 gives run-lengths in standard compositions.
A337565 gives anti-run lengths in standard compositions.

Programs

  • Mathematica
    allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
    Table[Length[Select[Join@@Permutations/@allnorm[2*n],Length[Split[#,UnsameQ]]==n&]],{n,0,3}]
  • PARI
    \\ here b(n) is A005649.
    b(n) = {sum(k=0, n, stirling(n,k,2)*(k + 1)!)}
    a(n) = {b(n)*binomial(2*n-1,n)} \\ Andrew Howroyd, Dec 31 2020

Formula

a(n) = A005649(n)*binomial(2*n-1,n). - Andrew Howroyd, Dec 31 2020

Extensions

Terms a(5) and beyond from Andrew Howroyd, Dec 31 2020

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