OFFSET
0,2
COMMENTS
In general, given a quaternion Q = r+u*i+v*j+w*k with integer coefficients [r,u,v,w], its powers Q^n = R(n)+U(n)*i+V(n)*j+W(n)*k define four integer sequences R(n),U(n),V(n),W(n). The process can be also transcribed as a four-term, first order recurrence for the elements of the four sequences. Since |Q^n| = |Q|^n, we have, for any n, R(n)^2+U(n)^2+V(n)^2+W(n)^2 = (L^2)^n, where L^2 = r^2+u^2+v^2+w^2 is a constant. The normalized sequence Q^n/L^n describes a unitary quaternion undergoing stepwise rotations by the angle phi = arctan(sqrt(u^2+v^2+w^2)/r). Consequently, the four sequences exhibit sign changes with the mean period of P = 2*Pi/phi steps.
When Q has a symmetry with respect to permutations and/or inversions of the imaginary axes, the four sequences become even more interdependent.
In this particular case Q = 2+j+k, and Q^n = a(n)+b(n)*(j+k), where b(n) is the sequence A190965. The first-order recurrence reduces to two-terms, namely a(n+1)=2*a(n)-2*b(n), b(n+1)=2*b(n)+a(n). This implies further a single-term, second order recurrence a(n+2)=4*a(n+1)-6*a(n), shared by both a(n) and b(n), but with different starting terms. The mean period of sign changes is P = 10.208598624... steps.
The following OEIS sequences can be also cast as quaternion powers:
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).
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)
MATHEMATICA
LinearRecurrence[{4, -6}, {1, 2}, 30] (* Bruno Berselli, Dec 22 2015 *)
PROG
(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
(Magma) [n le 2 select n else 4*Self(n-1)-6*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Dec 22 2015
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Stanislav Sykora, Dec 20 2015
STATUS
approved