%I #23 Sep 08 2022 08:45:09
%S 1,2,5,14,40,112,304,800,2048,5120,12544,30208,71680,167936,389120,
%T 892928,2031616,4587520,10289152,22937600,50855936,112197632,
%U 246415360,538968064,1174405120,2550136832,5519704064,11911823360,25635586048
%N a(n) = 2^n*(n^2 - n + 8)/8.
%C Binomial transform of A000124 (when this begins 1,1,2,4,7,...).
%C 2nd binomial transform of (1,0,1,0,0,0,...).
%C Case k=2 where a(n,k) = k^n(n^2 - n + 2k^2)/(2k^2) with g.f. (1 - 2kx + (k^2+1)x^2)/(1-kx)^3.
%H G. C. Greubel, <a href="/A081908/b081908.txt">Table of n, a(n) for n = 0..1000</a> (terms 0..200 from Vincenzo Librandi)
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (6,-12,8).
%F G.f.: (1 - 4*x + 5*x^2)/(1-2*x)^3.
%F a(n) = A000079(n) + (A001788(n) - A001787(n))/2. - _Paul Barry_, May 27 2003
%F a(n) = Sum_{k=0..n} C(n, k)*(1 + C(k, 2)). - _Paul Barry_, May 27 2003
%F E.g.f.: (2 + x^2)*exp(2*x)/2. - _G. C. Greubel_, Oct 17 2018
%t Table[2^n*(n^2-n+8)/8, {n,0,50}] (* or *) LinearRecurrence[{6,-12,8}, {1, 2,5}, 50] (* _G. C. Greubel_, Oct 17 2018 *)
%o (Magma) [2^n*(n^2-n+8)/8: n in [0..40]]; _Vincenzo Librandi_, Apr 27 2011
%o (PARI) a(n)=2^n*(n^2-n+8)/8 \\ _Charles R Greathouse IV_, Oct 07 2015
%Y Cf. A081909.
%K easy,nonn
%O 0,2
%A _Paul Barry_, Mar 31 2003