OFFSET
1,2
COMMENTS
By Gaussian integers, we mean complex numbers of the form a + bi, where both a and b are integers in Z, i = sqrt(-1). Thus the quadratic integer ring under consideration here is Z[i].
FORMULA
a(n) +(2*n+3)*(n-2)*a(n-1) +n*(n+1)*(n^2-4*n+8)*a(n-2) -2*(n^2-4*n+8)*(n^2-4*n+5)*a(n-3)=0. - R. J. Mathar, Feb 08 2014
EXAMPLE
For n = 2, we have (1 + i)(1 + 2i)(2 + i)(2 + 2i) which gives -20 + 0i, so a(2) = -20.
MATHEMATICA
Table[Re[Times@@Flatten[Table[a + b I, {a, 2}, {b, n}]]], {n, 20}] (* Alonso del Arte, Feb 02 2014 *)
PROG
(JavaScript)
function cNumber(x, y) {
return [x, y];
}
function cMult(a, b) {
return [a[0] * b[0] - a[1] * b[1], a[0] * b[1] + a[1] * b[0]];
}
for (i = 1; i < 20; i++) {
c = cNumber(1, 0);
for (j = 1; j <= 2; j++)
for (k = 1; k <= i; k++)
c = cMult(c, cNumber(j, k));
document.write(c[0] + ", ");
}
(PARI) a(n) = real(prod(i=1, 2, prod(j=1, n, i+I*j))); \\ Michel Marcus, Feb 03 2014
CROSSREFS
KEYWORD
sign
AUTHOR
Jon Perry, Feb 02 2014
STATUS
approved