%I #67 Feb 10 2024 18:53:11
%S 1,3,3,6,3,9,3,10,5,9,3,18,3,9,9,14,3,15,3,18,9,9,3,30,5,9,7,18,3,27,
%T 3,18,9,9,9,30,3,9,9,30,3,27,3,18,15,9,3,42,5,15,9,18,3,21,9,30,9,9,3,
%U 54,3,9,15,22,9,27,3,18,9,27,3,50,3,9,15,18,9,27
%N Number of unitary rings with additive group (Z/nZ)^2. Equivalently, number of unitary commutative rings with additive group (Z/nZ)^2.
%C Equivalently, a(n) is the number of nonisomorphic unitary rings whose rank is 2 when viewed as a free module over the ring (Z_n, +, *). - _Jianing Song_, Feb 23 2021
%C Every unitary ring with additive group (Z/nZ)^2 must be commutative, and is of the form Z_n[x]/(x^2 + b*x + c) for some b, c in Z_n, where (x^2 + b*x + c) stands for the ideal of Z_n[x] generated by x^2 + b*x + c. Proof: Let R be a unitary commutative ring with additive group (Z/nZ)^2. Suppose e is the identity element of R, x is an element such that {e, x} is a basis for R as a free module over Z_n (such a basis must exist, see my note in the link section), then every element can be written as the form u*x + v*e for 0 <= u, v <= n-1. If x^2 = -p*x - q*e, it turns out that R is isomorphic to Z_n[x]/(x^2 + [p]*x + [q]). - _Jianing Song_, Apr 23 2021
%C Equivalently, a(n) is the number of nonisomorphic rings of the form Z[x]/(n, x^2 + p*x + q), where (n, x^2 + p*x + q) is the ideal of Z[x] generated by n and x^2 + p*x + q. - _Jianing Song_, Feb 15 2021
%C Theorem. R_1 = Z_n[x]/(x^2 + b*x + c) and R_2 = Z_n[y]/(y^2 + b'*y + c') are isomorphic if and only if there exists some k in Z, t in Z_n such that gcd(k, n) = 1 and that b' == b*k + 2*t (mod n), c' == t^2 + b*k*t + c*k^2 (mod n).
%C Proof: "<=": Note that y^2 + (b*k + 2*t)*y + (t^2 + b*k*t + c*k^2) = (y + t)^2 + b*k*(y + t) + c*k^2, so a mapping from R_1 to R_2 is given by f(x) = (y + t)/k and f(r*x + s) = r*f(x) + s. Since gcd(k, n) = 1, f is an isomorphic mapping.
%C "=>": If R_1 and R_2 are isomorphic, there exists some isomorphic mapping from R_2 to R_1 such that f(y) = k*x - t. If gcd(k, n) > 1, since f(r*y + s) = r*f(y) + s = r*(k*x - t), there is no element in R_2 such that f(y) = x, a contradiction. So this isomorphic mapping sends x in R_1 to (y + t)/k, then (y + t)^2 + b*k*(y + t) + c*k^2 = 0. The corresponding coefficients must be equal modulo n, so b' == b*k + 2*t (mod n), c' == t^2 + b*k*t + c*k^2 (mod n).
%C Now note that without loss of generality we can suppose that b = 0 or -1, because we can always find some t such that b*k + 2*t == 0 or -1 (mod n). Furthermore, if n is an odd number, we can suppose that b = 0.
%C Case (i): n is an odd number, then a unitary ring with additive group (Z/nZ)^2 is of the form Z_n[x]/(x^2 - c). From the theorem above we can see that R_1 = Z_n[x]/(x^2 - c) and R_2 = Z_n[y]/(y^2 - c') are isomorphic if and only if there exists some k such that gcd(k, n) = 1 and that c*k^2 == c' (mod n). So the number of such rings is A092089(n).
%C Case (ii): n is an even number, then a unitary ring with additive group (Z/nZ)^2 is of the form Z_n[x]/(x^2 - c) or Z_n[x]/(x^2 - x - (c - 1)/4), c in Z_{4n}, c == 1 (mod 4). From the theorem above we can see that R_1 = Z_n[x]/(x^2 - c) and R_2 = Z_n[y]/(y^2 - c') are isomorphic if and only if there exists some k such that gcd(k, n) = 1 and that c*k^2 == c' (mod n) or c*k^2 + n^2/4 == c' (mod n) (with t = 0 and t = n/2 respectively); R_3 = Z_n[x]/(x^2 - x - (c - 1)/4)) and R_4 = Z_n[y]/(y^2 - y - (c' - 1)/4)) are isomorphic if and only if there exists some k such that gcd(k, 4*n) = 1 and that c*k^2 == c' (mod 4*n) or c*k^2 - n^2 + 2*n == c' (mod 4*n) (with t = (k - 1)/2 and t = (n + k - 1)/2 respectively).
%C (a) if n == 2 (mod 4), then the number of rings of the form is Z_n[x]/(x^2 - c) is A092089(n/2), and the number of rings of the form Z_n[x]/(x^2 - x - (c - 1)/4) is equal to the number of inequivalent residue classes modulo 4*n that are congruent to 1 modulo 4 where the equivalence relation is defined as [a] ~ [b] (mod 4*n) if and only if there exists some k such that gcd(k, 4*n) = 1 and that a*k^2 == b (mod 4*n). The number of the even inequivalent residue classes modulo 4*n is equal to the number of inequivalent residue classes modulo 2*n, and the number of inequivalent residue classes modulo 4*n that are congruent to 1 modulo 4 is equal to the number of those that are congruent to 3 modulo 4. So the total number if A092089(n/2) + (A092089(4*n) - A092089(2*n))/2.
%C (b) if n == 0 (mod 4). Similarly, the number of rings of the form is Z_n[x]/(x^2 - c) is A092089(n), and the number of rings of the form Z_n[x]/(x^2 - x - (c - 1)/4) is (A092089(2*n) - A092089(n))/2.
%H Amiram Eldar, <a href="/A307000/b307000.txt">Table of n, a(n) for n = 1..10000</a>
%H Christof Nöbauer, <a href="/A341201/a341201_2.pdf">Numbers of rings on groups of prime power order</a>.
%H Jianing Song, <a href="/A307000/a307000.txt">List of rings of the form Z_n[x]/(x^2 + b*x + c) for n <= 100</a>.
%H Jianing Song, <a href="/A307000/a307000.pdf">Note on A307000</a>.
%F a(n) = A092089(n) if n is odd; (A092089(n) + A092089(2*n))/2 if n is even.
%F Multiplicative with a(p^e) = 2*e + 1, a(2) = 3 and a(2^e) = 4*e - 2 for e >= 2.
%F Dirichlet g.f.: zeta(s)^3/zeta(2s)*(1/(1+2^(-s))).
%F Sum_{k=1..n} a(k) ~ (2*n/Pi^2) * (log(n)^2 + c_1 * log(n) + c_2), where c_1 = 6 * gamma - 2 + 2*log(2)/3 - 4*zeta'(2)/zeta(2) = 4.2052360821..., gamma is Euler's constant (A001620), c_2 = 2 - 6*gamma + 6*gamma^2 - 2*log(2)/3 + 2*gamma*log(2) - log(2)^2/9 - 6*gamma_1 + 4*(1 - 3*gamma - log(2)/3)*zeta'(2)/zeta(2) + 8*(zeta'(2)/zeta(2))^2 - 4*zeta''(2)/zeta(2) = 1.2136692558..., and gamma_1 is the first Stieltjes constant (A082633). - _Amiram Eldar_, Dec 22 2023
%e The nonisomorphic unitary rings with additive group (Z/nZ)^2 (rings of the form Z_n[x]/(x^2 + b*x + c)) are given by Z_n[x]/(f(x)), where f(x) =
%e n = 1: x^2 (total number = 1);
%e n = 2: x^2, x^2 - x, x^2 - x - 1 (total number = 3);
%e n = 3: x^2, x^2 - 1, x^2 - 2 (total number = 3);
%e n = 4: x^2, x^2 - 1, x^2 - 2, x^2 - 3, x^2 - x, x^2 - x - 1 (total number = 6);
%e n = 5: x^2, x^2 - 1, x^2 - 2 (total number = 3);
%e n = 6: x^2, x^2 - 1, x^2 - 2, x^2 - x, x^2 - x - 1, x^2 - x - 2, x^2 - x - 3, x^2 - x - 4, x^2 - x - 5 (total number = 9);
%e n = 7: x^2, x^2 - 1, x^2 - 3 (total number = 3);
%e n = 8: x^2, x^2 - 1, x^2 - 2, x^2 - 3, x^2 - 4, x^2 - 5, x^2 - 6, x^2 - 7, x^2 - x, x^2 - x - 1 (total number = 10);
%e n = 9: x^2, x^2 - 1, x^2 - 2, x^2 - 3, x^2 - 6 (total number = 5);
%e n = 10: x^2, x^2 - 1, x^2 - 2, x^2 - x, x^2 - x - 1, x^2 - x - 3, x^2 - x - 4, x^2 - x - 5, x^2 - x - 6 (total number = 9).
%e See the link for rings of the form Z_n[x]/(x^2 + b*x + c) for n <= 100.
%t f[2, e_] := If[e == 1, 3, 4*e - 2]; f[p_, e_] := 2*e+1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Sep 17 2020 *)
%o (PARI) a(n)=
%o {
%o my(r=1, f=factor(n));
%o for(j=1, #f[, 1], my(p=f[j, 1], e=f[j, 2]);
%o if(p>=3, r*=(2*e+1));
%o if(p==2&&e==1, r*=3);
%o if(p==2&&e>=2, r*=4*e-2);
%o );
%o return(r);
%o }
%Y Cf. A092089.
%Y Cf. also A341547, A341548, A341201, A341202.
%Y Cf. A001620, A082633, A201994, A306016.
%K nonn,easy,mult
%O 1,2
%A _Jianing Song_, Mar 24 2019
%E New name from _Jianing Song_, Feb 15 2021
%E New name from _Jianing Song_, Apr 23 2021