OFFSET
1,1
COMMENTS
This sequence counts all prime Lipschitz quaternions having a given norm; A239394 counts only the prime nonnegative Lipschitz quaternions.
LINKS
Wikipedia, Hurwitz quaternion
FORMULA
a(n) = 8 * (prime(n) + 1) = 8 * A008864(n).
MATHEMATICA
(* first << Quaternions` *)
mx = 17; lst = Flatten[Table[{a, b, c, d}, {a, -mx, mx}, {b, -mx, mx}, {c, -mx, mx}, {d, -mx, mx}], 3]; q = Select[lst, Norm[Quaternion @@ #] < mx^2 && PrimeQ[Quaternion @@ #, Quaternions -> True] &]; q2 = Sort[q, Norm[#1] < Norm[#2] &]; Take[Transpose[Tally[(Norm /@ q2)^2]][[2]], mx]
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Apr 01 2014
STATUS
approved