OFFSET
0,2
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 0..105
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,-1).
FORMULA
G.f.: d/dx arctan(A000045(x)) = d/dx arctan(x/(1-x-x^2)).
a(n) = (n+1) * sum(k=1..n+1, sum(i=ceiling((n-k+1)/2)..n-k+1, binomial(i,n-k-i+1) * binomial(k+i-1, k-1)) * (1-(-1)^k) / (2*k)*(-1)^((k-1)/2)).
a(n) = (tau^(n+1) - (-tau)^(-n-1))*sin(theta*(n+1)), where phi=(1+sqrt(5))/2, tau=sqrt(phi+sqrt(phi)), theta=arctan(phi^(-3/2)). - Vladimir Reshetnikov, Oct 04 2016
MATHEMATICA
Im[LucasL[Range[20], 1 + I]] (* Vladimir Reshetnikov, Oct 04 2016 *)
LinearRecurrence[{2, 0, -2, -1}, {1, 2, 5, 8}, 40] (* Harvey P. Dale, Mar 31 2019 *)
PROG
(Maxima)
a(n):= (n+1)*sum(sum(binomial(i, n-k-i+1)*binomial(k+i-1, k-1), i, ceiling((n-k+1)/2), n-k+1)*(1-(-1)^k)/(2*k)*(-1)^((k-1)/2), k, 1, n+1);
(PARI) Vec((x^2+1)/(x^4+2*x^3-2*x+1) + O(x^50)) \\ Michel Marcus, Oct 05 2016
CROSSREFS
KEYWORD
sign
AUTHOR
Vladimir Kruchinin, Apr 10 2011
STATUS
approved