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.

A351004 Alternately constant partitions. Number of integer partitions y of n such that y_i = y_{i+1} for all odd i.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 5, 4, 7, 7, 10, 9, 15, 13, 21, 19, 28, 26, 40, 35, 54, 49, 72, 64, 97, 87, 128, 115, 167, 151, 220, 195, 284, 256, 366, 328, 469, 421, 598, 537, 757, 682, 959, 859, 1204, 1085, 1507, 1354, 1880, 1694, 2338, 2104, 2892, 2609, 3574, 3218, 4394
Offset: 0

Views

Author

Gus Wiseman, Jan 31 2022

Keywords

Comments

These are partitions of n with all even multiplicities (or run-lengths), except possibly the last.

Examples

			The a(1) = 1 through a(9) = 7 partitions:
  1  2   3    4     5      6       7        8         9
     11  111  22    221    33      331      44        333
              1111  11111  222     22111    332       441
                           2211    1111111  2222      22221
                           111111           3311      33111
                                            221111    2211111
                                            11111111  111111111
		

Crossrefs

The ordered version (compositions) is A016116.
The even-length case is A035363.
A reverse version is A096441, both A349060.
The version for unequal instead of equal is A122129, even-length A351008.
The version for even instead of odd indices is A351003, even-length A351012.
The strict version is A351005, opposite A351006, even-length A035457.

Programs

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