login
A073845
a(1)=a(2)=1, a(n+2)=a(n+1)+a(n)+(-2)^n.
0
1, 1, 0, 5, -3, 18, -17, 65, -80, 241, -351, 914, -1485, 3525, -6152, 13757, -25163, 54130, -102105, 214169, -412224, 850521, -1658855, 3385970, -6661493, 13501693, -26714232, 53896325, -107035635, 215296146, -428610401, 860427569, -1715666480, 3439728385, -6865872687
OFFSET
1,4
FORMULA
For n>3, a(n) = (-1)^n*floor{(1/5)*( 2^n + (2*sqrt(5)-3)*(-phi)^n) } where phi is the golden ratio = (1+sqrt(5))/2
a(1)=1, a(2)=1, a(3)=0, a(n)=a(n-1)+3*a(n-2)+2*a (n-3). - Harvey P. Dale, Oct 15 2015
G.f.: x*(-1-2*x+2*x^2) / ( (2*x+1)*(x^2+x-1) ). - R. J. Mathar, Nov 07 2015
MATHEMATICA
RecurrenceTable[{a[1]==a[2]==1, a[n+2]==a[n+1]+a[n]+(-2)^n}, a, {n, 40}] (* or *) LinearRecurrence[{-1, 3, 2}, {1, 1, 0}, 40] (* Harvey P. Dale, Oct 15 2015 *)
CROSSREFS
Sequence in context: A363686 A075453 A349118 * A169697 A092525 A101367
KEYWORD
sign,easy
AUTHOR
Benoit Cloitre, Sep 02 2002
STATUS
approved