A351006 Number of integer partitions of n into parts that are alternately unequal and equal.
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
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
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}]