STATUS
reviewed
approved
reviewed
approved
proposed
reviewed
editing
proposed
Delbert L. Johnson, <a href="/A014112/b014112.txt">Table of n, a(n) for n = 1..20000</a>
approved
editing
reviewed
approved
proposed
reviewed
editing
proposed
a(n) = a(n-2) + n*(n-1) for n > 2, a(1)=1, a(2)=2.
G.f.: x*(1 - x^3 + 3*x^2 - x)/((x + 1)*(x - 1)^4). [- Maksym Voznyy (voznyy(AT)mail.ru), Aug 10 2009]
proposed
editing
editing
proposed
(C#) public BigInteger a(BigInteger n) => (n * (n + 2) * (2 * n - 1) + (n.IsEven ? 0 : 9)) / 12; // Delbert L. Johnson, Mar 19 2023