OFFSET
1,1
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-1).
FORMULA
a(n) = A056594(n)+2*n-1. - Zerinvary Lajos, Jul 06 2008
a(n) = A047404(n)+1. - Zerinvary Lajos, Jul 06 2008
G.f.: x*(2-x+2*x^2+x^3) / ((1+x^2)*(x-1)^2). - R. J. Mathar, Oct 08 2011
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-2+I^(1-n)+I^(n-1))/2 where I=sqrt(-1).
Sum_{n>=1} (-1)^(n+1)/a(n) = 3*Pi/16 - 3*log(2)/8. - Amiram Eldar, Dec 25 2021
MAPLE
MATHEMATICA
Table[(4n-2+I^(1-n)+I^(n-1))/2, {n, 80}] (* Wesley Ivan Hurt, May 20 2016 *)
PROG
(Sage) [lucas_number1(n, 0, 1)+2*n-1 for n in range(1, 56)] # Zerinvary Lajos, Jul 06 2008
(PARI) a(n)=(n-1)\4*8+[7, 2, 3, 4][n%4+1] \\ Charles R Greathouse IV, Jun 11 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Wesley Ivan Hurt, May 20 2016
STATUS
approved