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.

A379836 Number of pairs of adjacent equal parts in all complete compositions of n.

This page as a plain text file.
%I A379836 #43 Feb 05 2025 22:21:02
%S A379836 0,0,1,2,5,12,23,54,118,258,550,1178,2540,5394,11473,24174,51021,
%T A379836 107210,225099,471322,985202,2055542,4281847,8906676,18500425,
%U A379836 38379246,79516158,164561560,340179441,702506576,1449311429,2987297778,6151964642,12658841766,26027603925
%N A379836 Number of pairs of adjacent equal parts in all complete compositions of n.
%C A379836 An integer composition is complete if its set of parts covers an initial interval.
%F A379836 G.f.: B(x) = d/dz Sum_{k>0} C({1..k},x,z)|_{z=1} where C({s},x,z) = Sum_{i in {s}} ( C({s}-{i},x,z)*(x^i)/(1-(x^i)*(z-1)) )/(1 - Sum_{i in {s}} (x^i)/(1-(x^i)*(z-1))) with C({},x,z) = 1.
%e A379836 The complete compositions of n = 4 are: (1,1,2), (1,2,1), (2,1,1), and (1,1,1,1); having a total of 5 pairs of equal adjacent parts giving a(4) = 5.
%o A379836 (PARI)
%o A379836 C_xz(s,N) = {my(x='x+O('x^N), g=if(#s <1,1, sum(i=1,#s, C_xz(s[^i],N+1) * x^(s[i])/(1-(x^(s[i]))*(z-1)) )/(1-sum(i=1,#s, x^(s[i])/(1-(x^(s[i]))*(z-1)))))); return(g)}
%o A379836 B_xz(N) = {my(x='x+O('x^N), j=1, h=0); while((j*(j+1))/2 <= N, h += C_xz(vector(j, i, i), N+1); j+=1); h}
%o A379836 P_xz(N) = Pol(B_xz(N), {x})
%o A379836 B_x(N) = {my(cx = deriv(P_xz(N),z), z=1); Vecrev(eval(cx))}
%o A379836 B_x(20)
%Y A379836 Cf. A011782, A106356, A107428, A107429, A373306, A374147, A374726, A377823.
%K A379836 nonn
%O A379836 0,4
%A A379836 _John Tyler Rascoe_, Jan 14 2025