OFFSET
0,3
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,-2,2).
FORMULA
a(n) = (1/2)*(1 - (-1)^n - (1-i)^(n+1) - (1+i)^(n+1)), with i=sqrt(-1). - Ralf Stephan, Nov 16 2010
From G. C. Greubel, Sep 08 2021: (Start)
a(n) = (1-(-1)^n)/2 - 2^((n+1)/2)*cos((n+1)*Pi/4).
E.g.f.: sinh(x) - exp(x)*(cos(x) - sin(x)). (End)
MATHEMATICA
CoefficientList[Series[(1-3x+x^2)/((1-x)(1+x)(1-2x+2x^2)), {x, 0, 60}], x] (* Harvey P. Dale, Mar 20 2013 *)
PROG
(Magma) R<x>:=PowerSeriesRing(Integers(), 50); Coefficients(R!( (1-3*x+x^2)/((1-x^2)*(1-2*x+2*x^2)) )); // G. C. Greubel, Sep 08 2021
(SageMath)
def A106664_list(prec):
P.<x> = PowerSeriesRing(QQ, prec)
return P( sinh(x) -exp(x)*(cos(x)-sin(x)) ).egf_to_ogf().list()
A106664_list(50) # G. C. Greubel, Sep 08 2021
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Creighton Dement, May 13 2005
STATUS
approved