OFFSET
0,3
COMMENTS
Pentagonal numbers with square indices.
After 0, a(k) is a square if k is in A072256.
LINKS
Bruno Berselli, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
G.f.: x*(1 + x)*(1 + 16*x + x^2)/(1 - x)^5.
a(n) = a(-n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
a(n) = A245288(2*n^2).
From Amiram Eldar, Aug 25 2022: (Start)
Sum_{n>=1} 1/a(n) = 3 - Pi^2/3 - sqrt(3)*Pi*cot(Pi/sqrt(3)).
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(3)*Pi*cosec(Pi/sqrt(3)) - Pi^2/6 - 3. (End)
MAPLE
MATHEMATICA
Table[n^2 (3 n^2 - 1)/2, {n, 0, 40}]
LinearRecurrence[{5, -10, 10, -5, 1}, {0, 1, 22, 117, 376}, 40] (* Vincenzo Librandi, Aug 23 2015 *)
PROG
(PARI) vector(40, n, n--; n^2*(3*n^2-1)/2)
(Sage) [n^2*(3*n^2-1)/2 for n in (0..40)]
(Magma) [n^2*(3*n^2-1)/2: n in [0..40]];
(Magma) I:=[0, 1, 22, 117, 376]; [n le 5 select I[n] else 5*Self(n-1)-10*Self(n-2)+10*Self(n-3)-5*Self(n-4)+Self(n-5): n in [1..40]]; // Vincenzo Librandi, Aug 23 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Jul 31 2015
STATUS
approved