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

A384175 Number of subsets of {1..n} with all distinct lengths of maximal runs (increasing by 1).

Original entry on oeis.org

1, 2, 4, 7, 13, 24, 44, 77, 135, 236, 412, 713, 1215, 2048, 3434, 5739, 9559, 15850, 26086, 42605, 69133, 111634, 179602, 288069, 460553, 733370, 1162356, 1833371, 2878621, 4501856, 7016844, 10905449, 16904399, 26132460, 40279108, 61885621, 94766071, 144637928
Offset: 0

Views

Author

Gus Wiseman, Jun 16 2025

Keywords

Examples

			The subset {2,3,5,6,7,9} has maximal runs ((2,3),(5,6,7),(9)), with lengths (2,3,1), so is counted under a(9).
The a(0) = 1 through a(4) = 13 subsets:
  {}  {}   {}     {}       {}
      {1}  {1}    {1}      {1}
           {2}    {2}      {2}
           {1,2}  {3}      {3}
                  {1,2}    {4}
                  {2,3}    {1,2}
                  {1,2,3}  {2,3}
                           {3,4}
                           {1,2,3}
                           {1,2,4}
                           {1,3,4}
                           {2,3,4}
                           {1,2,3,4}
		

Crossrefs

For equal instead of distinct lengths we have A243815.
These subsets are ranked by A328592.
The complement is counted by A384176.
For anti-runs instead of runs we have A384177, ranks A384879.
For partitions instead of subsets we have A384884, A384178, A384886, A384880.
For permutations instead of subsets we have A384891, equal instead of distinct A384892.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A098859 counts Wilf partitions (distinct multiplicities), complement A336866.
A384893 counts subsets by number of maximal anti-runs, for partitions A268193, A384905.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],UnsameQ@@Length/@Split[#,#2==#1+1&]&]],{n,0,10}]
  • PARI
    lista(n)={my(o=(1-x^(n+1))/(1-x)*O(y^(n+2)),p=prod(i=1,n,1+o+x*y^(i+1)/(1-y),1/(1-y)));p=subst(serlaplace(p),x,1);Vec(p-1)} \\ Christian Sievers, Jun 18 2025

Extensions

a(21) and beyond from Christian Sievers, Jun 18 2025

A384176 Number of subsets of {1..n} without all distinct lengths of maximal runs (increasing by 1).

Original entry on oeis.org

0, 0, 0, 1, 3, 8, 20, 51, 121, 276, 612, 1335, 2881, 6144, 12950, 27029, 55977, 115222, 236058, 481683, 979443
Offset: 0

Views

Author

Gus Wiseman, Jun 16 2025

Keywords

Examples

			The subset {1,3,4,8,9} has maximal runs ((1),(3,4),(8,9)), with lengths (1,2,2), so is counted under a(10).
The a(0) = 0 through a(6) = 20 subsets:
  .  .  .  {1,3}  {1,3}  {1,3}      {1,3}
                  {1,4}  {1,4}      {1,4}
                  {2,4}  {1,5}      {1,5}
                         {2,4}      {1,6}
                         {2,5}      {2,4}
                         {3,5}      {2,5}
                         {1,3,5}    {2,6}
                         {1,2,4,5}  {3,5}
                                    {3,6}
                                    {4,6}
                                    {1,3,5}
                                    {1,3,6}
                                    {1,4,6}
                                    {2,4,6}
                                    {1,2,4,5}
                                    {1,2,4,6}
                                    {1,2,5,6}
                                    {1,3,4,6}
                                    {1,3,5,6}
                                    {2,3,5,6}
		

Crossrefs

For equal instead of distinct lengths the complement is A243815.
These subsets are ranked by the non-members of A328592.
The complement is counted by A384175.
For strict partitions instead of subsets see A384178, A384884, A384886, A384880.
For permutations instead of subsets see A384891, A384892, A010027.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A098859 counts Wilf partitions (distinct multiplicities), complement A336866.
A384893 counts subsets by number of maximal anti-runs, for partitions A268193, A384905.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],!UnsameQ@@Length/@Split[#,#2==#1+1&]&]],{n,0,10}]

A243815 Number of length n words on alphabet {0,1} such that the length of every maximal block of 0's (runs) is the same.

Original entry on oeis.org

1, 2, 4, 8, 14, 24, 39, 62, 97, 151, 233, 360, 557, 864, 1344, 2099, 3290, 5176, 8169, 12931, 20524, 32654, 52060, 83149, 133012, 213069, 341718, 548614, 881572, 1417722, 2281517, 3673830, 5918958, 9540577, 15384490, 24817031, 40045768, 64637963, 104358789
Offset: 0

Views

Author

Geoffrey Critzer, Jun 11 2014

Keywords

Comments

Number of terms of A164710 with exactly n+1 binary digits. - Robert Israel, Nov 09 2015
From Gus Wiseman, Jun 23 2025: (Start)
This is the number of subsets of {1..n} with all equal lengths of runs of consecutive elements increasing by 1. For example, the runs of S = {1,2,5,6,8,9} are ((1,2),(5,6),(8,9)), with lengths (2,2,2), so S is counted under a(9). The a(0) = 1 through a(4) = 14 subsets are:
{} {} {} {} {}
{1} {1} {1} {1}
{2} {2} {2}
{1,2} {3} {3}
{1,2} {4}
{1,3} {1,2}
{2,3} {1,3}
{1,2,3} {1,4}
{2,3}
{2,4}
{3,4}
{1,2,3}
{2,3,4}
{1,2,3,4}
(End)

Examples

			0110 is a "good" word because the length of both its runs of 0's is 1.
Words of the form 11...1 are good words because the condition is vacuously satisfied.
a(5) = 24 because there are 32 length 5 binary words but we do not count: 00010, 00101, 00110, 01000, 01001, 01100, 10010, 10100.
		

Crossrefs

Cf. A164710.
These subsets are ranked by A164707, complement A164708.
For distinct instead of equal lengths we have A384175, complement A384176.
For anti-runs instead of runs we have A384889, for partitions A384888.
For permutations instead of subsets we have A384892, distinct instead of equal A384891.
For partitions instead of subsets we have A384904, strict A384886.
The complement is counted by A385214.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A049988 counts partitions with equal run-lengths, distinct A325325.
A329738 counts compositions with equal run-lengths, distinct A329739.
A384887 counts partitions with equal lengths of gapless runs, distinct A384884.

Programs

  • Maple
    a:= n-> 1 + add(add((d-> binomial(d+j, d))(n-(i*j-1))
              , j=1..iquo(n+1, i)), i=2..n+1):
    seq(a(n), n=0..50);  # Alois P. Heinz, Jun 11 2014
  • Mathematica
    nn=30;Prepend[Map[Total,Transpose[Table[Drop[CoefficientList[Series[ (1+x^k)/(1-x-x^(k+1))-1/(1-x),{x,0,nn}],x],1],{k,1,nn}]]],0]+1
    Table[Length[Select[Subsets[Range[n]],SameQ@@Length/@Split[#,#2==#1+1&]&]],{n,0,10}] (* Gus Wiseman, Jun 23 2025 *)

A384891 Number of permutations of {1..n} with all distinct lengths of maximal runs (increasing by 1).

Original entry on oeis.org

1, 1, 1, 3, 3, 5, 23, 25, 43, 63, 345, 365, 665, 949, 1513, 8175, 9003, 15929, 23399, 36949, 51043, 293715, 314697, 570353, 826817, 1318201, 1810393, 2766099, 14180139, 15600413, 27707879, 40501321, 63981955, 88599903, 134362569, 181491125, 923029217
Offset: 0

Views

Author

Gus Wiseman, Jun 19 2025

Keywords

Examples

			The permutation (1,2,6,7,8,9,3,4,5) has maximal runs ((1,2),(6,7,8,9),(3,4,5)), with lengths (2,4,3), so is counted under a(9).
The a(0) = 1 through a(7) = 25 permutations:
  ()  (1)  (12)  (123)  (1234)  (12345)  (123456)  (1234567)
                 (231)  (2341)  (23451)  (123564)  (1234675)
                 (312)  (4123)  (34512)  (123645)  (1234756)
                                (45123)  (124563)  (1245673)
                                (51234)  (126345)  (1273456)
                                         (145623)  (1456723)
                                         (156234)  (1672345)
                                         (231456)  (2314567)
                                         (234156)  (2345167)
                                         (234561)  (2345671)
                                         (312456)  (3124567)
                                         (345126)  (3456127)
                                         (345612)  (3456712)
                                         (412356)  (4567123)
                                         (451236)  (4567231)
                                         (456231)  (4567312)
                                         (456312)  (5123467)
                                         (561234)  (5612347)
                                         (562341)  (5671234)
                                         (564123)  (6712345)
                                         (612345)  (6723451)
                                         (634512)  (6751234)
                                         (645123)  (7123456)
                                                   (7345612)
                                                   (7561234)
		

Crossrefs

Counting by number of maximal anti-runs gives A010027, for runs A123513.
For subsets instead of permutations we have A384175, complement A384176.
For partitions we have A384884 (anti-runs A384885), strict A384178 (anti-runs A384880).
For equal instead of distinct lengths we have A384892.
For anti-runs instead of runs we have A384907.
A000041 counts integer partitions, strict A000009.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A098859 counts Wilf partitions (distinct multiplicities), complement A336866.
A356606 counts strict partitions without a neighborless part, complement A356607.
A384893 counts subsets by number of maximal anti-runs, for partitions A268193, A384905.

Programs

  • Mathematica
    Table[Length[Select[Permutations[Range[n]],UnsameQ@@Length/@Split[#,#2==#1+1&]&]],{n,0,10}]
  • PARI
    lista(n)=my(b(n)=sum(i=0,n-1,(-1)^i*(n-i)!*binomial(n-1,i)), d=floor(sqrt(2*n)), p=prod(i=1,n,1+x*y^i,1+O(y*y^n)*((1-x^(n+1))/(1-x))+O(x*x^d))); Vec(1+sum(i=1,d,i!*b(i)*polcoef(p,i))) \\ Christian Sievers, Jun 22 2025

Formula

a(n) = Sum_{k=1..n} ( T(n,k) * A000255(k-1) ) for n>=1, where T(n,k) is the number of compositions of n into k distinct parts (cf. A072574). - Christian Sievers, Jun 22 2025

Extensions

a(11) and beyond from Christian Sievers, Jun 22 2025

A384907 Number of permutations of {1..n} with all distinct lengths of maximal anti-runs (not increasing by 1).

Original entry on oeis.org

1, 1, 1, 5, 17, 97, 587, 4291, 33109, 319967, 3106433, 35554459, 419889707, 5632467097, 77342295637, 1201240551077, 18804238105133, 328322081898745, 5832312989183807, 113154541564902427, 2229027473451951265, 47899977701182298255, 1037672943682453127645
Offset: 0

Views

Author

Gus Wiseman, Jun 21 2025

Keywords

Examples

			The permutation (1,2,4,3,5,7,8,6,9) has maximal anti-runs ((1),(2,4,3,5,7),(8,6,9)), with lengths (1,5,3), so is counted under a(9).
The a(0) = 1 through a(4) = 17 permutations:
  ()  (1)  (2,1)  (1,3,2)  (1,2,4,3)
                  (2,1,3)  (1,3,2,4)
                  (2,3,1)  (1,4,2,3)
                  (3,1,2)  (1,4,3,2)
                  (3,2,1)  (2,1,3,4)
                           (2,1,4,3)
                           (2,3,1,4)
                           (2,4,1,3)
                           (2,4,3,1)
                           (3,1,4,2)
                           (3,2,1,4)
                           (3,2,4,1)
                           (3,4,2,1)
                           (4,1,3,2)
                           (4,2,1,3)
                           (4,3,1,2)
                           (4,3,2,1)
		

Crossrefs

For subsets instead of permutations we have A384177.
For strict partitions we have A384880, for runs A384178.
For partitions we have A384885, for runs A384884.
For runs instead of anti-runs we have A384891.
A010027 counts permutations by maximal anti-runs, for runs A123513.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A098859 counts Wilf partitions (distinct multiplicities), complement A336866.
A384893 counts subsets by number of maximal anti-runs, for partitions A268193, A384905.

Programs

  • Mathematica
    Table[Length[Select[Permutations[Range[n]],UnsameQ@@Length/@Split[#,#2!=#1+1&]&]],{n,0,10}]
  • PARI
    a(n)=if(n,my(b(n)=sum(i=0,n-1,(-1)^i*(n-i)!*binomial(n-1,i)), d=floor(sqrt(2*n)), p=polcoef(prod(i=1,n,1+x*y^i,1+O(y*y^n)*((1-x^(d+1))/(1-x))),n,y)); sum(i=1,d,b(n+1-i)*i!*polcoef(p,i)),1) \\ Christian Sievers, Jun 22 2025

Formula

a(n) = Sum_{k=1..n} ( T(n,k) * A000255(n-k) ) for n>=1, where T(n,k) is the number of compositions of n into k distinct parts (cf. A072574).

Extensions

a(11) and beyond from Christian Sievers, Jun 22 2025

A385214 Number of subsets of {1..n} without all equal lengths of maximal runs of consecutive elements increasing by 1.

Original entry on oeis.org

0, 0, 0, 0, 2, 8, 25, 66, 159, 361, 791, 1688, 3539, 7328, 15040, 30669, 62246, 125896, 253975, 511357, 1028052
Offset: 0

Views

Author

Gus Wiseman, Jun 25 2025

Keywords

Examples

			The maximal runs of S = {1,2,4,5,6,8,9} are ((1,2),(4,5,6),(8,9)), with lengths (2,3,2), so S is counted under a(9).
The a(0) = 0 through a(5) = 8 subsets:
  .  .  .  .  {1,2,4}  {1,2,4}
              {1,3,4}  {1,2,5}
                       {1,3,4}
                       {1,4,5}
                       {2,3,5}
                       {2,4,5}
                       {1,2,3,5}
                       {1,3,4,5}
		

Crossrefs

These subsets are ranked by A164708, complement A164707
The complement is counted by A243815.
For distinct instead of equal lengths we have A384176, complement A384175.
For anti-runs instead of runs we have complement of A384889, for partitions A384888.
For permutations instead of subsets we have complement of A384892, distinct A384891.
For partitions instead of subsets we have complement of A384904, strict A384886.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A049988 counts partitions with equal run-lengths, distinct A325325.
A329738 counts compositions with equal run-lengths, distinct A329739.
A384177 counts subsets with all distinct lengths of maximal anti-runs, ranks A384879.
A384887 counts partitions with equal lengths of gapless runs, distinct A384884.
A384893 counts subsets by number of maximal anti-runs, for partitions A268193, A384905.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],!SameQ@@Length/@Split[#,#2==#1+1&]&]],{n,0,10}]
Showing 1-6 of 6 results.