|
|
A234459
|
|
Real part of the product of all the integer complex numbers in the square [1,1] to [n,n].
|
|
4
|
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
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, n}, {b, n}]]], {n, 20}] (* Alonso del Arte, Feb 04 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 < 10; i++) {
c = cNumber(1, 0);
for (j = 1; j <= i; j++)
for (k = 1; k <= i; k++)
c = cMult(c, cNumber(j, k));
document.write(c + "<br>");
}
(PARI) a(n) = real(prod(i=1, n, prod(j=1, n, i+I*j))); \\ Michel Marcus, Dec 27 2013
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|