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

A351006 Number of integer partitions of n into parts that are alternately unequal and equal.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 4, 6, 7, 9, 10, 12, 14, 16, 18, 22, 25, 28, 31, 36, 40, 46, 50, 56, 64, 71, 78, 88, 96, 106, 118, 130, 143, 158, 172, 190, 209, 228, 248, 274, 298, 324, 354, 384, 418, 458, 494, 536, 584, 631, 683, 742, 800, 864, 936, 1010, 1088, 1176, 1264
Offset: 0

Views

Author

Gus Wiseman, Jan 31 2022

Keywords

Examples

			The a(1) = 1 through a(11) = 12 partitions (A = 10, B = 11):
  1  2  3   4    5    6    7    8     9      A      B
        21  31   32   42   43   53    54     64     65
            211  41   51   52   62    63     73     74
                 311  411  61   71    72     82     83
                           322  422   81     91     92
                           511  611   522    433    A1
                                3221  711    622    533
                                      4221   811    722
                                      32211  5221   911
                                             42211  4331
                                                    6221
                                                    52211
		

Crossrefs

Without equalities we have A122129, opposite A122135, even-length A351008.
The non-strict version is A351003, opposite A351004, even-length A351012.
The alternately equal and unequal version is A351005, even-length A035457.
The even-length case is A351007.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],And@@Table[#[[i]]==#[[i+1]],{i,2,Length[#]-1,2}]&&And@@Table[#[[i]]!=#[[i+1]],{i,1,Length[#]-1,2}]&]],{n,0,30}]

A351007 Number of even-length integer partitions of n into parts that are alternately unequal and equal.

Original entry on oeis.org

1, 0, 0, 1, 1, 2, 2, 3, 4, 5, 5, 7, 8, 9, 10, 13, 14, 16, 18, 20, 23, 27, 28, 32, 37, 40, 44, 51, 54, 60, 67, 73, 81, 90, 96, 107, 118, 127, 139, 154, 166, 181, 198, 213, 232, 256, 273, 297, 325, 348, 377, 411, 440, 476, 516, 555, 598, 647, 692, 746, 807
Offset: 0

Views

Author

Gus Wiseman, Jan 31 2022

Keywords

Comments

These are partitions whose multiplicities begin with a 1, are followed by any number of 2's, and end with another 1.

Examples

			The a(3) = 1 through a(15) = 13 partitions (A..E = 10..14):
  21  31  32  42  43  53    54    64    65    75    76    86    87
          41  51  52  62    63    73    74    84    85    95    96
                  61  71    72    82    83    93    94    A4    A5
                      3221  81    91    92    A2    A3    B3    B4
                            4221  5221  A1    B1    B2    C2    C3
                                        4331  4332  C1    D1    D2
                                        6221  5331  5332  5441  E1
                                              7221  6331  6332  5442
                                                    8221  7331  6441
                                                          9221  7332
                                                                8331
                                                                A221
                                                                433221
		

Crossrefs

The alternately equal and unequal version is A035457, any length A351005.
This is the even-length case of A351006, odd-length A053251.
Without equalities we have A351008, any length A122129, opposite A122135.
Without inequalities we have A351012, any length A351003, opposite A351004.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],EvenQ[Length[#]]&&And@@Table[#[[i]]==#[[i+1]],{i,2,Length[#]-1,2}]&&And@@Table[#[[i]]!=#[[i+1]],{i,1,Length[#]-1,2}]&]],{n,0,30}]

A351010 Numbers k such that the k-th composition in standard order is a concatenation of twins (x,x).

Original entry on oeis.org

0, 3, 10, 15, 36, 43, 58, 63, 136, 147, 170, 175, 228, 235, 250, 255, 528, 547, 586, 591, 676, 683, 698, 703, 904, 915, 938, 943, 996, 1003, 1018, 1023, 2080, 2115, 2186, 2191, 2340, 2347, 2362, 2367, 2696, 2707, 2730, 2735, 2788, 2795, 2810, 2815, 3600, 3619
Offset: 1

Views

Author

Gus Wiseman, Feb 01 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 together with their binary expansions and the corresponding compositions begin:
    0:         0  ()
    3:        11  (1,1)
   10:      1010  (2,2)
   15:      1111  (1,1,1,1)
   36:    100100  (3,3)
   43:    101011  (2,2,1,1)
   58:    111010  (1,1,2,2)
   63:    111111  (1,1,1,1,1,1)
  136:  10001000  (4,4)
  147:  10010011  (3,3,1,1)
  170:  10101010  (2,2,2,2)
  175:  10101111  (2,2,1,1,1,1)
  228:  11100100  (1,1,3,3)
  235:  11101011  (1,1,2,2,1,1)
  250:  11111010  (1,1,1,1,2,2)
  255:  11111111  (1,1,1,1,1,1,1,1)
		

Crossrefs

The case of twins (binary weight 2) is A000120.
The Heinz numbers of these compositions are given by A000290.
All terms are evil numbers A001969.
Partitions of this type are counted by A035363, any length A351004.
These compositions are counted by A077957(n-2), see also A016116.
The strict case (distinct twins) is A351009, counted by A032020 with 0's.
The anti-run case is A351011, counted by A003242 interspersed with 0's.
A011782 counts integer compositions.
A085207/A085208 represent concatenation of standard compositions.
A333489 ranks anti-runs, complement A348612.
A345167/A350355/A350356 rank alternating compositions.
A351014 counts distinct runs in standard compositions.
Selected statistics of standard compositions:
- Length is A000120.
- Sum is A070939.
- 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],And@@EvenQ/@Length/@Split[stc[#]]&]

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

A351009 Numbers k such that the k-th composition in standard order is a concatenation of distinct twins (x,x).

Original entry on oeis.org

0, 3, 10, 36, 43, 58, 136, 147, 228, 528, 547, 586, 676, 904, 2080, 2115, 2186, 2347, 2362, 2696, 2707, 2788, 3600, 3658, 3748, 8256, 8323, 8458, 8740, 8747, 8762, 9352, 10768, 10787, 11144, 14368, 14474, 14984, 32896, 33027, 33290, 33828, 33835, 33850, 34963
Offset: 1

Views

Author

Gus Wiseman, Feb 03 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 together with their binary expansions and standard compositions begin:
    0:           0  ()
    3:          11  (1,1)
   10:        1010  (2,2)
   36:      100100  (3,3)
   43:      101011  (2,2,1,1)
   58:      111010  (1,1,2,2)
  136:    10001000  (4,4)
  147:    10010011  (3,3,1,1)
  228:    11100100  (1,1,3,3)
  528:  1000010000  (5,5)
  547:  1000100011  (4,4,1,1)
  586:  1001001010  (3,3,2,2)
  676:  1010100100  (2,2,3,3)
  904:  1110001000  (1,1,4,4)
		

Crossrefs

The case of twins (binary weight 2) is A000120.
All terms are evil numbers A001969.
The version for Heinz numbers of partitions is A062503, counted by A035457.
These compositions are counted by A032020 interspersed with 0's.
Taking singles instead of twins gives A349051.
This is the strict (distinct twins) version of A351010 and A351011.
A011782 counts compositions.
A085207 represents concatenation using standard compositions.
A333489 ranks anti-runs, complement A348612.
A345167 ranks alternating compositions, counted by A025047.
A351014 counts distinct runs in standard compositions, see A351015.
Selected statistics of standard compositions:
- Length is A000120.
- Sum is A070939.
- 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,1000], UnsameQ@@Split[stc[#]]&&And@@(#==2&)/@Length/@Split[stc[#]]&]
Showing 1-5 of 5 results.