OFFSET
0,4
COMMENTS
a(n) mod 8 = 0.
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..150
MAPLE
f:= proc(n) local C;
C:= combinat:-choose([$0..n], 4);
C:= map(t -> (t[1]*t[2]-t[3]*t[4], t[1]*t[3]-t[2]*t[4], t[1]*t[4]-t[2]*t[3]), C);
8*nops(select(t -> abs(t)<=n, C))
end proc:
map(f, [$0..40]); # Robert Israel, Dec 05 2016
PROG
(Python)
def t(n):
s=0
for a in range(0, n+1):
for b in range(0, n+1):
for c in range(0, n+1):
for d in range(0, 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) in range(-n, n+1):
s+=1
return s
for i in range(0, 151):
print str(i)+" "+str(t(i))
CROSSREFS
KEYWORD
nonn
AUTHOR
Indranil Ghosh, Dec 05 2016
STATUS
approved