A088138 Generalized Gaussian Fibonacci integers.
0, 1, 2, 0, -8, -16, 0, 64, 128, 0, -512, -1024, 0, 4096, 8192, 0, -32768, -65536, 0, 262144, 524288, 0, -2097152, -4194304, 0, 16777216, 33554432, 0, -134217728, -268435456, 0, 1073741824, 2147483648, 0, -8589934592, -17179869184, 0, 68719476736, 137438953472
Offset: 0
Links
- Robert Israel, Table of n, a(n) for n = 0..3300
- Beata Bajorska-Harapińska, Barbara Smoleń, and Roman Wituła, On Quaternion Equivalents for Quasi-Fibonacci Numbers, Shortly Quaternaccis, Advances in Applied Clifford Algebras (2019) Vol. 29, 54.
- Wikipedia, Lucas sequence
- Index entries for linear recurrences with constant coefficients, signature (2,-4).
- Index entries for Lucas sequences
Programs
-
GAP
a:=[0,1];; for n in [3..40] do a[n]:=2*a[n-1]-4*a[n-2]; od; a; # Muniru A Asiru, Oct 23 2018
-
Magma
I:=[0,1]; [n le 2 select I[n] else 2*Self(n-1) - 4*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 15 2018
-
Maple
M:= <<1+I,1+I>|
>: T:= <<-I/2,0>|<0,I/2>>: seq(LinearAlgebra:-Trace(T.M^n),n=0..100); # Robert Israel, Jan 28 2016 -
Mathematica
Join[{a=0,b=1},Table[c=2*b-4*a;a=b;b=c,{n,100}]] (* Vladimir Joseph Stephan Orlovsky, Jan 17 2011 *) LinearRecurrence[{2, -4}, {0, 1}, 40] (* Vincenzo Librandi, Jan 29 2016 *) Table[2^(n-2)*((-1)^Quotient[n-1,3]+(-1)^Quotient[n,3]), {n,0,40}] (*Federico Provvedi,Apr 24 2022*)
-
PARI
/* lists powers of any quaternion */ QuaternionToN(a,b,c,d,nmax) = {local (C);C = matrix(nmax+1,4);C[1,1]=1;for(n=2,nmax+1,C[n,1]=a*C[n-1,1]-b*C[n-1,2]-c*C[n-1,3]-d*C[n-1,4];C[n,2]=b*C[n-1,1]+a*C[n-1,2]+d*C[n-1,3]-c*C[n-1,4];C[n,3]=c*C[n-1,1]-d*C[n-1,2]+a*C[n-1,3]+b*C[n-1,4];C[n,4]=d*C[n-1,1]+c*C[n-1,2]-b*C[n-1,3]+a*C[n-1,4];);return (C);} /* Stanislav Sykora, Jun 11 2012 */
-
PARI
my(x='x+O('x^30)); concat([0], Vec(x/(1-2*x+4*x^2))) \\ G. C. Greubel, Oct 22 2018
-
PARI
a(n) = 2^(n-1)*polchebyshev(n-1, 2, 1/2); \\ Michel Marcus, May 02 2022
-
Sage
[lucas_number1(n,2,4) for n in range(0, 39)] # Zerinvary Lajos, Apr 23 2009
Formula
G.f.: x/(1-2*x+4*x^2).
E.g.f.: exp(x)*sin(sqrt(3)*x)/sqrt(3).
a(n) = 2*a(n-1) - 4*a(n-2), a(0)=0, a(1)=1.
a(n) = ((1+i*sqrt(3))^n - (1-i*sqrt(3))^n)/(2*i*sqrt(3)).
a(n) = Im( (1+i*sqrt(3))^n/sqrt(3) ).
a(n) = Sum_{k=0..floor(n/2)} C(n, 2*k+1)*(-3)^k.
From Paul Curtz, Oct 04 2009: (Start)
a(n) = a(n-1) + a(n-2) + 2*a(n-3).
a(n) = 2*a(n-1) - a(n-2) + 2*a(n-3).
a(n) = a(n-1) + 2*a(n-2) - a(n-3) - a(n-4). (End)
E.g.f.: exp(x)*sin(sqrt(3)*x)/sqrt(3) = G(0)*x^2 where G(k)= 1 + (3*k+2)/(2*x - 32*x^5/(16*x^4 - 3*(k+1)*(3*k+2)*(3*k+4)*(3*k+5)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jul 26 2012
G.f.: x/(1-2*x+4*x^2) = 2*x^2*G(0) where G(k)= 1 + 1/(2*x - 32*x^5/(16*x^4 - 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jul 27 2012
a(n) = -2^(n-1)*Product_{k=1..n}(1 + 2*cos(k*Pi/n)) for n >= 1. - Peter Luschny, Nov 28 2019
a(n) = 2^(n-1) * U(n-1, 1/2), where U(n, x) is the Chebyshev polynomial of the second kind. - Federico Provvedi, Apr 24 2022
Comments