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.

A115076 Number of 2 X 2 symmetric matrices over Z(n) having determinant 1.

This page as a plain text file.
%I A115076 #15 Aug 28 2023 08:23:06
%S A115076 1,4,6,12,30,24,42,48,54,120,110,72,182,168,180,192,306,216,342,360,
%T A115076 252,440,506,288,750,728,486,504,870,720,930,768,660,1224,1260,648,
%U A115076 1406,1368,1092,1440,1722,1008,1806,1320,1620,2024,2162,1152,2058,3000
%N A115076 Number of 2 X 2 symmetric matrices over Z(n) having determinant 1.
%C A115076 a(1)=1 because the matrix of all zeros has determinant 0, but 0=1 (mod 1).
%H A115076 Andrew Howroyd, <a href="/A115076/b115076.txt">Table of n, a(n) for n = 1..2500</a>
%F A115076 Multiplicative with a(2^1) = 4, a(2^e) = 3*2^(2*e-2) for e > 1, a(p^e) = (p+1)*p^(2*e-1) for p mod 4 == 1, a(p^e) = (p-1)*p^(2*e-1) for p mod 4 == 3. - _Andrew Howroyd_, Jul 04 2018
%F A115076 Sum_{k=1..n} a(k) ~ c * n^3, where c = (5/(2*Pi^2)) * A175647 * A243380 = 0.282098596071... . - _Amiram Eldar_, Aug 28 2023
%t A115076 Table[cnt=0; Do[m={{a, b}, {b, c}}; If[Det[m, Modulus->n]==1, cnt++ ], {a, 0, n-1}, {b, 0, n-1}, {c, 0, n-1}]; cnt, {n, 50}]
%t A115076 f[p_, e_] := If[Mod[p, 4] == 1, (p+1)*p^(2*e-1), (p-1)*p^(2*e-1)]; f[2, 1] = 4; f[2, e_] := 3*2^(2*e-2); a[n_] := Times @@ f @@@ FactorInteger[n]; a[1] = 1; Array[a, 100] (* _Amiram Eldar_, Aug 28 2023 *)
%o A115076 (PARI) a(n)={my(v=vector(n)); for(i=0, n-1, for(j=0, n-1, v[i*j%n+1]++)); sum(i=0, n-1, v[(i^2+1)%n+1])} \\ _Andrew Howroyd_, Jul 04 2018
%o A115076 (PARI) a(n)={my(f=factor(n)); prod(i=1, #f~, my(p=f[i,1], e=f[i,2]); p^(2*e-1)*if(p==2, if(e==1, 2, 3/2), if(p%4==1, p+1, p-1)))} \\ _Andrew Howroyd_, Jul 04 2018
%Y A115076 Cf. A000056 (order of the group SL(2, Z_n)), A175647, A243380.
%K A115076 mult,nonn,easy
%O A115076 1,2
%A A115076 _T. D. Noe_, Jan 12 2006