OFFSET
0,3
COMMENTS
Composition inverse of A027436.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..485
FORMULA
a(n) = (-1)^(n+1) * A213422(n).
EXAMPLE
G.f. = x - 2*x^2 + 12*x^3 - 96*x^4 + 880*x^5 - 8720*x^6 + 90752*x^7 + ...
MATHEMATICA
a[ n_] := Module[ {A, x}, A = x; Do[ A += x O[x]^k; A = Normal[A] + x^k ((-4)^(k-1) CatalanNumber[k-1] - SeriesCoefficient[ ComposeSeries[A, A], k])/2, {k, 2, n}]; oefficient[A, x, n]];
(* Second program *)
T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, If[n==0, 0, If[k==n, 1, 2^(2*n - 2*k-1)*(k/n)*Binomial[2*n-k-1, n-1] - (1/2)*Sum[T[n, n-j-1]*T[n-j-1, k], {j, 0, n-k-2}] ]]];
a[n_]:= (-1)^(n+1)*T[n, 1];
Table[a[n], {n, 0, 30}] (* G. C. Greubel, Mar 08 2023 *)
PROG
(PARI) {a(n) = my(A); A = x; for(k=2, n, A += x*O(x^k); A = truncate(A) + x^k * ((-4)^(k-1) * binomial(2*k-2, k-1)/k - polcoeff(subst(A, x, A), k))/2); polcoeff(A, n)};
(SageMath)
@CachedFunction
def T(n, k):
if (k<0 or k>n): return 0
elif (n==0): return 0
elif (k==n): return 1
else: return 2^(2*n-2*k-1)*(k/(2*n-k))*binomial(2*n-k, n) - (1/2)*sum( T(n, n-j-1)*T(n-j-1, k) for j in range(n-k-1) )
def A307103(n): return (-1)^(n+1)*T(n, 1)
[A307103(n) for n in range(31)] # G. C. Greubel, Mar 08 2023
CROSSREFS
KEYWORD
sign
AUTHOR
Michael Somos, Mar 24 2019
STATUS
approved