OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = n*( n*(2*n+1)+1 + n*(2*n+1)+2 + ... + n*(2*n+1)+2*n ).
G.f.: x*(9+14*x+x^2)/(1-x)^4. - Colin Barker, Jun 30 2012
a(n) = 4*a(n-1) -6*a(n-2) +4*a(n-3) -a(n-4). - Vincenzo Librandi, Jul 04 2012
Sum_{n>=1} 1/a(n) = 4 - 2*log(2) - Pi^2/4. - Amiram Eldar, Jul 21 2020
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/2 + log(2) + 2*G - 4, where G is Catalan's constant (A006752). - Amiram Eldar, Feb 08 2022
E.g.f.: exp(x)*x*(9 + 16*x + 4*x^2). - Stefano Spezia, Sep 27 2023
EXAMPLE
a(3) = 147 since 147 = 3*7^2.
MATHEMATICA
CoefficientList[Series[x*(9+14*x+x^2)/(1-x)^4, {x, 0, 50}], x] (* Vincenzo Librandi, Jul 04 2012 *)
PROG
(Magma) I:=[0, 9, 50, 147]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jul 04 2012
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Charlie Marion, Jun 22 2003
STATUS
approved