login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A153265
a(n) = (-2*I)^n + (2*I)^n + (1/2 + 1/2*I*sqrt(3))^n + (1/2 - 1/2*I*sqrt(3))^n.
3
4, 1, -9, -2, 31, 1, -126, 1, 511, -2, -2049, 1, 8194, 1, -32769, -2, 131071, 1, -524286, 1, 2097151, -2, -8388609, 1, 33554434, 1, -134217729, -2, 536870911, 1, -2147483646, 1, 8589934591, -2, -34359738369, 1
OFFSET
0,1
COMMENTS
For all n there is an m such that: ||a(n)| - 2^m| <= 2. In the Python program which will be provided, the sequence (a(n)) is given by 4tesseq(X) where X = 1.5'i + .25(ii + jj + kk + ee) is the generating floretion.
FORMULA
a(n) = a(n-1) - 5a(n-2) + 4a(n-3) - 4a(n-4).
G.f.: 4 + x*(1-10*x+12*x^2-16*x^3)/((x^2-x+1)*(4*x^2+1)). - corrected by Vaclav Kotesovec, Jun 25 2014
EXAMPLE
a(4) = 32 + (1/2 + 1/2*I*sqrt(3))^4 + (1/2 - 1/2*I*sqrt(3))^4 = 31 -or- a(4) = a(n-1) - 5a(n-2) + 4a(n-3) - 4a(n-4) = -2 - 5*(-9) + 4*(1) - 4*4 = 31
MAPLE
a := n-> (2*I)^n+(-2*I)^n+(1/2+1/2*I*sqrt(3))^n+(1/2-1/2*I*sqrt(3))^n;
MATHEMATICA
CoefficientList[Series[4 + x (1 - 10 x + 12 x^2 - 16 x^3)/((x^2 - x + 1) (4 x^2 + 1)), {x, 0, 100}], x] (* Vincenzo Librandi, Jun 26 2014 *)
PROG
(PARI) a(n)=2*(n%2<1)*(-4)^(n\2)+3*(n%3<1)*(-1)^(n\3)-(-1)^n \\ Tani Akinari, Jun 25 2014
(Magma) I:=[4, 1, -9, -2]; [n le 4 select I[n] else Self(n-1)-5*Self(n-2)+4*Self(n-3) -4*Self(n-4): n in [1..50]]; // Vincenzo Librandi, Jun 26 2014
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Creighton Dement, Dec 22 2008, Dec 31 2008
STATUS
approved