%I #23 Dec 10 2023 17:40:01
%S 0,1,4,14,46,147,462,1437,4438,13637,41746,127426,388076,1179739,
%T 3581052,10856790,32880942,99496293,300845658,909073356,2745419352,
%U 8287110075,25003877784,75412396575,227366950140,685293578217,2064924137152,6220442229932,18734334462598
%N a(n) = Sum_{k=0..n} binomial(n, k)*(2^k - binomial(k, floor(k/2))).
%H G. C. Greubel, <a href="/A330796/b330796.txt">Table of n, a(n) for n = 0..1000</a>
%F a(n) = n! * [x^n] e^x*(e^(2*x) - I_{0}(2*x) - I_{1}(2*x)), where I_{n}(x) are the modified Bessel functions of the first kind.
%F a(n) = [x^n] (1 - x - sqrt(1 - 3*x)*sqrt(1 + x))/(2*x*(1 - 3*x)).
%F D-finite with recurrence a(n) = ((18-9*n)*a(n-3) - (3*n+3)*a(n-2) + (5*n+2)*a(n-1))/(n+1).
%F Sum_{k=0..n} binomial(n, k)*a(k) = A008549(n).
%F Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*a(k) = A045621(n).
%F a(n) = 2*Sum_{j=0..n-1} (-1)^j*C(2*j+1,j)*3^(n-j-1)*C(n+1,j+2)/(n+1). - _Vladimir Kruchinin_, Sep 30 2020
%F a(n) = Sum_{k=0..n} k*binomial(n,k)*hypergeom([(k-n)/2, (k-n+1)/2], [k+2], 4). - _Peter Luschny_, May 24 2021
%F a(n) ~ 3^n * (1 - sqrt(3/(Pi*n))). - _Vaclav Kotesovec_, May 24 2021
%p gf := exp(x)*(exp(2*x) - BesselI(0,2*x) - BesselI(1,2*x)):
%p ser := series(gf, x, 32): seq(n!*coeff(ser, x, n), n=0..28);
%p # Alternative:
%p a := proc(n) option remember; if n < 3 then return n^2 fi;
%p ((18-9*n)*a(n-3) - (3*n+3)*a(n-2) + (5*n+2)*a(n-1))/(n+1) end:
%p seq(a(n), n=0..28);
%p # Or:
%p a := n -> add(binomial(n, k)*(2^k - binomial(k, floor(k/2))), k=0..n):
%p seq(a(n), n=0..28);
%t a[n_]:= Sum[k Binomial[n,k] Hypergeometric2F1[(k-n)/2, (k-n+1)/2, k+2, 4], {k,0,n}]; Table[a[n], {n,0,30}] (* _Peter Luschny_, May 24 2021 *)
%t (* Second program *)
%t A330796[n_]:= Coefficient[Series[(1-x-Sqrt[1-3*x]*Sqrt[1+x])/(2*x*(1- 3*x)), {x,0,50}], x, n];
%t Table[A330796[n], {n,0,30}] (* _G. C. Greubel_, Sep 14 2023 *)
%o (Maxima) a(n):=(2*sum((-1)^j*binomial(2*j+1,j)*3^(n-j-1)*binomial(n+1,j+2),j,0,n-1))/(n+1); /* _Vladimir Kruchinin_, Sep 30 2020 */
%o (Magma)
%o m:=40;
%o R<x>:=PowerSeriesRing(Rationals(), m+2);
%o A330796:= func< n | Coefficient(R!( (1-x-Sqrt(1-3*x)*Sqrt(1+x))/(2*x*(1-3*x)) ), n) >;
%o [A330796(n): n in [0..m]]; // _G. C. Greubel_, Sep 14 2023
%o (SageMath)
%o m=40
%o P.<x> = PowerSeriesRing(ZZ, m+2)
%o def A330796(n): return P( (1-x-sqrt(1-3*x)*sqrt(1+x))/(2*x*(1-3*x)) ).list()[n]
%o [A330796(n) for n in range(m+1)] # _G. C. Greubel_, Sep 14 2023
%Y Cf. A008549, A045621.
%K nonn
%O 0,3
%A _Peter Luschny_, Jan 12 2020