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-10 of 17 results. Next

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

A384177 Number of subsets of {1..n} with all distinct lengths of maximal anti-runs (increasing by more than 1).

Original entry on oeis.org

1, 2, 3, 5, 10, 19, 35, 62, 109, 197, 364, 677, 1251, 2288, 4143, 7443, 13318, 23837, 42809, 77216, 139751, 253293, 458800, 829237, 1494169, 2683316, 4804083, 8580293, 15301324, 27270061, 48607667, 86696300, 154758265, 276453311, 494050894, 882923051
Offset: 0

Views

Author

Gus Wiseman, Jun 16 2025

Keywords

Examples

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

Crossrefs

For runs instead of anti-runs we have A384175, complement A384176.
These subsets are ranked by A384879.
For strict partitions instead of subsets we have A384880, see A384178, A384884, A384886.
For equal instead of distinct lengths we have A384889, for runs A243815.
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*y^n),p=prod(i=1,(n+1)\2,1+o+x*y^(2*i-1)/(1-y)^(i-1)));p=subst(serlaplace(p),x,1);Vec((p-y)/(1-y)^2)} \\ Christian Sievers, Jun 18 2025

Extensions

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

A384877 Irregular triangle read by rows where row k lists the lengths of maximal anti-runs (increasing by more than 1) in the binary indices of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 3, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 3, 1, 2, 1, 1, 2, 2, 3, 3, 1, 3, 1, 2, 2, 2
Offset: 0

Views

Author

Gus Wiseman, Jun 17 2025

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.

Examples

			The binary indices of 182 are {2,3,5,6,8}, with maximal anti-runs ((2),(3,5),(6,8)) so row 182 is (1,2,2).
Triangle begins:
   0: ()
   1: (1)
   2: (1)
   3: (1,1)
   4: (1)
   5: (2)
   6: (1,1)
   7: (1,1,1)
   8: (1)
   9: (2)
  10: (2)
  11: (1,2)
  12: (1,1)
  13: (2,1)
  14: (1,1,1)
  15: (1,1,1,1)
		

Crossrefs

