cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A145676 Number of n X n {0,-1,1}-matrices A such that permanent( |A| ) = det A, where |A| is obtained from A by taking the absolute value of each entry.

Original entry on oeis.org

1, 2, 49, 8419, 9162049
Offset: 0

Views

Author

Eric W. Weisstein, Mar 26 2009

Keywords

Examples

			Here are the 2 for the 1 X 1 case:
{{{0}}, {{1}}}
and the 49 for the 2 X 2 case:
{{{-1, -1}, {0, -1}}, {{-1, -1}, {0, 0}}, {{-1, -1}, {1, -1}}, {{-1, -1}, {1, 0}},
{{-1, 0}, {-1, -1}}, {{-1, 0}, {-1, 0}}, {{-1, 0}, {0, -1}}, {{-1, 0}, {0, 0}},
{{-1, 0}, {1, -1}}, {{-1, 0}, {1, 0}}, {{-1, 1}, {-1, -1}}, {{-1, 1}, {-1, 0}},
{{-1, 1}, {0, -1}}, {{-1, 1}, {0, 0}}, {{0, -1}, {0, -1}}, {{0, -1}, {0, 0}},
{{0, -1}, {0, 1}}, {{0, -1}, {1, -1}}, {{0, -1}, {1, 0}}, {{0, -1}, {1, 1}},
{{0, 0}, {-1, -1}}, {{0, 0}, {-1, 0}}, {{0, 0}, {-1, 1}}, {{0, 0}, {0, -1}},
{{0, 0}, {0, 0}}, {{0, 0}, {0, 1}}, {{0, 0}, {1, -1}}, {{0, 0}, {1, 0}},
{{0, 0}, {1, 1}}, {{0, 1}, {-1, -1}}, {{0, 1}, {-1, 0}}, {{0, 1}, {-1, 1}},
{{0, 1}, {0, -1}}, {{0, 1}, {0, 0}}, {{0, 1}, {0, 1}}, {{1, -1}, {0, 0}},
{{1, -1}, {0, 1}}, {{1, -1}, {1, 0}}, {{1, -1}, {1, 1}}, {{1, 0}, {-1, 0}},
{{1, 0}, {-1, 1}}, {{1, 0}, {0, 0}}, {{1, 0}, {0, 1}}, {{1, 0}, {1, 0}},
{{1, 0}, {1, 1}}, {{1, 1}, {-1, 0}}, {{1, 1}, {-1, 1}}, {{1, 1}, {0, 0}}, {{1, 1}, {0, 1}}}
		

Crossrefs

Cf. A145675.

Extensions

a(4) from Eric W. Weisstein, Mar 27 2009

A192892 Number of n X n binary matrices whose determinants equal their permanents.

Original entry on oeis.org

1, 2, 12, 343, 34997, 12515441, 15749457081, 72424550598849, 1282759836215548737
Offset: 0

Views

Author

John M. Campbell, Jul 11 2011

Keywords

Comments

Lower bounded by A088672.
Similar to A145675 and A145676.

Examples

			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|
		

Crossrefs

Programs

  • 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}]
  • 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

Formula

a(n) <= 2^(n^2), with equality for n<=1.

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
Showing 1-2 of 2 results.