OFFSET
1,3
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-1).
FORMULA
From R. J. Mathar, Oct 08 2011: (Start)
G.f.: x^2*(1+3*x^2) / ( (x^2+1)*(x-1)^2 ).
a(n) = 2*n-3+sin(n*Pi/2). (End)
From Wesley Ivan Hurt, May 22 2016: (Start)
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>4.
a(n) = (4n-6+I^(1-n)-I^(1+n))/2 where i=sqrt(-1).
Sum_{n>=2} (-1)^n/a(n) = Pi/16 + 5*log(2)/8. - Amiram Eldar, Dec 19 2021
MAPLE
MATHEMATICA
Table[(4n-6+I^(1-n)-I^(1+n))/2, {n, 80}] (* Wesley Ivan Hurt, May 22 2016 *)
LinearRecurrence[{2, -2, 2, -1}, {0, 1, 2, 5}, 120] (* Harvey P. Dale, Mar 11 2017 *)
PROG
(Sage) [lucas_number1(n, 0, 1)+2*n-3 for n in range(1, 57)] # Zerinvary Lajos, Jul 06 2008
(Magma) [n : n in [0..150] | n mod 8 in [0, 1, 2, 5]]; // Wesley Ivan Hurt, May 22 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Wesley Ivan Hurt, May 22 2016
STATUS
approved