login
Number of integer compositions of n into parts that are alternately unequal and equal.
19

%I #10 Oct 19 2022 18:18:06

%S 1,1,1,3,4,7,8,13,17,25,30,44,58,77,98,142,176,245,311,426,548,758,

%T 952,1319,1682,2308,2934,4059,5132,7087,9008,12395,15757,21728,27552,

%U 38019,48272,66515,84462,116467,147812,203825,258772,356686,452876,624399,792578

%N Number of integer compositions of n into parts that are alternately unequal and equal.

%H Alois P. Heinz, <a href="/A357644/b357644.txt">Table of n, a(n) for n = 0..1000</a>

%e The a(1) = 1 through a(7) = 13 compositions:

%e (1) (2) (3) (4) (5) (6) (7)

%e (12) (13) (14) (15) (16)

%e (21) (31) (23) (24) (25)

%e (211) (32) (42) (34)

%e (41) (51) (43)

%e (122) (411) (52)

%e (311) (1221) (61)

%e (2112) (133)

%e (322)

%e (511)

%e (2113)

%e (3112)

%e (12211)

%t Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],And@@Table[#[[i]]==#[[i+1]],{i,2,Length[#]-1,2}]&&And@@Table[#[[i]]!=#[[i+1]],{i,1,Length[#]-1,2}]&]],{n,0,10}]

%Y Without equal relations we have A000213, equal only A027383.

%Y Even-length opposite: A003242, ranked by A351010, partitions A035457.

%Y The version for partitions is A351006.

%Y The opposite version is A357643, partitions A351005.

%Y A011782 counts compositions.

%Y A357621 gives half-alternating sum of standard compositions, skew A357623.

%Y A357645 counts compositions by half-alternating sum, skew A357646.

%Y Cf. A001590, A029862, A035544, A097805, A122129, A122134, A122135, A351003, A351004, A351007, A357136, A357641.

%K nonn

%O 0,4

%A _Gus Wiseman_, Oct 14 2022

%E More terms from _Alois P. Heinz_, Oct 19 2022