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

A353390 Number of compositions of n whose own run-lengths are a subsequence (not necessarily consecutive).

Original entry on oeis.org

1, 1, 0, 0, 1, 2, 3, 2, 2, 8, 17, 26, 43, 77, 129, 210, 351, 569
Offset: 0

Views

Author

Gus Wiseman, May 15 2022

Keywords

Examples

			The a(0) = 1 through a(9) = 8 compositions (empty columns indicated by dots):
  ()  (1)  .  .  (22)  (122)  (1122)  (11221)  (21122)  (333)
                       (221)  (1221)  (12211)  (22112)  (22113)
                              (2211)                    (22122)
                                                        (31122)
                                                        (121122)
                                                        (122112)
                                                        (211221)
                                                        (221121)
For example, the composition y = (2,2,3,3,1) has run-lengths (2,2,1), which form a (non-consecutive) subsequence, so y is counted under a(11).
		

Crossrefs

The version for partitions is A325702.
The recursive version is A353391, ranked by A353431.
The consecutive case is A353392, ranked by A353432.
These compositions are ranked by A353402.
The reverse version is A353403.
The recursive consecutive version is A353430.
A003242 counts anti-run compositions, ranked by A333489.
A011782 counts compositions.
A047966 counts uniform partitions, compositions A329738.
A169942 counts Golomb rulers, ranked by A333222.
A325676 counts knapsack compositions, ranked by A333223, partitions A108917.
A325705 counts partitions containing all of their distinct multiplicities.
A329739 counts compositions with all distinct run-lengths, for runs A351013.
A353400 counts compositions with all run-lengths > 2.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], MemberQ[Subsets[#],Length/@Split[#]]&]],{n,0,15}]

A353401 Number of integer compositions of n with all prime run-lengths.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 4, 3, 6, 9, 10, 18, 27, 35, 54, 83, 107, 176, 242, 354, 515, 774, 1070, 1648, 2332, 3429, 4984, 7326, 10521, 15591, 22517, 32908, 48048, 70044, 101903, 149081, 216973, 316289, 461959, 672664, 981356, 1431256, 2086901, 3041577, 4439226, 6467735
Offset: 0

Views

Author

Gus Wiseman, May 15 2022

Keywords

Examples

			The a(0) = 1 through a(9) = 9 compositions (empty column indicated by dot, 0 is the empty composition):
  0   .  11   111   22   11111   33     11122     44       333
                                 222    22111     1133     11133
                                 1122   1111111   3311     33111
                                 2211             11222    111222
                                                  22211    222111
                                                  112211   1111122
                                                           1112211
                                                           1122111
                                                           2211111
		

Crossrefs

The case of runs equal to 2 is A003242 aerated.
The <= 1 version is A003242 ranked by A333489.
The version for parts instead of run-lengths is A023360, both A353429.
The version for partitions is A055923.
The > 1 version is A114901, ranked by A353427.
The <= 2 version is A128695, matching A335464.
The > 2 version is A353400, partitions A100405.
Words with all distinct run-lengths: A032020, A044813, A098859, A130091, A329739, A351013, A351017.
A005811 counts runs in binary expansion.
A008466 counts compositions with some part > 2.
A011782 counts compositions.
A167606 counts compositions with adjacent parts coprime.
A329738 counts uniform compositions, partitions A047966.

Programs

  • Maple
    b:= proc(n, h) option remember; `if`(n=0, 1, add(`if`(i<>h, add(
         `if`(isprime(j), b(n-i*j, i), 0), j=2..n/i), 0), i=1..n/2))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..60);  # Alois P. Heinz, May 18 2022
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!MemberQ[Length/@Split[#],_?(!PrimeQ[#]&)]&]],{n,0,15}]

Extensions

a(21)-a(45) from Alois P. Heinz, May 18 2022

A353403 Number of compositions of n whose own reversed run-lengths are a subsequence (not necessarily consecutive).

Original entry on oeis.org

1, 1, 0, 0, 3, 2, 5, 12, 16, 30, 45, 94, 159, 285, 477, 864, 1487, 2643
Offset: 0

Views

Author

Gus Wiseman, May 15 2022

Keywords

Examples

			The a(0) = 1 through a(7) = 12 compositions:
  ()  (1)  .  .  (22)   (1121)  (1113)  (1123)
                 (112)  (1211)  (1122)  (1132)
                 (211)          (1221)  (2311)
                                (2211)  (3211)
                                (3111)  (11131)
                                        (11212)
                                        (11221)
                                        (12112)
                                        (12211)
                                        (13111)
                                        (21121)
                                        (21211)
		

Crossrefs

The non-reversed version is A353390, ranked by A353402, partitions A325702.
The non-reversed recursive version is A353391, ranked by A353431.
The non-reversed consecutive case is A353392, ranked by A353432.
The non-reversed recursive consecutive version is A353430.
A003242 counts anti-run compositions, ranked by A333489.
A011782 counts compositions.
A169942 counts Golomb rulers, ranked by A333222.
A325676 counts knapsack compositions, ranked by A333223, partitions A108917.
A325705 counts partitions containing all of their distinct multiplicities.
A329739 counts compositions with all distinct run-lengths, for runs A351013.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@ IntegerPartitions[n],MemberQ[Subsets[#],Reverse[Length/@Split[#]]]&]],{n,0,15}]

A353430 Number of integer compositions of n that are empty, a singleton, or whose own run-lengths are a consecutive subsequence that is already counted.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 1, 1, 4, 5, 7, 9, 11, 15, 16, 22, 25, 37, 37, 45
Offset: 0

Views

Author

Gus Wiseman, May 16 2022

Keywords

Examples

			The a(n) compositions for selected n (A..E = 10..14):
  n=4:  n=6:    n=9:      n=10:     n=12:     n=14:
-----------------------------------------------------------
  (4)   (6)     (9)       (A)       (C)       (E)
  (22)  (1122)  (333)     (2233)    (2244)    (2255)
        (2211)  (121122)  (3322)    (4422)    (5522)
                (221121)  (131122)  (151122)  (171122)
                          (221131)  (221124)  (221126)
                                    (221142)  (221135)
                                    (221151)  (221153)
                                    (241122)  (221162)
                                    (421122)  (221171)
                                              (261122)
                                              (351122)
                                              (531122)
                                              (621122)
                                              (122121122)
                                              (221121221)
		

Crossrefs

Non-recursive non-consecutive version: counted by A353390, ranked by A353402, reverse A353403, partitions A325702.
Non-consecutive version: A353391, ranked by A353431, partitions A353426.
Non-recursive version: A353392, ranked by A353432.
A003242 counts anti-run compositions, ranked by A333489.
A011782 counts compositions.
A114901 counts compositions with no runs of length 1.
A169942 counts Golomb rulers, ranked by A333222.
A325676 counts knapsack compositions, ranked by A333223.
A329738 counts uniform compositions, partitions A047966.
A329739 counts compositions with all distinct run-lengths.

Programs

  • Mathematica
    yoyQ[y_]:=Length[y]<=1||MemberQ[Join@@Table[Take[y,{i,j}],{i,Length[y]},{j,i,Length[y]}],Length/@Split[y]]&&yoyQ[Length/@Split[y]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],yoyQ]],{n,0,15}]

A353427 Numbers k such that the k-th composition in standard order has all run-lengths > 1.

Original entry on oeis.org

0, 3, 7, 10, 15, 31, 36, 42, 43, 58, 63, 87, 122, 127, 136, 147, 170, 171, 175, 228, 234, 235, 250, 255, 292, 295, 343, 351, 471, 484, 490, 491, 506, 511, 528, 547, 586, 591, 676, 682, 683, 687, 698, 703, 904, 915, 938, 939, 943, 983, 996, 1002, 1003, 1018
Offset: 1

Views

Author

Gus Wiseman, May 16 2022

Keywords

Comments

The k-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 k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The terms and corresponding compositions begin:
     0: ()
     3: (1,1)
     7: (1,1,1)
    10: (2,2)
    15: (1,1,1,1)
    31: (1,1,1,1,1)
    36: (3,3)
    42: (2,2,2)
    43: (2,2,1,1)
    58: (1,1,2,2)
    63: (1,1,1,1,1,1)
    87: (2,2,1,1,1)
   122: (1,1,1,2,2)
   127: (1,1,1,1,1,1,1)
		

Crossrefs

The version for partitions is A001694, counted by A007690.
The version for parts instead of lengths is A022340, counted by A212804.
These compositions are counted by A114901.
A subset of A348612 (counted by A261983).
The case of all run-lengths = 2 is A351011.
The case of all run-lengths > 2 is counted by A353400.
A005811 counts runs in binary expansion.
A011782 counts compositions.
A066099 lists compositions in standard order, reverse A228351.
Statistics of standard compositions:
- Length is A000120, sum A070939.
- Runs are counted by A124767.
- Runs-resistance is A333628.
- Run-lengths are A333769.

Programs

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

A353428 Number of integer compositions of n with all parts and all run-lengths > 2.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 2, 1, 0, 2, 0, 2, 4, 0, 0, 8, 3, 0, 10, 4, 4, 15, 4, 8, 24, 7, 8, 42, 16, 10, 59, 31, 27, 87, 37, 52, 149, 62, 66, 233, 121, 111, 342, 207, 204, 531, 308, 351, 864, 487, 536, 1373, 864, 865, 2057, 1440, 1509, 3232
Offset: 0

Views

Author

Gus Wiseman, May 16 2022

Keywords

Examples

			The a(n) compositions for selected n:
  n=16:   n=18:     n=20:    n=21:      n=24:
----------------------------------------------------
  (4444)  (666)     (5555)   (777)      (888)
          (333333)  (44444)  (333444)   (6666)
                             (444333)   (333555)
                             (3333333)  (444444)
                                        (555333)
                                        (3333444)
                                        (4443333)
                                        (33333333)
		

Crossrefs

Allowing any multiplicities gives A078012, partitions A008483.
The version for no (instead of all) parts or run-lengths > 2 is A137200.
Allowing any parts gives A353400, partitions A100405.
The version for partitions is A353501, ranked by A353502.
The version for > 1 instead of > 2 is A353508, partitions A339222.
A003242 counts anti-run compositions, ranked by A333489.
A008466 counts compositions with some part > 2.
A011782 counts compositions.
A114901 counts compositions with no runs of length 1, ranked by A353427.
A128695 counts compositions with no run-lengths > 2.
A261983 counts non-anti-run compositions.
A335464 counts compositions with a run-length > 2.

Programs

  • Maple
    b:= proc(n, h) option remember; `if`(n=0, 1, add(
         `if`(i=h, 0, add(b(n-i*j, i), j=3..n/i)), i=3..n/3))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..80);  # Alois P. Heinz, May 18 2022
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!MemberQ[#,1|2]&&!MemberQ[Length/@Split[#],1|2]&]],{n,0,15}]

Extensions

a(26)-a(66) from Alois P. Heinz, May 17 2022

A353502 Numbers with all prime indices and exponents > 2.

Original entry on oeis.org

1, 125, 343, 625, 1331, 2197, 2401, 3125, 4913, 6859, 12167, 14641, 15625, 16807, 24389, 28561, 29791, 42875, 50653, 68921, 78125, 79507, 83521, 103823, 117649, 130321, 148877, 161051, 166375, 205379, 214375, 226981, 274625, 279841, 300125, 300763, 357911
Offset: 1

Views

Author

Gus Wiseman, May 16 2022

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.

Examples

			The initial terms together with their prime indices:
       1: {}
     125: {3,3,3}
     343: {4,4,4}
     625: {3,3,3,3}
    1331: {5,5,5}
    2197: {6,6,6}
    2401: {4,4,4,4}
    3125: {3,3,3,3,3}
    4913: {7,7,7}
    6859: {8,8,8}
   12167: {9,9,9}
   14641: {5,5,5,5}
   15625: {3,3,3,3,3,3}
   16807: {4,4,4,4,4}
   24389: {10,10,10}
   28561: {6,6,6,6}
   29791: {11,11,11}
   42875: {3,3,3,4,4,4}
		

Crossrefs

The version for only parts is A007310, counted by A008483.
The version for <= 2 instead of > 2 is A018256, # of compositions A137200.
The version for only multiplicities is A036966, counted by A100405.
The version for indices and exponents prime (instead of > 2) is:
- listed by A346068
- counted by A351982
- only exponents: A056166, counted by A055923
- only parts: A076610, counted by A000607
The version for > 1 instead of > 2 is A062739, counted by A339222.
The version for compositions is counted by A353428, see A078012, A353400.
The partitions with these Heinz numbers are counted by A353501.
A000726 counts partitions with multiplicities <= 2, compositions A128695.
A001222 counts prime factors with multiplicity, distinct A001221.
A004250 counts partitions with some part > 2, compositions A008466.
A056239 adds up prime indices, row sums of A112798 and A296150.
A124010 gives prime signature, sorted A118914.
A295341 counts partitions with some multiplicity > 2, compositions A335464.

Programs

  • Mathematica
    Select[Range[10000],#==1||!MemberQ[FactorInteger[#],{?(#<5&),}|{,?(#<3&)}]&]

Formula

Sum_{n>=1} 1/a(n) = Product_{p prime > 3} (1 + 1/(p^2*(p-1))) = (72/95)*A065483 = 1.0154153584... . - Amiram Eldar, May 28 2022

A353508 Number of integer compositions of n with no ones or runs of length 1.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 2, 0, 2, 1, 4, 0, 8, 2, 11, 4, 21, 5, 37, 12, 57, 25, 104, 38, 177, 79, 292, 149, 513, 251, 876, 482, 1478, 871, 2562, 1533, 4387, 2815, 7473, 5036, 12908, 8935, 22135, 16085, 37940, 28611, 65422, 50731, 112459, 90408, 193386, 160119, 333513
Offset: 0

Views

Author

Gus Wiseman, May 17 2022

Keywords

Examples

			The a(0) = 1 through a(14) = 11 compositions (empty columns indicated by dots, 0 is the empty composition):
  0  .  .  .  22  .  33   .  44    333  55     .  66      22333  77
                     222     2222       2233      444     33322  2255
                                        3322      2244           3344
                                        22222     3333           4433
                                                  4422           5522
                                                  22233          22244
                                                  33222          44222
                                                  222222         222233
                                                                 223322
                                                                 332222
                                                                 2222222
		

Crossrefs

The version for partitions is A339222.
Compositions counted by their run-lengths:
- For run-lengths <= 1 we have A003242, ranked by A333489.
- For run-lengths = 2 we have A003242 aerated.
- For run-lengths > 1 we have A114901, ranked by A353427.
- For run-lengths <= 2 we have A128695 matching A335464.
- For run-lengths > 2 we have A353400, partitions A100405.
- For run-lengths all prime we have A353401.
- For run-lengths and parts > 2 we have A353428.
A008466 counts compositions with some part > 2.
A011782 counts compositions.
A106356 counts compositions by number of adjacent equal parts.
A261983 counts non-anti-run compositions.
A274174 counts compositions with equal parts contiguous.

Programs

  • Maple
    b:= proc(n,h) option remember; `if`(n=0, 1, add(
         `if`(i<>h, add(b(n-i*j, i), j=2..n/i), 0), i=2..n/2))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..60);  # Alois P. Heinz, May 17 2022
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!MemberQ[#,1]&&!MemberQ[Length/@Split[#],1]&]],{n,0,15}]

Extensions

a(41)-a(52) from Alois P. Heinz, May 17 2022

A353501 Number of integer partitions of n with all parts and all multiplicities > 2.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 2, 1, 0, 2, 0, 2, 3, 0, 0, 6, 2, 0, 6, 3, 2, 9, 2, 5, 11, 3, 5, 18, 6, 4, 20, 13, 8, 26, 10, 17, 37, 14, 16, 51, 23, 24, 58, 38, 32, 75, 44, 52, 100, 52, 59, 143, 75, 77, 159, 114, 112, 203, 132, 154, 266, 175
Offset: 0

Views

Author

Gus Wiseman, May 16 2022

Keywords

Examples

			The a(n) partitions for selected n (A = 10):
  n=9:   n=12:   n=21:      n=24:       n=30:
------------------------------------------------------
  (333)  (444)   (777)      (888)       (AAA)
         (3333)  (444333)   (6666)      (66666)
                 (3333333)  (444444)    (555555)
                            (555333)    (666444)
                            (4443333)   (777333)
                            (33333333)  (6663333)
                                        (55533333)
                                        (444333333)
                                        (3333333333)
		

Crossrefs

The version for only parts > 2 is A008483.
The version for only multiplicities > 2 is A100405.
The version for parts and multiplicities > 1 is A339222, ranked by A062739.
For prime parts and multiplicities we have A351982, compositions A353429.
The version for compositions is A353428 (partial A078012, A353400).
These partitions are ranked by A353502.
A000726 counts partitions with all mults <= 2, compositions A128695.
A004250 counts partitions with some part > 2, compositions A008466.
A137200 counts compositions with all parts and run-lengths <= 2.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Min@@#>2&&Min@@Length/@Split[#]>2&]],{n,0,30}]
Showing 1-9 of 9 results.