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.

Previous Showing 11-20 of 38 results. Next

A351596 Numbers k such that the k-th composition in standard order has all distinct run-lengths.

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 8, 10, 11, 14, 15, 16, 19, 21, 23, 26, 28, 30, 31, 32, 35, 36, 39, 42, 47, 56, 60, 62, 63, 64, 67, 71, 73, 74, 79, 84, 85, 87, 95, 100, 106, 112, 119, 120, 122, 123, 124, 126, 127, 128, 131, 135, 136, 138, 143, 146, 159, 164, 168, 170, 171
Offset: 1

Views

Author

Gus Wiseman, Feb 24 2022

Keywords

Comments

The n-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of n, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The terms together with their binary expansions and corresponding compositions begin:
   0:      0  ()
   1:      1  (1)
   2:     10  (2)
   3:     11  (1,1)
   4:    100  (3)
   7:    111  (1,1,1)
   8:   1000  (4)
  10:   1010  (2,2)
  11:   1011  (2,1,1)
  14:   1110  (1,1,2)
  15:   1111  (1,1,1,1)
  16:  10000  (5)
  19:  10011  (3,1,1)
  21:  10101  (2,2,1)
  23:  10111  (2,1,1,1)
		

Crossrefs

The version using binary expansions is A044813.
The version for Heinz numbers and prime multiplicities is A130091.
These compositions are counted by A329739, normal A329740.
The version for runs instead of run-lengths is A351290, counted by A351013.
A005811 counts runs in binary expansion, distinct A297770.
A011782 counts integer compositions.
A085207 represents concatenation of standard compositions, reverse A085208.
A333489 ranks anti-runs, complement A348612.
A345167 ranks alternating compositions, counted by A025047.
A351204 counts partitions where every permutation has all distinct runs.
Counting words with all distinct run-lengths:
- A032020 = binary expansions, for runs A351018.
- A351017 = binary words, for runs A351016.
- A351292 = patterns, for runs A351200.
Selected statistics of standard compositions (A066099, A228351):
- Length is A000120.
- Sum is A070939.
- Runs are counted by A124767, distinct A351014.
- Heinz number is A333219.
- Number of distinct parts is A334028.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],UnsameQ@@Length/@Split[stc[#]]&]

A382912 Numbers k such that row k of A305936 (a multiset whose multiplicities are the prime indices of k) has no permutation with all distinct run-lengths.

Original entry on oeis.org

4, 8, 9, 12, 16, 18, 20, 24, 27, 28, 32, 36, 40, 44, 45, 48, 50, 52, 54, 56, 60, 63, 64, 68, 72, 75, 76, 80, 81, 84, 88, 90, 92, 96, 98, 99, 100, 104, 108, 112, 116, 117, 120, 124, 125, 126, 128, 132, 135, 136, 140, 144, 148, 150, 152, 153, 156, 160, 162, 164
Offset: 1

Views

Author

Gus Wiseman, Apr 12 2025

Keywords

Comments

This described multiset (row n of A305936, Heinz number A181821) is generally not the same as the multiset of prime indices of n (A112798). For example, the prime indices of 12 are {1,1,2}, while a multiset whose multiplicities are {1,1,2} is {1,1,2,3}.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798, sum A056239.

Examples

			The terms, prime indices, and corresponding multisets begin:
   4:       {1,1} {1,2}
   8:     {1,1,1} {1,2,3}
   9:       {2,2} {1,1,2,2}
  12:     {1,1,2} {1,1,2,3}
  16:   {1,1,1,1} {1,2,3,4}
  18:     {1,2,2} {1,1,2,2,3}
  20:     {1,1,3} {1,1,1,2,3}
  24:   {1,1,1,2} {1,1,2,3,4}
  27:     {2,2,2} {1,1,2,2,3,3}
  28:     {1,1,4} {1,1,1,1,2,3}
  32: {1,1,1,1,1} {1,2,3,4,5}
  36:   {1,1,2,2} {1,1,2,2,3,4}
  40:   {1,1,1,3} {1,1,1,2,3,4}
  44:     {1,1,5} {1,1,1,1,1,2,3}
  45:     {2,2,3} {1,1,1,2,2,3,3}
  48: {1,1,1,1,2} {1,1,2,3,4,5}
  50:     {1,3,3} {1,1,1,2,2,2,3}
  52:     {1,1,6} {1,1,1,1,1,1,2,3}
		

Crossrefs

The Look-and-Say partition is ranked by A048767, listed by A381440.
Look-and-Say partitions are counted by A239455, ranks A351294.
Non-Look-and-Say partitions are counted by A351293.
For prime indices instead of signature we have A351295, conjugate A381433.
The complement is A382913.
For equal instead of distinct run-lengths we have A382914, see A382858, A382879, A382915.
A056239 adds up prime indices, row sums of A112798.
A329739 counts compositions with distinct run-lengths, ranks A351596, complement A351291.
A381431 lists the section-sum partition of n, ranks A381436, union A381432.

Programs

  • Mathematica
    nrmptn[n_]:=Join@@MapIndexed[Table[#2[[1]],{#1}]&,If[n==1,{}, Flatten[Cases[FactorInteger[n]//Reverse,{p_,k_} :> Table[PrimePi[p],{k}]]]]];
    lasQ[y_]:=Select[Permutations[y], UnsameQ@@Length/@Split[#]&]!={};
    Select[Range[100],Not@*lasQ@*nrmptn]

A351200 Number of patterns of length n with all distinct runs.

Original entry on oeis.org

1, 1, 3, 11, 53, 305, 2051, 15731, 135697, 1300869, 13726431, 158137851, 1975599321, 26607158781, 384347911211, 5928465081703, 97262304328573, 1691274884085061, 31073791192091251, 601539400910369671, 12238270940611270161, 261071590963047040241
Offset: 0

Views

Author

Gus Wiseman, Feb 09 2022

Keywords

Comments

We define a pattern to be a finite sequence covering an initial interval of positive integers. Patterns are counted by A000670 and ranked by A333217.

Examples

			The a(1) = 1 through a(3) = 11 patterns:
  (1)  (1,1)  (1,1,1)
       (1,2)  (1,1,2)
       (2,1)  (1,2,2)
              (1,2,3)
              (1,3,2)
              (2,1,1)
              (2,1,3)
              (2,2,1)
              (2,3,1)
              (3,1,2)
              (3,2,1)
The complement for n = 3 counts the two patterns (1,2,1) and (2,1,2).
		

Crossrefs

The version for run-lengths instead of runs is A351292.
A000670 counts patterns, ranked by A333217.
A005649 counts anti-run patterns, complement A069321.
A005811 counts runs in binary expansion.
A032011 counts patterns with distinct multiplicities.
A044813 lists numbers whose binary expansion has distinct run-lengths.
A060223 counts Lyndon patterns, necklaces A019536, aperiodic A296975.
A131689 counts patterns by number of distinct parts.
A238130 and A238279 count compositions by number of runs.
A297770 counts distinct runs in binary expansion.
A345194 counts alternating patterns, up/down A350354.
Counting words with all distinct runs:
- A351013 = compositions, for run-lengths A329739, ranked by A351290.
- A351016 = binary words, for run-lengths A351017.
- A351018 = binary expansions, for run-lengths A032020, ranked by A175413.
- A351202 = permutations of prime factors.
- A351642 = word structures.
Row sums of A351640.

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[n],UnsameQ@@Split[#]&]],{n,0,6}]
  • PARI
    \\ here LahI is A111596 as row polynomials.
    LahI(n,y)={sum(k=1, n, y^k*(-1)^(n-k)*(n!/k!)*binomial(n-1, k-1))}
    S(n)={my(p=prod(k=1, n, 1 + y*x^k + O(x*x^n))); 1 + sum(i=1, (sqrtint(8*n+1)-1)\2, polcoef(p,i,y)*LahI(i,y))}
    R(q)={[subst(serlaplace(p), y, 1) | p<-Vec(q)]}
    seq(n)={my(q=S(n)); concat([1], sum(k=1, n, R(q^k-1)*sum(r=k, n, binomial(r, k)*(-1)^(r-k)) ))} \\ Andrew Howroyd, Feb 12 2022

Extensions

Terms a(10) and beyond from Andrew Howroyd, Feb 12 2022

A351290 Numbers k such that the k-th composition in standard order has all distinct runs.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 47, 48, 50, 51, 52, 55, 56, 57, 58, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 78
Offset: 1

Views

Author

Gus Wiseman, Feb 10 2022

Keywords

Comments

The n-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of n, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The terms together with their binary expansions and corresponding compositions begin:
   0:      0  ()
   1:      1  (1)
   2:     10  (2)
   3:     11  (1,1)
   4:    100  (3)
   5:    101  (2,1)
   6:    110  (1,2)
   7:    111  (1,1,1)
   8:   1000  (4)
   9:   1001  (3,1)
  10:   1010  (2,2)
  11:   1011  (2,1,1)
  12:   1100  (1,3)
  14:   1110  (1,1,2)
  15:   1111  (1,1,1,1)
		

Crossrefs

The version for Heinz numbers and prime multiplicities is A130091.
The version using binary expansions is A175413, complement A351205.
The version for run-lengths instead of runs is A329739.
These compositions are counted by A351013.
The complement is A351291.
A005811 counts runs in binary expansion, distinct A297770.
A011782 counts integer compositions.
A044813 lists numbers whose binary expansion has distinct run-lengths.
A085207 represents concatenation of standard compositions, reverse A085208.
A333489 ranks anti-runs, complement A348612.
A345167 ranks alternating compositions, counted by A025047.
A351204 counts partitions where every permutation has all distinct runs.
Counting words with all distinct runs:
- A351016 = binary words, for run-lengths A351017.
- A351018 = binary expansions, for run-lengths A032020.
- A351200 = patterns, for run-lengths A351292.
- A351202 = permutations of prime factors.
Selected statistics of standard compositions:
- Length is A000120.
- Parts are A066099, reverse A228351.
- Sum is A070939.
- Runs are counted by A124767, distinct A351014.
- Heinz number is A333219.
- Number of distinct parts is A334028.
Selected classes of standard compositions:
- Partitions are A114994, strict A333256.
- Multisets are A225620, strict A333255.
- Strict compositions are A233564.
- Constant compositions are A272919.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],UnsameQ@@Split[stc[#]]&]

A351292 Number of patterns of length n with all distinct run-lengths.

Original entry on oeis.org

1, 1, 1, 5, 5, 9, 57, 61, 109, 161, 1265, 1317, 2469, 3577, 5785, 43901, 47165, 86337, 127665, 204853, 284197, 2280089, 2398505, 4469373, 6543453, 10570993, 14601745, 22502549, 159506453, 171281529, 314077353, 462623821, 742191037, 1031307185, 1580543969, 2141246229
Offset: 0

Views

Author

Gus Wiseman, Feb 10 2022

Keywords

Comments

We define a pattern to be a finite sequence covering an initial interval of positive integers. Patterns are counted by A000670 and ranked by A333217.

Examples

			The a(1) = 1 through a(5) = 9 patterns:
  (1)  (1,1)  (1,1,1)  (1,1,1,1)  (1,1,1,1,1)
              (1,1,2)  (1,1,1,2)  (1,1,1,1,2)
              (1,2,2)  (1,2,2,2)  (1,1,1,2,2)
              (2,1,1)  (2,1,1,1)  (1,1,2,2,2)
              (2,2,1)  (2,2,2,1)  (1,2,2,2,2)
                                  (2,1,1,1,1)
                                  (2,2,1,1,1)
                                  (2,2,2,1,1)
                                  (2,2,2,2,1)
The a(6) = 57 patterns grouped by sum:
  111111  111112  111122  112221  111223  111233  112333  122333
          111211  111221  122211  111322  111332  113332  133322
          112111  122111  211122  112222  112223  122233  221333
          211111  221111  221112  211222  113222  133222  223331
                                  221113  122222  211333  333122
                                  222112  211133  222133  333221
                                  222211  221222  222331
                                  223111  222113  233311
                                  311122  222122  331222
                                  322111  222221  332221
                                          222311  333112
                                          233111  333211
                                          311222
                                          322211
                                          331112
                                          332111
		

Crossrefs

The version for runs instead of run-lengths is A351200.
A000670 counts patterns, ranked by A333217.
A005649 counts anti-run patterns, complement A069321.
A005811 counts runs in binary expansion.
A032011 counts patterns with distinct multiplicities.
A044813 lists numbers whose binary expansion has distinct run-lengths.
A060223 counts Lyndon patterns, necklaces A019536, aperiodic A296975.
A131689 counts patterns by number of distinct parts.
A238130 and A238279 count compositions by number of runs.
A165413 counts distinct run-lengths in binary expansion, runs A297770.
A345194 counts alternating patterns, up/down A350354.
Counting words with all distinct runs:
- A351013 = compositions, for run-lengths A329739, ranked by A351290.
- A351016 = binary words, for run-lengths A351017.
- A351018 = binary expansions, for run-lengths A032020, ranked by A175413.
- A351202 = permutations of prime factors.
- A351638 = word structures.
Row sums of A350824.

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[n],UnsameQ@@Length/@Split[#]&]],{n,0,6}]
  • PARI
    P(n) = {Vec(-1 + prod(k=1, n, 1 + y*x^k + O(x*x^n)))}
    R(u,k) = {k*[subst(serlaplace(p)/y, y, k-1) | p<-u]}
    seq(n)={my(u=P(n), c=poldegree(u[#u])); concat([1], sum(k=1, c, R(u, k)*sum(r=k, c, binomial(r, k)*(-1)^(r-k)) ))} \\ Andrew Howroyd, Feb 11 2022

Formula

From Andrew Howroyd, Feb 12 2022: (Start)
a(n) = Sum_{k=1..n} R(n,k)*(Sum_{r=k..n} binomial(r, k)*(-1)^(r-k)), where R(n,k) = Sum_{j=1..floor((sqrt(8*n+1)-1)/2)} k*(k-1)^(j-1) * j! * A008289(n,j).
G.f.: 1 + Sum_{r>=1} Sum_{k=1..r} R(k,x) * binomial(r, k)*(-1)^(r-k), where R(k,x) = Sum_{j>=1} k*(k-1)^(j-1) * j! * [y^j](Product_{k>=1} 1 + y*x^k).
(End)

Extensions

Terms a(10) and beyond from Andrew Howroyd, Feb 11 2022

A382771 Number of ways to permute the prime indices of n so that the run-lengths are all different.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Apr 07 2025

Keywords

Comments

The first x with a(x) > 0 but A382857(x) > 1 is a(216) = 4, A382857(216) = 4.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798, sum A056239.

Examples

			The a(96) = 4 permutations are:
  (1,1,1,1,1,2)
  (1,1,1,2,1,1)
  (1,1,2,1,1,1)
  (2,1,1,1,1,1)
The a(216) = 4 permutations are:
  (1,1,2,2,2,1)
  (1,2,2,2,1,1)
  (2,1,1,1,2,2)
  (2,2,1,1,1,2)
The a(360) = 6 permutations are:
  (1,1,1,2,2,3)
  (1,1,1,3,2,2)
  (2,2,1,1,1,3)
  (2,2,3,1,1,1)
  (3,1,1,1,2,2)
  (3,2,2,1,1,1)
		

Crossrefs

Positions of 1 are A000961.
Positions of positive terms are A351294, conjugate A381432.
Positions of 0 are A351295, conjugate A381433, equal A382879.
Sorted positions of first appearances are A382772, equal A382878.
For prescribed signature we have A382773, equal A382858.
The restriction to factorials is A382774, equal A335407.
For equal instead of distinct run-lengths we have A382857.
For run-sums instead of run-lengths we have A382876, equal A382877.
Positions of terms > 1 are A383113.
A044813 lists numbers whose binary expansion has distinct run-lengths.
A055396 gives least prime index, greatest A061395.
A056239 adds up prime indices, row sums of A112798.
A098859 counts partitions with distinct multiplicities, ordered A242882.
A239455 counts Look-and-Say partitions, complement A351293.
A329738 counts compositions with equal run-lengths, ranks A353744.
A329739 counts compositions with distinct run-lengths, ranks A351596.

Programs

  • Mathematica
    Table[Length[Select[Permutations[Join@@ConstantArray@@@FactorInteger[n]],UnsameQ@@Length/@Split[#]&]],{n,30}]

Formula

a(A181821(n)) = a(A304660(n)) = A382773(n).
a(n!) = A382774(n).

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

A351018 Number of integer compositions of n with all distinct even-indexed parts and all distinct odd-indexed parts.

Original entry on oeis.org

1, 1, 2, 3, 6, 9, 18, 27, 46, 77, 122, 191, 326, 497, 786, 1207, 1942, 2905, 4498, 6703, 10574, 15597, 23754, 35043, 52422, 78369, 115522, 169499, 248150, 360521, 532466, 768275, 1116126, 1606669, 2314426, 3301879, 4777078, 6772657, 9677138, 13688079, 19406214
Offset: 0

Views

Author

Gus Wiseman, Feb 09 2022

Keywords

Comments

Also the number of binary words of length n starting with 1 and having all distinct runs (ranked by A175413, counted by A351016).

Examples

			The a(1) = 1 through a(6) = 18 compositions:
  (1)  (2)    (3)    (4)      (5)      (6)
       (1,1)  (1,2)  (1,3)    (1,4)    (1,5)
              (2,1)  (2,2)    (2,3)    (2,4)
                     (3,1)    (3,2)    (3,3)
                     (1,1,2)  (4,1)    (4,2)
                     (2,1,1)  (1,1,3)  (5,1)
                              (1,2,2)  (1,1,4)
                              (2,2,1)  (1,2,3)
                              (3,1,1)  (1,3,2)
                                       (2,1,3)
                                       (2,3,1)
                                       (3,1,2)
                                       (3,2,1)
                                       (4,1,1)
                                       (1,1,2,2)
                                       (1,2,2,1)
                                       (2,1,1,2)
                                       (2,2,1,1)
		

Crossrefs

The case of partitions is A000726.
The version for run-lengths instead of runs is A032020.
These words are ranked by A175413.
A005811 counts runs in binary expansion.
A011782 counts integer compositions.
A044813 lists numbers whose binary expansion has distinct run-lengths.
A059966 counts Lyndon compositions, necklaces A008965, aperiodic A000740.
A116608 counts compositions by number of distinct parts.
A238130 and A238279 count compositions by number of runs.
A242882 counts compositions with distinct multiplicities.
A297770 counts distinct runs in binary expansion.
A325545 counts compositions with distinct differences.
A329738 counts compositions with equal run-lengths.
A329744 counts compositions by runs-resistance.
A351014 counts distinct runs in standard compositions.
Counting words with all distinct runs:
- A351013 = compositions, for run-lengths A329739, ranked by A351290.
- A351016 = binary words, for run-lengths A351017.
- A351200 = patterns, for run-lengths A351292.
- A351202 = permutations of prime factors.

Programs

  • Mathematica
    Table[Length[Select[Tuples[{0,1},n],#=={}||First[#]==1&&UnsameQ@@Split[#]&]],{n,0,10}]
  • PARI
    P(n)=prod(k=1, n, 1 + y*x^k + O(x*x^n));
    seq(n)=my(p=P(n)); Vec(sum(k=0, n, polcoef(p,k\2,y)*(k\2)!*polcoef(p,(k+1)\2,y)*((k+1)\2)!)) \\ Andrew Howroyd, Feb 11 2022

Formula

a(n>0) = A351016(n)/2.
G.f.: Sum_{k>=0} floor(k/2)! * ceiling(k/2)! * ([y^floor(k/2)] P(x,y)) * ([y^ceiling(k/2)] P(x,y)), where P(x,y) = Product_{k>=1} 1 + y*x^k. - Andrew Howroyd, Feb 11 2022

Extensions

Terms a(21) and beyond from Andrew Howroyd, Feb 11 2022

A351291 Numbers k such that the k-th composition in standard order does not have all distinct runs.

Original entry on oeis.org

13, 22, 25, 45, 46, 49, 53, 54, 59, 76, 77, 82, 89, 91, 93, 94, 97, 101, 102, 105, 108, 109, 110, 115, 118, 141, 148, 150, 153, 156, 162, 165, 166, 173, 177, 178, 180, 181, 182, 183, 187, 189, 190, 193, 197, 198, 201, 204, 205, 209, 210, 213, 214, 216, 217
Offset: 1

Views

Author

Gus Wiseman, Feb 12 2022

Keywords

Comments

The n-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of n, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The terms together with their binary expansions and corresponding compositions begin:
  13:     1101  (1,2,1)
  22:    10110  (2,1,2)
  25:    11001  (1,3,1)
  45:   101101  (2,1,2,1)
  46:   101110  (2,1,1,2)
  49:   110001  (1,4,1)
  53:   110101  (1,2,2,1)
  54:   110110  (1,2,1,2)
  59:   111011  (1,1,2,1,1)
  76:  1001100  (3,1,3)
  77:  1001101  (3,1,2,1)
  82:  1010010  (2,3,2)
  89:  1011001  (2,1,3,1)
  91:  1011011  (2,1,2,1,1)
  93:  1011101  (2,1,1,2,1)
  94:  1011110  (2,1,1,1,2)
		

Crossrefs

The version for Heinz numbers of partitions is A130092, complement A130091.
Normal multisets with a permutation of this type appear to be A283353.
Partitions w/o permutations of this type are A351204, complement A351203.
The version using binary expansions is A351205, complement A175413.
The complement is A351290, counted by A351013.
A005811 counts runs in binary expansion, distinct A297770.
A011782 counts integer compositions.
A044813 lists numbers whose binary expansion has all distinct run-lengths.
A085207 represents concatenation of standard compositions, reverse A085208.
A333489 ranks anti-runs, complement A348612, counted by A003242.
A345167 ranks alternating compositions, counted by A025047.
Counting words with all distinct runs:
- A351016 = binary words, for run-lengths A351017.
- A351018 = binary expansions, for run-lengths A032020.
- A351200 = patterns, for run-lengths A351292.
- A351202 = permutations of prime factors.
Selected statistics of standard compositions (A066099, reverse A228351):
- Length is A000120.
- Sum is A070939.
- Runs are counted by A124767, distinct A351014.
- Heinz number is A333219.
- Number of distinct parts is A334028.
Selected classes of standard compositions:
- Partitions are A114994, strict A333256.
- Multisets are A225620, strict A333255.
- Strict compositions are A233564.
- Constant compositions are A272919.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],!UnsameQ@@Split[stc[#]]&]

A382876 Number of ways to permute the prime indices of n so that the run-sums are all different.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Apr 12 2025

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798, sum A056239.
A run in a sequence is a constant consecutive subsequence. The run-sums of a sequence are obtained by splitting it into maximal runs and taking their sums. See A353932 for run-sums of standard compositions.

Examples

			For n = 12, none of the permutations (1,1,2), (1,2,1), (2,1,1) has distinct run-sums, so a(12) = 0.
The prime indices of 36 are {1,1,2,2}, and we have permutations: (1,1,2,2), (2,2,1,1), so a(36) = 2.
For n = 90 we have:
  (1,2,2,3)
  (1,3,2,2)
  (2,2,1,3)
  (2,2,3,1)
  (3,1,2,2)
  (3,2,2,1)
So a(90) = 6. The 6 missing permutations are: (1,2,3,2), (2,1,2,3), (2,1,3,2), (2,3,1,2), (2,3,2,1), (3,2,1,2).
		

Crossrefs

Positions of 1 are A000961.
Compositions of this type are counted by A353850, ranked by A353852.
Positions of 0 appear to be A381636, for equal run-sums A383100.
For run-lengths instead of sums we have A382771, equal A382857 (zeros A382879).
For equal instead of distinct run-sums we have A382877.
A044813 lists numbers whose binary expansion has distinct run-lengths.
A056239 adds up prime indices, row sums of A112798.
A304442 counts compositions with equal run-sums, complement A382076.
A329739 counts compositions with distinct run-lengths, ranks A351596.
A353837 counts partitions with distinct run-sums, ranks A353838.
A353847 gives composition run-sum transformation, for partitions A353832.
A353932 lists run-sums of standard compositions.

Programs

  • Mathematica
    Table[Length[Select[Permutations[PrimePi /@ Join@@ConstantArray@@@FactorInteger[n]], UnsameQ@@Total/@Split[#]&]],{n,100}]
Previous Showing 11-20 of 38 results. Next