A266046 Real part of Q^n, where Q is the quaternion 2 + j + k.
1, 2, 2, -4, -28, -88, -184, -208, 272, 2336, 7712, 16832, 21056, -16768, -193408, -673024, -1531648, -2088448, 836096, 15875072, 58483712, 138684416, 203835392, -16764928, -1290072064, -5059698688, -12498362368, -19635257344, -3550855168, 103608123392
Offset: 0
Links
- Stanislav Sykora, Table of n, a(n) for n = 0..1000
- Beata Bajorska-Harapińska, Barbara Smoleń, Roman Wituła, On Quaternion Equivalents for Quasi-Fibonacci Numbers, Shortly Quaternaccis, Advances in Applied Clifford Algebras Vol. 29, No. 3 (2019), Article 54.
- Index entries for linear recurrences with constant coefficients, signature (4,-6).
Programs
-
Magma
[n le 2 select n else 4*Self(n-1)-6*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Dec 22 2015
-
Mathematica
LinearRecurrence[{4, -6}, {1, 2}, 30] (* Bruno Berselli, Dec 22 2015 *)
-
PARI
\\ A simple function to generate quaternion powers: QuaternionToN(r, u, v, w, nmax) = {local (M); M = matrix(nmax+1, 4); M[1, 1]=1; for(n=2, nmax+1, M[n, 1]=r*M[n-1, 1]-u*M[n-1, 2]-v*M[n-1, 3]-w*M[n-1, 4]; M[n, 2]=u*M[n-1, 1]+r*M[n-1, 2]+w*M[n-1, 3]-v*M[n-1, 4]; M[n, 3]=v*M[n-1, 1]-w*M[n-1, 2]+r*M[n-1, 3]+u*M[n-1, 4]; M[n, 4]=w*M[n-1, 1]+v*M[n-1, 2]-u*M[n-1, 3]+r*M[n-1, 4]; ); return (M); } a=QuaternionToN(2, 0, 1, 1, 1000)[,1]; \\ Select the real parts
-
PARI
Vec((1-2*x)/(1-4*x+6*x^2) + O(x^40)) \\ Colin Barker, Dec 21 2015
Formula
a(n)^2 + 2*A190965(n)^2 = 6^n.
From Colin Barker, Dec 21 2015: (Start)
a(n) = ((2-i*sqrt(2))^n+(2+i*sqrt(2))^n)/2, where i=sqrt(-1).
a(n) = 4*a(n-1) - 6*a(n-2) for n>1.
G.f.: (1-2*x) / (1-4*x+6*x^2). (End)
Comments