This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A178465 #45 Aug 30 2022 14:06:43 %S A178465 0,0,6,16,36,66,114,176,264,370,510,672,876,1106,1386,1696,2064,2466, %T A178465 2934,3440,4020,4642,5346,6096,6936,7826,8814,9856,11004,12210,13530, %U A178465 14912,16416,17986,19686,21456,23364,25346,27474,29680,32040,34482 %N A178465 Expansion of -2*x^2*(-3-2*x+x^2-x^3-2*x^4+x^5) / ( (1+x)^2*(x-1)^4 ). %F A178465 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 A178465 a(n) = (2-2*(-1)^n+(3+(-1)^n)*n+2*n^3)/4 for n>1. [_Colin Barker_, Feb 18 2013] %t A178465 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 A178465 (Python) %o A178465 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 A178465 Cf. A187062, A187397, A061804, A018808. %K A178465 nonn %O A178465 0,3 %A A178465 _Sean A. Irvine_, Mar 23 2011 %E A178465 Discrepancy with A018808 resolved. _David W. Wilson_, Aug 05 2013 %E A178465 First line of formulas corrected. _R. J. Mathar_, Aug 05 2013 %E A178465 Prepended a(0)=0, _Joerg Arndt_, Feb 19 2014