cp's OEIS Frontend

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.

A178465 Expansion of -2*x^2*(-3-2*x+x^2-x^3-2*x^4+x^5) / ( (1+x)^2*(x-1)^4 ).

Original entry on oeis.org

0, 0, 6, 16, 36, 66, 114, 176, 264, 370, 510, 672, 876, 1106, 1386, 1696, 2064, 2466, 2934, 3440, 4020, 4642, 5346, 6096, 6936, 7826, 8814, 9856, 11004, 12210, 13530, 14912, 16416, 17986, 19686, 21456, 23364, 25346, 27474, 29680, 32040, 34482
Offset: 0

Views

Author

Sean A. Irvine, Mar 23 2011

Keywords

Crossrefs

Programs

  • Mathematica
    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 *)
  • Python
    def A178465(n): return n+(m:=n&1)+(n*(n**2-m)>>1) if n != 1 else 0 # Chai Wah Wu, Aug 30 2022

Formula

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).
a(n) = (2-2*(-1)^n+(3+(-1)^n)*n+2*n^3)/4 for n>1. [Colin Barker, Feb 18 2013]

Extensions

Discrepancy with A018808 resolved. David W. Wilson, Aug 05 2013
First line of formulas corrected. R. J. Mathar, Aug 05 2013
Prepended a(0)=0, Joerg Arndt, Feb 19 2014