OFFSET
1,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
From Reinhard Zumkeller, Feb 21 2010: (Start)
a(n+1) - a(n) = A140081(n-1) + 1;
G.f.: x^2*(1+2*x+2*x^2+3*x^3) / ( (1+x)*(x^2+1)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
From Wesley Ivan Hurt, Jun 01 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(n) = (8*n-11-i^(2*n)+i^(1-n)-i^(1+n))/4 where i=sqrt(-1).
E.g.f.: (6 + sin(x) + (4*x - 5)*sinh(x) + (4*x - 6)*cosh(x))/2. - Ilya Gutkovskiy, Jun 01 2016
Sum_{n>=2} (-1)^n/a(n) = (3-sqrt(2))*Pi/16 + (8-sqrt(2))*log(2)/16 + sqrt(2)*log(2+sqrt(2))/8. - Amiram Eldar, Dec 20 2021
MAPLE
A047624:=n->(8*n-11-I^(2*n)+I^(1-n)-I^(1+n))/4: seq(A047624(n), n=1..100); # Wesley Ivan Hurt, Jun 01 2016
MATHEMATICA
Table[(8n-11-I^(2n)+I^(1-n)-I^(1+n))/4, {n, 80}] (* Wesley Ivan Hurt, Jun 01 2016 *)
LinearRecurrence[{1, 0, 0, 1, -1}, {0, 1, 3, 5, 8}, 100] (* G. C. Greubel, Jun 01 2016 *)
PROG
(Magma) [n : n in [0..150] | n mod 8 in [0, 1, 3, 5]]; // Wesley Ivan Hurt, Jun 01 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved