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.

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

This page as a plain text file.
%I A357643 #16 Jun 01 2024 05:40:07
%S A357643 1,1,2,1,3,3,5,5,9,7,17,14,28,25,49,42,87,75,150,132,266,226,466,399,
%T A357643 810,704,1421,1223,2488,2143,4352,3759,7621,6564,13339,11495,23339,
%U A357643 20135,40852,35215,71512,61639,125148,107912,219040,188839,383391,330515,670998
%N A357643 Number of integer compositions of n into parts that are alternately equal and unequal.
%H A357643 Alois P. Heinz, <a href="/A357643/b357643.txt">Table of n, a(n) for n = 0..1000</a>
%F A357643 G.f.: (1 + Sum_{k>0} (x^k)/(1 + x^(2*k)))/(1 - Sum_{k>0} (x^(2*k))/(1 + x^(2*k))). - _John Tyler Rascoe_, May 28 2024
%e A357643 The a(1) = 1 through a(8) = 9 compositions:
%e A357643   (1)  (2)   (3)  (4)    (5)    (6)     (7)      (8)
%e A357643        (11)       (22)   (113)  (33)    (115)    (44)
%e A357643                   (112)  (221)  (114)   (223)    (116)
%e A357643                                 (1122)  (331)    (224)
%e A357643                                 (2211)  (11221)  (332)
%e A357643                                                  (1133)
%e A357643                                                  (3311)
%e A357643                                                  (22112)
%e A357643                                                  (112211)
%t A357643 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],And@@Table[#[[i]]==#[[i+1]],{i,1,Length[#]-1,2}]&&And@@Table[#[[i]]!=#[[i+1]],{i,2,Length[#]-1,2}]&]],{n,0,15}]
%o A357643 (PARI)
%o A357643 C_x(N) = {my(x='x+O('x^N), h=(1+sum(k=1,N, (x^k)/(1+x^(2*k))))/(1-sum(k=1,N, (x^(2*k))/(1+x^(2*k))))); Vec(h)}
%o A357643 C_x(50) \\ _John Tyler Rascoe_, May 28 2024
%Y A357643 The even-length version is A003242, ranked by A351010, partitions A035457.
%Y A357643 Without equal relations we have A016116, equal only A001590 (apparently).
%Y A357643 The version for partitions is A351005.
%Y A357643 The opposite version is A357644, partitions A351006.
%Y A357643 A011782 counts compositions.
%Y A357643 A357621 gives half-alternating sum of standard compositions, skew A357623.
%Y A357643 A357645 counts compositions by half-alternating sum, skew A357646.
%Y A357643 Cf. A029862, A035544, A097805, A122129, A122134, A122135, A351003, A351004, A351007, A357136, A357641.
%K A357643 nonn
%O A357643 0,3
%A A357643 _Gus Wiseman_, Oct 12 2022
%E A357643 More terms from _Alois P. Heinz_, Oct 12 2022