%I #45 Aug 30 2022 14:06:43
%S 0,0,6,16,36,66,114,176,264,370,510,672,876,1106,1386,1696,2064,2466,
%T 2934,3440,4020,4642,5346,6096,6936,7826,8814,9856,11004,12210,13530,
%U 14912,16416,17986,19686,21456,23364,25346,27474,29680,32040,34482
%N Expansion of -2*x^2*(-3-2*x+x^2-x^3-2*x^4+x^5) / ( (1+x)^2*(x-1)^4 ).
%F For n even, a(n) = n*(2+n^2)/2 = A061804(n/2). For n>1 and odd, a(n)=(n+1)*(n^2-n+2)/2 = 2*A212133((n+1)/2).
%F a(n) = (2-2*(-1)^n+(3+(-1)^n)*n+2*n^3)/4 for n>1. [_Colin Barker_, Feb 18 2013]
%t CoefficientList[ Series[ 2x^2 (3 + 2x - x^2 + x^3 + 2x^4 - x^5)/((1 + x)^2 (x - 1)^4), {x, 0, 42}], x] (* _Robert G. Wilson v_, Feb 17 2014 *)
%o (Python)
%o def A178465(n): return n+(m:=n&1)+(n*(n**2-m)>>1) if n != 1 else 0 # _Chai Wah Wu_, Aug 30 2022
%Y Cf. A187062, A187397, A061804, A018808.
%K nonn
%O 0,3
%A _Sean A. Irvine_, Mar 23 2011
%E Discrepancy with A018808 resolved. _David W. Wilson_, Aug 05 2013
%E First line of formulas corrected. _R. J. Mathar_, Aug 05 2013
%E Prepended a(0)=0, _Joerg Arndt_, Feb 19 2014
|