login
a(n) = Sum_{k=0..floor(n/3)} (-1)^k * binomial(n+2,3*k+2) * Catalan(k).
5

%I #16 Nov 21 2023 16:29:47

%S 1,3,6,9,9,0,-26,-72,-117,-82,204,975,2289,3357,1332,-9834,-37935,

%T -82593,-108282,2583,487521,1621071,3261546,3685230,-2318615,

%U -24607854,-72887472,-134909701,-123941901,200330184,1258932996,3377359872,5706502677,3797618237

%N a(n) = Sum_{k=0..floor(n/3)} (-1)^k * binomial(n+2,3*k+2) * Catalan(k).

%H Harvey P. Dale, <a href="/A360049/b360049.txt">Table of n, a(n) for n = 0..1000</a>

%F a(n) = binomial(n+2,2) - Sum_{k=0..n-3} a(k) * a(n-k-3).

%F G.f. A(x) satisfies: A(x) = 1/(1-x)^3 - x^3 * A(x)^2.

%F G.f.: 2 / ( (1-x) * ((1-x)^2 + sqrt((1-x)^4 + 4*x^3*(1-x))) ).

%F D-finite with recurrence (n+3)*a(n) +4*(-n-2)*a(n-1) +6*(n+1)*a(n-2) -6*a(n-3) +3*(-n+1)*a(n-4)=0. - _R. J. Mathar_, Jan 25 2023

%t Table[Sum[(-1)^k Binomial[n+2,3k+2]CatalanNumber[k],{k,0,Floor[n/3]}],{n,0,40}] (* _Harvey P. Dale_, Nov 21 2023 *)

%o (PARI) a(n) = sum(k=0, n\3, (-1)^k*binomial(n+2, 3*k+2)*binomial(2*k, k)/(k+1));

%o (PARI) my(N=40, x='x+O('x^N)); Vec(2/((1-x)*((1-x)^2+sqrt((1-x)^4+4*x^3*(1-x)))))

%Y Cf. A360048, A360050, A360051.

%Y Cf. A000108.

%K sign

%O 0,2

%A _Seiichi Manyama_, Jan 23 2023