Row-sums are A000120.
Positions of rows of the form (1,1,...) are A023758.
Positions of first appearances of each distinct row appear to be A052499.
For runs instead of anti-runs we have A245563, reverse A245562.
Row-lengths are A384890.
A355394 counts partitions without a neighborless part, singleton case A355393.
A356606 counts strict partitions without a neighborless part, complement A356607.
A384175 counts subsets with all distinct lengths of maximal runs, complement A384176.

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Table[Length/@Split[bpe[n],#2!=#1+1&],{n,0,100}]

A384890 Number of maximal anti-runs (increasing by more than 1) in the binary indices of n.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 2, 2, 3, 4, 1, 1, 1, 2, 1, 1, 2, 3, 2, 2, 2, 3, 3, 3, 4, 5, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 2, 2, 3, 4, 2, 2, 2, 3, 2, 2, 3, 4, 3, 3, 3, 4, 4, 4, 5, 6, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 2, 2, 3, 4, 1, 1, 1, 2, 1, 1, 2
Offset: 0

Views

Author

Gus Wiseman, Jun 17 2025

Keywords

Comments

First differs from A272604 at a(51) = 3, A272604(51) = 2.
A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.
Do all constant runs in this sequence have lengths 1, 2, or 3?

Examples

			The binary indices of 51 are {1,2,5,6}, with maximal anti-runs ((1),(2,5),(6)), so a(51) = 3.
		

Crossrefs

For runs instead of anti-runs we have A069010 = run-lengths of A245563 (reverse A245562).
Row-lengths of A384877, firsts A384878.
For prime indices instead of binary indices we have A384906.
A000120 counts binary indices.
A356606 counts strict partitions without a neighborless part, complement A356607.
A384175 counts subsets with all distinct lengths of maximal runs, complement A384176.

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Table[Length[Split[bpe[n],#2!=#1+1&]],{n,0,100}]

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}]

A384886 Number of strict integer partitions of n with all equal lengths of maximal runs (decreasing by 1).

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 4, 4, 7, 7, 8, 11, 11, 14, 17, 19, 20, 27, 27, 35, 38, 45, 47, 60, 63, 75, 84, 97, 104, 127, 134, 155, 175, 196, 218, 251, 272, 307, 346, 384, 424, 480, 526, 586, 658, 719, 798, 890, 979, 1078, 1201, 1315, 1451, 1603, 1762, 1934, 2137
Offset: 0

Views

Author

Gus Wiseman, Jun 13 2025

Keywords

Examples

			The strict partition y = (7,6,5,3,2,1) has maximal runs ((7,6,5),(3,2,1)), with lengths (3,3), so y is counted under a(24).
The a(1) = 1 through a(14) = 14 partitions (A-E = 10-14):
  1  2  3   4   5   6    7   8   9    A     B    C     D    E
        21  31  32  42   43  53  54   64    65   75    76   86
                41  51   52  62  63   73    74   84    85   95
                    321  61  71  72   82    83   93    94   A4
                                 81   91    92   A2    A3   B3
                                 432  631   A1   B1    B2   C2
                                 531  4321  641  543   C1   D1
                                            731  642   742  752
                                                 741   751  842
                                                 831   841  851
                                                 5421  931  941
                                                            A31
                                                            5432
                                                            6521
		

Crossrefs

For subsets instead of strict partitions we have A243815, distinct lengths A384175.
For distinct instead of equal lengths we have A384178, for anti-runs A384880.
This is the strict case of A384904, distinct lengths A384884.
A000041 counts integer partitions, strict A000009.
A047993 counts partitions with max part = length (A106529).
A098859 counts Wilf partitions (complement A336866), compositions A242882.
A239455 counts Look-and-Say or section-sum partitions, ranks A351294 or A381432.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&SameQ@@Length/@Split[#,#2==#1-1&]&]],{n,0,15}]
  • PARI
    A_q(N) = {Vec(1+sum(k=1,floor(-1/2+sqrt(2+2*N)), sum(i=1,(N/(k*(k+1)/2))+1, q^(k*(k+1)*i^2/2)/prod(j=1,i, 1 - q^(j*k)))) + O('q^(N+1)))} \\ John Tyler Rascoe, Aug 21 2025

Formula

G.f.: 1 + Sum_{i,k>0} q^(k*(k+1)*i^2/2)/Product_{j=1..i} (1 - q^(j*k)). - John Tyler Rascoe, Aug 21 2025

A384879 Numbers whose binary indices have all distinct lengths of maximal anti-runs (increasing by more than 1).

Original entry on oeis.org

1, 2, 4, 5, 8, 9, 10, 11, 13, 16, 17, 18, 19, 20, 21, 22, 25, 26, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 49, 50, 52, 53, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 75, 76, 80, 81, 82, 83, 84, 85, 86, 88, 97, 98, 100, 101, 104, 105, 106, 128, 129, 130
Offset: 1

Views

Author

Gus Wiseman, Jun 17 2025

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.

Examples

			The binary indices of 813 are {1,3,4,6,9,10}, with maximal anti-runs ((1,3),(4,6,9),(10)), with lengths (2,3,1), so 813 is in the sequence.
The terms together with their binary expansions and binary indices begin:
    1:       1 ~ {1}
    2:      10 ~ {2}
    4:     100 ~ {3}
    5:     101 ~ {1,3}
    8:    1000 ~ {4}
    9:    1001 ~ {1,4}
   10:    1010 ~ {2,4}
   11:    1011 ~ {1,2,4}
   13:    1101 ~ {1,3,4}
   16:   10000 ~ {5}
   17:   10001 ~ {1,5}
   18:   10010 ~ {2,5}
   19:   10011 ~ {1,2,5}
   20:   10100 ~ {3,5}
   21:   10101 ~ {1,3,5}
   22:   10110 ~ {2,3,5}
   25:   11001 ~ {1,4,5}
   26:   11010 ~ {2,4,5}
		

Crossrefs

Subsets of this type are counted by A384177, for runs A384175 (complement A384176).
These are the indices of strict rows in A384877, see A384878, A245563, A245562, A246029.
A000120 counts binary indices.
A098859 counts Wilf partitions (distinct multiplicities), complement A336866.
A356606 counts strict partitions without a neighborless part, complement A356607.
A384890 counts maximal anti-runs in binary indices, runs A069010.

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Select[Range[100],UnsameQ@@Length/@Split[bpe[#],#2!=#1+1&]&]

A384889 Number of subsets of {1..n} with all equal lengths of maximal anti-runs (increasing by more than 1).

Original entry on oeis.org

1, 2, 4, 8, 14, 23, 37, 59, 93, 146, 230, 365, 584, 940, 1517, 2450, 3959, 6404, 10373, 16822, 27298, 44297, 71843, 116429, 188550, 305200, 493930, 799422, 1294108, 2095291, 3392736, 5493168, 8892148, 14390372, 23282110, 37660759, 60914308, 98528312, 159386110
Offset: 0

Views

Author

Gus Wiseman, Jun 18 2025

Keywords

Examples

			The subset {3,6,7,9,10,12} has maximal anti-runs ((3,6),(7,9),(10,12)), with lengths (2,2,2), so is counted under a(12).
The a(0) = 1 through a(4) = 14 subsets:
  {}  {}   {}     {}       {}
      {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}
		

Crossrefs

For runs instead of anti-runs we have A243815, distinct A384175, complement A384176.
For distinct instead or equal lengths we have A384177, ranks A384879.
For partitions instead of subsets we have A384888.
A034296 counts flat or gapless partitions, ranks A066311 or A073491.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A047966 counts uniform partitions (equal multiplicities), ranks A072774.
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}]
  • PARI
    lista(n)=Vec(sum(i=1,(n+1)\2,1/(1-x^(2*i-1)/(1-x)^(i-1))-1,1-x+O(x*x^n))/(1-x)^2) \\ Christian Sievers, Jun 20 2025

Formula

G.f.: ( Sum_{i>=1} (1/(1-x^(2*i-1)/(1-x)^(i-1))-1) + 1-x ) / (1-x)^2. - Christian Sievers, Jun 21 2025

Extensions

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

A384887 Number of integer partitions of n with all equal lengths of maximal gapless runs (decreasing by 0 or 1).

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 9, 10, 14, 18, 21, 26, 35, 39, 46, 58, 68, 79, 97, 111, 131, 155, 177, 206, 246, 278, 318, 373, 423, 483, 563, 632, 722, 827, 931, 1058, 1209, 1354, 1528, 1736, 1951, 2188, 2475, 2762, 3097, 3488, 3886, 4342, 4876, 5414, 6038, 6741, 7482
Offset: 0

Views

Author

Gus Wiseman, Jun 15 2025

Keywords

Examples

			The partition y = (6,5,5,5,3,3,2,1) has maximal gapless runs ((6,5,5,5),(3,3,2,1)), with lengths (4,4), so y is counted under a(30).
The a(1) = 1 through a(8) = 14 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (32)     (33)      (43)       (44)
             (111)  (31)    (41)     (42)      (52)       (53)
                    (211)   (221)    (51)      (61)       (62)
                    (1111)  (2111)   (222)     (322)      (71)
                            (11111)  (321)     (2221)     (332)
                                     (2211)    (3211)     (2222)
                                     (21111)   (22111)    (3221)
                                     (111111)  (211111)   (3311)
                                               (1111111)  (22211)
                                                          (32111)
                                                          (221111)
                                                          (2111111)
                                                          (11111111)
		

Crossrefs

The strict case is A384886, distinct A384178.
For distinct instead of equal lengths we have A384884.
For anti-runs instead of runs we have A384888, distinct A384885.
For subsets instead of strict partitions we have A243815.
Without counting decreases by 0 we get A384904.
A000041 counts integer partitions, strict A000009.
A007690 counts partitions with no singletons, complement A183558.
A034296 counts flat or gapless partitions, ranks A066311 or A073491.
A098859 counts Wilf partitions (distinct multiplicities), complement A336866.
A355394 counts partitions without a neighborless part, singleton case A355393.
A356236 counts partitions with a neighborless part, singleton case A356235.
A356606 counts strict partitions without a neighborless part, complement A356607.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],SameQ@@Length/@Split[#,#2>=#1-1&]&]],{n,0,15}]

A164710 A positive integer n is included if all runs of 0's in binary n are of the same length.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35, 36, 39, 42, 43, 45, 46, 47, 48, 49, 51, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 71, 73, 76, 79, 85, 86, 87, 90, 91, 93, 94, 95, 96, 97, 99, 100
Offset: 1

Views

Author

Leroy Quet, Aug 23 2009

Keywords

Comments

Clarification: A binary number consists of "runs" completely of 1's alternating with runs completely of 0's. No two or more runs all of the same digit are adjacent.
This sequence contains in part positive integers that each contain one run of 0's. For those members of this sequence each with at least two runs of 0's, see A164712.
Number of terms with n binary digits is A243815(n-1). - Robert Israel, Nov 09 2015

Crossrefs

Programs

  • Maple
    isA164710 := proc(n) local bdg,arl,lset ; bdg := convert(n,base,2) ; lset := {} ; arl := -1 ; for p from 1 to nops(bdg) do if op(p,bdg) = 0 then if p = 1 then arl := 1 ; else arl := arl+1 ; end if; else if arl > 0 then lset := lset union {arl} ; end if; arl := 0 ; end if; end do ; if arl > 0 then lset := lset union {arl} ; end if; return (nops(lset) <= 1 ); end proc: for n from 1 to 300 do if isA164710(n) then printf("%d,",n) ; end if; end do; # R. J. Mathar, Feb 27 2010
    F:= proc(d)
      local res,r,m,e,C,M;
      res:= [1$d];
      for r from 1 to floor(d/2) do
        for m from 1 to floor(d/r)-1 do
           e:= d - r*(m+1);
           for C in combinat:-choose(e+r,e) do
             M:= subsop(op(map(`=`,C,1)),[0$(e+r)]);
             res:= res, subs(0 = (1,0$m), M);
           od
        od
      od;
      sort(map(t -> add(t[-i]*2^(i-1),i=1..d), [res]));
    end proc:
    N:= 10: # to get all terms < 2^N
    map(op,[seq(F(d),d=1..N)]); # Robert Israel, Nov 09 2015
  • Mathematica
    Select[Range@ 100, SameQ @@ Map[Length, Select[Split@ IntegerDigits[#, 2], First@ # == 0 &]] &] (* Michael De Vlieger, Aug 20 2017 *)
  • Perl
    foreach(1..100){
        %runs=();
        $runs{$}++ foreach split /1+/, sprintf("%b",$);
        delete $runs{''};
        print "$_, " if 1>=keys(%runs);
    }
    # Ivan Neretin, Nov 09 2015

Extensions

Terms beyond 39 by R. J. Mathar, Feb 27 2010
Showing 1-10 of 17 results. Next