OFFSET
1,3
COMMENTS
Partial sums of A068073. - Jeremy Gardiner, Jul 20 2013.
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-1).
FORMULA
G.f.: x^2*(1+x+2*x^2) / ( (x^2+1)*(x-1)^2 ). - R. J. Mathar, Dec 05 2011
a(n) = 2*(n-1)+(i^(n*(n-1))-1)/2, where i=sqrt(-1). - Bruno Berselli, Dec 05 2011
From Wesley Ivan Hurt, Jun 01 2016: (Start)
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>4.
Sum_{n>=2} (-1)^n/a(n) = Pi/16 + (3-sqrt(2))*log(2)/8 + sqrt(2)*log(2+sqrt(2))/4. - Amiram Eldar, Dec 20 2021
MAPLE
MATHEMATICA
Select[Range[0, 107], MemberQ[{0, 1, 3, 6}, Mod[#, 8]]&] (* Bruno Berselli, Dec 05 2011 *)
PROG
(Maxima) makelist(2*(n-1)+(%i^(n*(n-1))-1)/2, n, 1, 55); /* Bruno Berselli, Dec 05 2011 */
(Magma) [n : n in [0..150] | n mod 8 in [0, 1, 3, 6]]; // Wesley Ivan Hurt, Jun 01 2016
(PARI) my(x='x+O('x^100)); concat(0, Vec(x^2*(1+x+2*x^2)/((x^2+1)*(x-1)^2))) \\ Altug Alkan, Jun 02 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved