OFFSET
0,2
LINKS
Christopher Culter, C++ code to compute large terms
Math StackExchange, What is the number of n X n binary matrices A such that det(A)=perm(A)?
FORMULA
a(n) <= 2^(n^2), with equality for n<=1.
EXAMPLE
a(2) equals 12 because there are exactly twelve 2 X 2 binary matrices whose determinants equal their permanents; these matrices are:
|0 0| |1 0| |0 1| |1 1| |0 0| |1 0| |0 0| |1 0|
|0 0| |0 0| |0 0| |0 0| |1 0| |1 0| |0 1| |0 1|
.
|0 1| |1 1| |0 0| |1 0|
|0 1| |0 1| |1 1| |1 1|
MATHEMATICA
Sum[KroneckerDelta[Det[Array[Mod[Floor[k/(2^(n*(#1 - 1) + #2 - 1))], 2] &, {n, n}]], Permanent[Array[Mod[Floor[k/(2^(n*(#1 - 1) + #2 - 1))], 2] &, {n, n}]]], {k, 0, (2^(n^2)) - 1}]
PROG
(Python)
from itertools import product
from sympy import Matrix
def A192892(n): return 1 if n == 0 else sum(1 for m in product([0, 1], repeat=n**2) if (lambda x:x.det()==x.per())(Matrix(n, n, m))) # Chai Wah Wu, Oct 01 2021
CROSSREFS
KEYWORD
hard,more,nonn,nice
AUTHOR
John M. Campbell, Jul 11 2011
EXTENSIONS
a(0)=1 prepended and a(5)-a(8) from Christopher Culter, Apr 13 2016
Definition and example slightly modified by Harvey P. Dale, Feb 24 2017
STATUS
approved