OFFSET
1,2
COMMENTS
The number of terms in the groups is given by A063196. i.e., 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 11, ...
Also the arithmetic mean of the n-th group is T(n), the n-th triangular number.
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,3,-3,-3,3,1,-1).
FORMULA
a(n) = n*(n+1)*(2*n+1+(-1)^n)/4. - Wesley Ivan Hurt, Sep 19 2014
a(n) = a(n-1)+3*a(n-2)-3*a(n-3)-3*a(n-4)+3*a(n-5)+a(n-6)-a(n-7) for n>7. - Colin Barker, Sep 19 2014
G.f.: x*(x^4+8*x^3+6*x^2+8*x+1) / ((x-1)^4*(x+1)^3). - Colin Barker, Sep 19 2014
From Amiram Eldar, Feb 22 2022: (Start)
Sum_{n>=1} 1/a(n) = 4*(1-log(2)).
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi^2/2 - 4. (End)
MATHEMATICA
Table[n*(n + 1)*(2*n + 1 + (-1)^n)/4, {n, 1, 40}] (* Amiram Eldar, Feb 22 2022 *)
PROG
(Haskell)
a086500 n = a086500_list !! (n-1)
a086500_list = scanl1 (+) $ tail a181900_list
-- Reinhard Zumkeller, Mar 31 2012
(PARI) Vec(x*(x^4+8*x^3+6*x^2+8*x+1)/((x-1)^4*(x+1)^3) + O(x^100)) \\ Colin Barker, Sep 20 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Jul 28 2003
EXTENSIONS
More terms from Ray Chandler, Sep 17 2003
STATUS
approved