|
|
A278846
|
|
Number of unimodular 2 X 2 matrices having entries in {0,1,...,n} with no entry repeated.
|
|
2
|
|
|
0, 0, 0, 0, 0, 8, 8, 40, 48, 80, 88, 152, 160, 232, 264, 304, 344, 448, 480, 608, 648, 720, 784, 944, 968, 1104, 1176, 1304, 1376, 1576, 1616, 1840, 1944, 2080, 2184, 2352, 2424, 2688, 2816, 2984, 3072, 3368, 3440, 3760, 3896, 4064, 4224, 4576, 4664, 4984, 5120
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,6
|
|
COMMENTS
|
a(n) mod 8 = 0.
|
|
LINKS
|
|
|
MAPLE
|
df:= proc(n) local count, c, d, q, av, bc, a, b;
count:= 0:
for d from 1 to n-1 do
av:= {$1..n-1} minus {d};
for q in [-1, 1] do
bc:= n*d+q;
for b in numtheory:-divisors(bc) intersect av do
c:= bc/b;
if c < b and member(c, av) then count:=count+8 fi;
od od od;
count
end proc:
ListTools:-PartialSums(map(df, [$0..100])); # Robert Israel, Nov 29 2016
|
|
MATHEMATICA
|
df[n_] := Module[{count = 0, c, d, q, av, bc, a, b}, Do[av = Range[n - 1] ~Complement~ {d}; Do[bc = n d + q; Do[c = bc/b; If[c < b && MemberQ[av, c], count += 8], {b, Divisors[bc] ~Intersection~ av}], {q, {-1 , 1}}], {d, 1, n - 1}]; count];
|
|
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 abs(a*d-b*c)==1:
s+=1
return s
for i in range(0, 242):
|
|
CROSSREFS
|
Cf. A210000 (where the matrix entries can be repeated).
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|