%I #45 Feb 29 2024 20:43:37
%S 1,1,3,6,15,34,83,198,488,1202,3015,7608,19432,49994,129779,339176,
%T 892600,2362634,6288156,16816232,45170466,121812152,329679487,
%U 895171236,2437885058,6657311202,18224979884,50006899724,137502724754
%N Sequence whose Hankel transform is the Somos (4) sequence.
%C Hankel transform is A006720(n+3). In general, the sequence with g.f. ((1-x)/(1-(r+1)*x))*c(x^2*(1-x)/(1-(r+1)*x)) will have a Somos (1,r) Hankel transform.
%C a(n) is the number of rooted plane 2-trees with integer compositions labeling the leaves (empty labels are allowed), with total size n. The total size is the number of edges in the tree plus the sum of the sizes of the integer compositions labeling the leaves. Example; a(2)=3 because there are two trees that consist of the root and no descendants, hence the root is itself a leaf and it can be labeled by either 2=2 or by 2=1+1, and then there is the tree that consists of the root with two descendants and no labels on the two leaves. - _Ricardo Gómez Aíza_, Feb 26 2024
%H G. C. Greubel, <a href="/A173992/b173992.txt">Table of n, a(n) for n = 0..2000</a>
%H Ricardo Gómez Aíza, <a href="https://arxiv.org/abs/2402.16111">Trees with flowers: A catalog of integer partition and integer composition trees with their asymptotic analysis</a>, arXiv:2402.16111 [math.CO], 2024.
%F G.f.: ((1-x)/(1-2*x)) * c(x^2*(1-x)/(1-2*x)) = (1-2*x-sqrt((1-2x)*(1-2*x-4*x^2+4*x^3)))/(2*x^2*(1-2*x)), c(x) the g.f. of A000108;
%F a(n) = Sum_{k=0..floor(n/2), A000108(k)*Sum_{i=0..k+1, C(k+1,i)*C(n-k-i,n-2k-i)*(-1)^i*2^(n-2k-i)}}.
%F D-finite with recurrence: (n+2)*a(n) -4*(n+1)*a(n-1) +4*a(n-2) +2*(6n-11)*a(n-3) +8*(3-n)*a(n-4)=0. - _R. J. Mathar_, Nov 17 2011
%F a(n) ~ sqrt(2-5*c+4*c^2)/(2*c*(1-2*c)*sqrt(Pi*n^3))*(1/c)^n where c=(4+(1+i*sqrt(3))*(1+3*i*sqrt(111))^(1/3)+80/((sqrt(3)+i)^2*(1+3*i*sqrt(111))^(1/3)))/12. - _Ricardo Gómez Aíza_, Feb 26 2024
%p with(LREtools): with(FormalPowerSeries): # requires Maple 2022
%p ogf:=(1-2*x-sqrt((1-2*x)*(1-2*x-4*x^2+4*x^3)))/(2*x^2*(1-2*x)):
%p req1:= FindRE(ogf,x,u(n)); inits:= {seq(u(i-1)=[1, 1, 3, 6, 15, 34][i],i=1..6)}:
%p req2:= subs(n=n-4, MinimalRecurrence(req1,u(n),inits)[1]); # Mathar's recurrence
%p a:= gfun:-rectoproc({req2} union inits, u(n), remember):
%p seq(a(n),n=0..28); # _Georg Fischer_, Nov 03 2022
%t A173992[n_] := Sum[CatalanNumber[k] Sum[Binomial[k + 1, i] Binomial[n - k - i, n - 2 k - i] (-1)^i Floor[2^(n - 2 k - i)], {i, 0, k + 1}], {k, 0, Floor[n/2]}] (* _Eric Rowland_, May 15 2017 *)
%t CoefficientList[Series[(1-2*x -Sqrt[(1-2*x)*(1-2*x-4*x^2+4*x^3)])/(2*x^2* (1-2*x)), {x, 0, 50}], x] (* _G. C. Greubel_, Sep 25 2018 *)
%o (PARI) a(n) = sum(k=0, n\2, binomial(2*k,k)/(k+1)*sum(i=0, k+1, binomial(k+1,i)*binomial(n-k-i,n-2*k-i)*(-1)^i*2^(n-2*k-i))); \\ _Michel Marcus_, May 15 2017
%o (PARI) x='x+O('x^50); Vec((1-2*x-((1-2*x)*(1-2*x-4*x^2+4*x^3))^(1/2))/(2*x^2*(1-2*x))) \\ _Altug Alkan_, Sep 25 2018
%o (Magma) m:=50; R<x>:=PowerSeriesRing(Rationals(), m); Coefficients(R!((1-2*x-Sqrt((1-2x)*(1-2*x-4*x^2+4*x^3)))/(2*x^2*(1-2*x)))); // _G. C. Greubel_, Sep 25 2018
%Y Cf. A000108, A006720, A056010.
%K nonn,easy
%O 0,3
%A _Paul Barry_, Mar 04 2010