OFFSET
1,2
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*(3+x^2) / ( (x^2+1)*(x-1)^2 ).
a(n) = 2*n-1-sin(Pi*n/2). (End)
a(n) = 2n-1-cos(Pi*(n-1)/2). - Wesley Ivan Hurt, Oct 22 2013
From Wesley Ivan Hurt, May 20 2016: (Start)
a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-a(n-4) for n>4.
a(n) = 2*n-2-I^(1-n)*(I^(n-1)-1)^2/2 where I=sqrt(-1).
Sum_{n>=2} (-1)^n/a(n) = 5*log(2)/8 - Pi/16. - Amiram Eldar, Dec 23 2021
MAPLE
MATHEMATICA
Table[2n-1-Cos[Pi(n-1)/2], {n, 100}] (* Wesley Ivan Hurt, Oct 22 2013 *)
PROG
(Sage) [lucas_number1(n, 0, 1)+2*n+3 for n in range(-1, 55)] # Zerinvary Lajos, Jul 06 2008
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Wesley Ivan Hurt, May 20 2016
STATUS
approved