Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #31 Jan 19 2017 11:21:20
%S 1,21,52,172,268,428,588,812,1004,1324,1580,1900,2252,2668,2988,3532,
%T 3916,4460,5004,5548,6028,6764,7308,8044,8716,9548,10156,11116,11852,
%U 12620,13548,14444,15244,16524,17228,18380,19340,20588,21548
%N Number of 2 X 2 matrices with all terms in {-n,...,0,...,n} and (sum of terms) = permanent.
%C a(n) mod 4 = 0 for n > 1.
%H Indranil Ghosh, <a href="/A280914/b280914.txt">Table of n, a(n) for n = 0..168</a>
%e For n = 4, few of the possible matrices are [-4,-3,-2,3], [-4,-3,3,-1], [-4,-2,-3,3], [-4,-2,2,0], [-3,4,-1,-1], [-3,4,3,2], [-2,-4,0,2], [-2,-4,3,-3], [-1,4,1,0], [-1,4,3,3], [0,-4,0,4], [0,-4,1,-1], [0,-3,0,3], [1,2,3,0], [1,2,3,1], [1,2,3,2], [1,2,3,3], [1,2,3,4], [1,3,2,-4], [1,3,2,-3], [2,-1,0,1],... There are 268 possibilities.
%e Here each of the matrices M is defined as M = [a,b;c,d] where a = M[1][1], b = M[1][2], c = M[2][1] and d = M[2][2]. So, a(4) = 268.
%o (Python)
%o def t(n):
%o ....s=0
%o ....for a in range(-n,n+1):
%o ........for b in range(-n,n+1):
%o ............for c in range(-n,n+1):
%o ................for d in range(-n,n+1):
%o ....................if (a+b+c+d)==(a*d+b*c):
%o ........................s+=1
%o ....return s
%o for i in range(0,169):
%o ....print str(i)+" "+str(t(i))
%Y Cf. A280588, A280934, A281194.
%K nonn
%O 0,2
%A _Indranil Ghosh_, Jan 18 2017