OFFSET
0,4
COMMENTS
The symbol '*' in the name refers to the noncommutative multiplication in Hamilton's division algebra. Traditionally Q(a, b, c, d) is written a + b*i + c*j + d*k.
LINKS
Peter Luschny, Rows 0..45, flattened
Wikipedia, Quaternion
EXAMPLE
The list of polynomials starts 1, 1 + x, -2 + 2*x + x^2, -8 - 6*x + 3*x^2 + x^3, ... and the list of coefficients of the polynomials starts:
{ 1},
{ 1, 1},
{ -2, 2, 1},
{ -8, -6, 3, 1},
{ -8, -32, -12, 4, 1},
{ 16, -40, -80, -20, 5, 1},
{ 64, 96, -120, -160, -30, 6, 1},
{ 64, 448, 336, -280, -280, -42, 7, 1},
{-128, 512, 1792, 896, -560, -448, -56, 8, 1},
{-512, -1152, 2304, 5376, 2016, -1008, -672, -72, 9, 1},
{-512, -5120, -5760, 7680, 13440, 4032, -1680, -960, -90, 10, 1}.
MATHEMATICA
Needs["Quaternions`"]
P[x_, 0 ] := Quaternion[1, 0, 0, 0];
P[x_, n_] := P[x, n] = Quaternion[x + 1, 1, 1, 1] ** P[x, n - 1];
Table[CoefficientList[P[x, n][[1]], x], {n, 0, 10}] // Flatten
PROG
(Sage)
R.<x> = QQ[]
K = R.fraction_field()
H.<i, j, k> = QuaternionAlgebra(K, -1, -1)
def Q(a, b, c, d): return H(a + b*i + c*j + d*k)
@cached_function
def P(n):
return Q(x+1, 1, 1, 1)*P(n-1) if n > 0 else Q(1, 0, 0, 0)
def p(n): return P(n)[0].numerator().list()
flatten([p(n) for n in (0..10)]) # Kudos to William Stein, Peter Luschny, Sep 14 2018
CROSSREFS
KEYWORD
tabl,sign
AUTHOR
EXTENSIONS
Edited by Peter Luschny, Sep 14 2018
STATUS
approved