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.
%I A373420 #27 Aug 16 2024 20:52:34 %S A373420 1,1,1,1,2,3,2,7,11,17,26,54,86,155,272,464,816,1447,2507,4400,7706, %T A373420 13456,23570,41293,72212,126394,221282,387219,677714,1186311,2076170, %U A373420 3633761,6360219,11131698,19483066,34100455,59683664,104460655,182832044,319999739 %N A373420 Number of Carlitz compositions of n (see A003242) such that the first and last parts are equal. %F A373420 G.f.: 1 + Sum_{i>0} (x^i)*(C(x)*(x^i) + x^i + 1)/(1+x^i)^2 where C(x) is the g.f. for A003242. %e A373420 a(7) = 7 counts: (1,2,1,2,1), (1,2,3,1), (1,3,2,1), (1,5,1), (2,3,2), (3,1,3), and (7). %o A373420 (PARI) %o A373420 C_x(N) = {my(g=1/(1-sum(k=1, N, x^k/(1+x^k))));g} %o A373420 A_x(i,N) = {my( x='x+O('x^N), f=(x^i)*(C_x(N)*(x^i)+x^i+1)/(1+x^i)^2);f} %o A373420 D_x(N) = {my( x='x+O('x^N), f=1+sum(i=1,N, A_x(i,N))); Vec(f)} %o A373420 D_x(40) %Y A373420 Cf. A001045, A003242, A285981, A291941, A374517. %K A373420 nonn,easy %O A373420 0,5 %A A373420 _John Tyler Rascoe_, Aug 16 2024