login
A279018
Number of 2 X 2 matrices having entries in {-n,...,0,..,n} and permanent=trace with no entry repeated.
2
0, 0, 8, 24, 56, 100, 156, 236, 320, 408, 540, 692, 844, 1044, 1228, 1368, 1592, 1884, 2180, 2500, 2764, 2996, 3356, 3756, 4080, 4456, 4884, 5276, 5740, 6252, 6740, 7316, 7868, 8340, 8860, 9352, 9896, 10628, 11324
OFFSET
0,3
LINKS
MATHEMATICA
f[n_] := f[n] = Block[{a, b, c, d, s = 0}, a = -n; While[a < n +1, b = -n; While[b < n +1, c = -n; While[c < n +1, d = -n; While[d < n +1, If[ a != b && a != c && a != d && b != c && b != d && c != d && a*d + b*c == a + d, s++]; d++]; c++]; b++]; a++]; s]; Array[f, 40, 0] (* Robert G. Wilson v, Dec 03 2016 *)
PROG
(Python)
def t(n):
s=0
for a in range(-n, n+1):
for b in range(-n, n+1):
for c in range(-n, n+1):
for d in range(-n, n+1):
if (a!=b and a!=d and b!=d and c!=a and c!=b and c!=d):
if (a*d+b*c)==a+d:
s+=1
return s
for i in range(0, 151):
print str(i)+" "+str(t(i))
CROSSREFS
Cf. A211145 (wherein the entries can be repeated).
Sequence in context: A212972 A316541 A152134 * A011925 A256052 A159741
KEYWORD
nonn
AUTHOR
Indranil Ghosh, Dec 03 2016
STATUS
approved