login
A363092
a(n) = 4*a(n-1) - 8*a(n-2) with a(0) = a(1) = 1.
0
1, 1, -4, -24, -64, -64, 256, 1536, 4096, 4096, -16384, -98304, -262144, -262144, 1048576, 6291456, 16777216, 16777216, -67108864, -402653184, -1073741824, -1073741824, 4294967296, 25769803776, 68719476736, 68719476736, -274877906944, -1649267441664, -4398046511104
OFFSET
0,3
REFERENCES
Paul J. Nahin, An Imaginary Tale: The Story of sqrt(-1), Princeton University Press, Princeton, NJ. 1998, pp. 94-96.
FORMULA
a(n) = 2^(3*n/2-1)*(2*cos(n*Pi/4) - sin(n*Pi/4)).
O.g.f.: (1 - 3*x)/(1 - 4*x + 8*x^2).
E.g.f.: exp(2*x)*(2*cos(2*x) - sin(2*x))/2.
a(n+1) = a(n) iff n is a multiple of 4.
MATHEMATICA
LinearRecurrence[{4, -8}, {1, 1}, 29]
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Stefano Spezia, May 19 2023
STATUS
approved