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.

A345754 Number of 2 X 2 matrices over Z_n whose permanent equals their determinant.

This page as a plain text file.
%I A345754 #72 Dec 06 2022 07:57:21
%S A345754 1,16,45,192,225,720,637,2048,1701,3600,2541,8640,4225,10192,10125,
%T A345754 20480,9537,27216,13357,43200,28665,40656,23805,92160,40625,67600,
%U A345754 59049,122304,47937,162000,58621,196608,114345,152592,143325,326592,99937,213712,190125
%N A345754 Number of 2 X 2 matrices over Z_n whose permanent equals their determinant.
%H A345754 Amiram Eldar, <a href="/A345754/b345754.txt">Table of n, a(n) for n = 1..10000</a>
%F A345754 a(n) =  A344372(n) * n^2 (conjectured).
%F A345754 From _Sebastian Karlsson_, Aug 31 2021: (Start)
%F A345754 The formula is correct. Proof:
%F A345754 Let A = ([a, b], [c, d]) be an arbitrary 2 X 2 matrix over Z_n. So det(A) = a*d - b*c and perm(A) = a*d + b*c. Then, det(A) = perm(A) iff -b*c = b*c, i.e., 2*b*c = 0.
%F A345754 Suppose first that n is odd. Then 2*b*c = 0 iff b*c = 0. The number of solutions to this equation over Z_n is A018804(n). Furthermore, the value of a and b in A can be anything, so there are n possible choices for a and n possible choices for b. Thus, there are n*n*A018804(n) = n^2 * A344372(n) matrices A over Z_n such that det(A) = perm(A).
%F A345754 Suppose now that n is even. Then 2*b*c = 0 in Z_n iff b'*c' = 0 in Z_{n/2}, where b' and c' are b and c reduced modulo n/2. The latter equation has A018804(n/2) distinct solutions in Z_{n/2}. As the preimage of both b' and c' contains precisely 2 elements each, the number of solutions to 2*b*c = 0 in Z_n is 2*2*A018804(n/2). Hence, a(n) = n*n*4*A018804(n/2) = n^2 * A344372(n). Q.E.D.
%F A345754 The formula implies that the sequence is multiplicative with a(2^e) = (e+1)*8^e, a(p^e) = p^(3*e-1)*((p-1)*e+p) for odd primes p. (End)
%t A345754 a[n_] := a[n] =  Sum[If[Mod[Permanent[{{a, b}, {c, d}}] - Det[{{a, b}, {c, d}}],n] == 0, 1, 0], {a, 0, n - 1}, {b, 0, n - 1}, {c, 0, n - 1}, {d,0, n - 1}] ; Array[a,22]
%t A345754 f[p_, e_] := p^(3*e - 1)*((p - 1)*e + p); f[2, e_] := (e + 1)*8^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 50] (* _Amiram Eldar_, Dec 06 2022 *)
%Y A345754 Cf. A020478, A344372.
%Y A345754 Cf. A018804.
%K A345754 nonn,mult
%O A345754 1,2
%A A345754 _José María Grau Ribas_, Jul 19 2021