OFFSET
1,1
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-1).
FORMULA
G.f.: x*(1+x)*(x^2-x+2) / ((1+x^2)*(x-1)^2). - R. J. Mathar, Oct 08 2011
a(n) = 2*n - cos(Pi*n/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) = (4*n - i^(-n) - i^n)/2 where i=sqrt(-1).
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(2)*Pi/8 - log(2)/4. - Amiram Eldar, Dec 26 2021
MAPLE
MATHEMATICA
Flatten[#+{2, 5, 6, 7}&/@(8Range[0, 20])] (* Harvey P. Dale, Jan 26 2011 *)
PROG
(Sage) [lucas_number1(n, 0, 1)+2*n+2 for n in range(0, 56)] # Zerinvary Lajos, Jul 06 2008
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Wesley Ivan Hurt, May 20 2016
STATUS
approved