login
a(n) is the number of 2 X 2 matrices over the integers mod n that are invertible mod n for every permutation of their elements.
1

%I #17 Jan 20 2024 03:15:22

%S 4,40,64,400,160,1704,1024,3240,1600,11560,2560,23280,6816,16000,

%T 16384,71104,12960,112680,25600,68160,46240,247720,40960,250000,93120,

%U 262440,109056,641200,64000,842280,262144,462400,284416,681600,207360,1733904,450720,931200,409600,2633440,272640,3196200,739840

%N a(n) is the number of 2 X 2 matrices over the integers mod n that are invertible mod n for every permutation of their elements.

%C a(n) is the number of 4-tuples [a,b,c,d] of integers in [0,1,...,n-1] such that a*b-c*d, a*c-b*d and a*d-b*c are all coprime to n.

%H Robert Israel, <a href="/A367926/b367926.txt">Table of n, a(n) for n = 2..10000</a>

%H MathOverflow, <a href="https://mathoverflow.net/questions/459301/matrices-over-mathbbf-p-that-have-nonzero-determinant-under-any-element-per/459338#459338">Matrices over F_p that have nonzero determinant under any element permutation</a>.

%F Multiplicative with a(p^k) = p^(4*(k-1)) * (p^4 - 3*p^3 + 9*p^2 - 17*p + 10) for primes p.

%F Sum_{k=1..n} a(k) ~ c * n^5 / 5, where c = Product_{p prime} (1 - 3/p^2 + 9/p^3 - 17/p^4 + 10/p^5) = 0.42729799106430918317... . - _Amiram Eldar_, Jan 20 2024

%e a(3) = 40 because the 4-tuples [0, 1, 1, 1], [0, 1, 1, 2], [1, 1, 1, 2], [0, 1, 2, 2], [0, 2, 2, 2], [1, 2, 2, 2] and their permutations satisfy the criterion for n = 4. Of these, [0,1,1,2] and [0,1,2,2] each have 12 permutations and the others have 4, so a(3) = 2 * 12 + 4 * 4 = 40.

%p filter:= proc(L,n)

%p andmap(t -> igcd(t,n)=1, {L[1]*L[2]-L[3]*L[4],L[1]*L[3]-L[2]*L[4], L[1]*L[4]-L[2]*L[3]})

%p end proc:

%p g:= proc(n) local a,b,c,d,t; option remember;

%p t:= 0;

%p for a from 0 to n-1 do

%p for b from 0 to a do

%p for c from 0 to b do

%p for d from 0 to c do

%p if filter([a,b,c,d],n) then t:= t + combinat:-numbperm([a,b,c,d]) fi

%p od od od od;

%p t

%p end proc:

%p f:= proc(n) local F,t;

%p F:= ifactors(n)[2];

%p mul(g(t[1]^t[2]),t=F)

%p end proc:

%p map(f, [$2..50]);

%t f[p_, e_] := p^(4*(e - 1))*(p^4 - 3*p^3 + 9*p^2 - 17*p + 10); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100, 2] (* _Amiram Eldar_, Jan 20 2024 *)

%o (PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, p=f[i,1]; e=f[i,2]; p^(4*(e-1)) * (p^4 - 3*p^3 + 9*p^2 - 17*p + 10));} \\ _Amiram Eldar_, Jan 20 2024

%K nonn,mult

%O 2,1

%A _Robert Israel_, Dec 05 2023