OFFSET
0,3
COMMENTS
Partial sums of A047336. - Reinhard Zumkeller, Jan 07 2012
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
a(n) = 7*n^2/4 + 3*((-1)^n - 1)/8.
From R. J. Mathar, Sep 28 2011: (Start)
G.f.: -x*(1+5*x+x^2) / ( (1+x)*(x-1)^3 ).
a(n) + a(n+1) = A069099(n+1). (End)
a(n) = n^2 + floor(3*n^2/4). - Bruno Berselli, Aug 08 2013
Sum_{n>=1} 1/a(n) = Pi^2/42 + tan(sqrt(3/7)*Pi/2)*Pi/sqrt(21). - Amiram Eldar, Jan 16 2023
MATHEMATICA
CoefficientList[Series[-((x (1+5 x+x^2))/((-1+x)^3 (1+x))), {x, 0, 80}], x] (* or *) LinearRecurrence[{2, 0, -2, 1}, {0, 1, 7, 15}, 80] (* Harvey P. Dale, Jan 18 2021 *)
PROG
(Magma) [7*n^2/4+3*((-1)^n-1)/8: n in [0..50]]; // Vincenzo Librandi, Sep 29 2011
(Haskell)
a195041 n = a195041_list !! n
a195041_list = scanl (+) 0 a047336_list
-- Reinhard Zumkeller, Jan 07 2012
(PARI) a(n)=7*n^2\4 \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Sep 27 2011
STATUS
approved