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.

A106357 Number of compositions of n with exactly 1 adjacent equal pair of parts.

This page as a plain text file.
%I A106357 #21 May 17 2024 05:23:47
%S A106357 1,0,3,6,7,20,42,72,141,280,516,976,1853,3420,6361,11844,21819,40192,
%T A106357 73942,135452,247828,452776,825252,1501998,2730159,4954890,8981360,
%U A106357 16261568,29408708,53130154,95894384,172917788,311538169,560831286
%N A106357 Number of compositions of n with exactly 1 adjacent equal pair of parts.
%H A106357 Alois P. Heinz, <a href="/A106357/b106357.txt">Table of n, a(n) for n = 2..1000</a>
%H A106357 A. Knopfmacher and H. Prodinger, <a href="https://doi.org/10.1006/eujc.1998.0216">On Carlitz compositions</a>, European Journal of Combinatorics, Vol. 19, 1998, pp. 579-589.
%F A106357 a(n) ~ c * d^n * n, where d = A241902 = 1.750241291718309031249738624639..., c = 0.04826600476992825168367... . - _Vaclav Kotesovec_, Sep 05 2014
%F A106357 G.f.: (Sum_{i>0} C(x)*x^(2*i)/(1+x^i)^2)/(1 - Sum_{i>0} x^i/(1+x^i)) where C(x) is the g.f. for A003242. - _John Tyler Rascoe_, May 16 2024
%p A106357 b:= proc(n, v) option remember; `if`(n=0, [1, 0],
%p A106357       add((p-> `if`(i=v, [0, p[1]], p))(b(n-i, i)), i=1..n))
%p A106357     end:
%p A106357 a:= n-> b(n, 0)[2]:
%p A106357 seq(a(n), n=2..45);  # _Alois P. Heinz_, May 09 2014
%t A106357 b[n_, v_] := b[n, v] = If[n == 0, {1, 0}, Sum[Function[p, If[i == v, {0, p[[1]]}, p]][b[n - i, i]], {i, 1, n}]];
%t A106357 a[n_] := b[n, 0][[2]];
%t A106357 a /@ Range[2, 45] (* _Jean-François Alcover_, Nov 02 2020, after _Alois P. Heinz_ *)
%o A106357 (PARI)
%o A106357 C_x(N)={my(g=1/(1 - sum(k=1, N, x^k/(1+x^k))));g}
%o A106357 A_x(N)={my(x='x+O('x^N), h=sum(i=1,N,(C_x(N)*x^(2*i))/(1+x^i)^2 )/(1-sum(i=1,N,(x^i)/(1+x^i)))); Vec(h)}
%o A106357 A_x(40) \\ _John Tyler Rascoe_, May 16 2024
%Y A106357 Column 1 of A106356. Cf. A003242.
%Y A106357 Cf. A241902.
%K A106357 nonn
%O A106357 2,3
%A A106357 _Christian G. Bower_, Apr 29 2005
%E A106357 Replaced broken link, _Vaclav Kotesovec_, May 01 2014