Consider an odd prime number . In this paper, the number of certain type of partitions of zero in is calculated using a combination of elementary combinatorics and number theory. The focus is on the three-part partitions of 0 in with all three parts chosen from the set of non-zero quadratic residues mod . Such partitions are divided into two types. Those with exactly two of the three parts identical are classified as type I. The type II partitions are those with all three parts being distinct. The number of partitions of each type is given. The problem of counting such partitions is well related to that of counting the number of non-trivial solutions to the Diophantine equation in the ring . Correspondingly, solutions to this equation are also classified as type I or type II. We give the number of solutions to the equation corresponding to each type.
The study of Diophantine equations is one of the oldest branches of number theory and the most famous Diophantine equation is the Fermat equation: . Conjectured by Pierre de Fermat in 1637, Fermat’s last conjecture states that for any integer , no three positive integers can satisfy the Fermat’s equation. For more than 350 years, many mathematicians have devoted their work on solving this fascinating conjecture and related Diophantine equations. It was until 1995, the conjecture became Fermat’s last theorem, proved by Andrew Wiles .
Research has been done in the investigation of Diophantine equations “locally,” in particular, over finite fields. For example, in , solving a Diophantine equation modulo every prime number was studied using commutative algebra techniques. Recently, many scholars have studied Diophantine equations modulo prime numbers and obtained a series of interesting results (see [3,4,5, 6,7]).
Consider any odd prime number . In this paper, we focus on the following three equations concerning solutions in the ring :
Another way to describe a non-trivial solution to equation (1) is to view it as a three-part partition of 0 modulo . The theory of partition is another interesting branch of number theory. The concept of partitions of positive integers was given by Leonard Euler in the 18th century. Since then many prominent mathematicians, including Gauss, Jacobi, Schur, McMahon, Andrews, Ramanujan, and Hardy, have made great contributions to the study of partitions (see [11,12,13]). Applications of partitions of positive integers or sets can be found in many other areas such as combinatorics, computer science, and genetics. A partition of a positive integer is a combination (unordered, with repetitions allowed) of positive integers, called the parts, that add up to . A three-part partition of 0 in has the form of in , where are all non-zero elements in . We are interested in counting the number of three-part partitions of 0 in , where each part is a non-zero quadratic residue modulo . We call such a partition of 0 a 3Q-partition of 0. For any 3Q-partition of 0 with three distinct parts, it produces six non-trivial solutions to equation (1) (six ordered solution triples). Likewise, if two of the three parts in a 3Q-partition of 0 are identical, then it gives three non-trivial solutions to equation (1). Thus, the number of 3Q-partitions of 0 is well related to the number of non-trivial solutions to equation (1), which is the same as the number of non-trivial quadratic solutions to equation (2), and can be determined consequently. We discuss these two different types of 3Q-partitions of 0 and the enumeration for each type. We start with the following definitions.
Let be any odd prime number.
A triple is called non-trivial if in . A solution triple to equation (2) or to the equation in is called a quadratic solution if .
A multiset is called a 3Q-partition of 0 in if and . Denote .
Note that a 3Q-partition in is represented by the set which may be a multiset because two of the three numbers may be identical. Next, we adopt a definition originated in .
 Given positive integers and and a prime number , denotes the number of non-trivial solutions to the equation
It is known that for every odd prime . As mentioned previously, if , there is a one-to-one and onto correspondence between and the set of quadratic solutions to equation (2). Thus, the size of is the number of quadratic solutions to equation (2), which is also the number of quadratic solutions to in . It implies that .
In , a character sum , where is a positive integer, was studied and it is useful in calculating the size of in this study. Originally, it was defined for any Dirichlet character mod . We adopt this definition with respect to the special Dirichlet character , which is the Legendre symbol mod .
Let be an odd prime and be a positive integer. The Dirichlet character sum is defined by
We consider the case when . The above sum function plays an important role in determining the number of solutions to equation (1) or the number of 3Q-partitions of 0 in . In Section 2, we apply the results about in  to develop the exact number (Theorem 2.4). Similarly, and are calculated. At the end of Section 2, we discuss the density of solution triples over the set .
Next, we focus on counting the number of related restricted partitions of 0. Assume is a 3Q-partition of 0 in . That is, and . Because is a prime greater than 3, only two cases may occur: either exactly two out of the three numbers are identical, or all three are distinct. We divide the 3Q-partitions of 0 into two types based on this distinction. Recall that denotes the set of all 3Q-partitions of 0 in represented by multisets.
Let be an odd prime.
Any element in is called a 3Q-partition of 0 in of type I.
3Q-partitions of 0 in , where are all distinct . Elements in are called 3Q-partitions of 0 in of type II.
Correspondingly, a solution triple in to any equation is of type I if exactly two of the three numbers are identical. It is of type II if all the three numbers are distinct.
Denote and .
In other words, is the number of 3Q-partitions of 0 of type I and is the number of 3Q-partitions of 0 of type II.
Obviously, . Assume is a 3Q-partition of 0 of type I in . It produces three elements in : , and . Similarly, a 3Q-partition of type II produces six triples in by permutation. Thus, , that is, .
In Section 3, we analyze quadratic solution types to equation (2) and give the exact formulas, respectively, for and . The main result is given in Theorem 3.8. In Section 4, we use the solution triples in to build monomials and homogeneous polynomials in the polynomial ring . We give a formula for the number of such polynomials.
2 Number of solutions
In this section, we calculate the number of non-trivial solutions to equation (1) or equation (3), or the number of quadratic solutions to equation (2), by applying properties of Dirichlet characters (see [14,15,16, 17,18]) and the character sum defined in Definition 1.4. We focus on prime numbers in the form of , where is a positive integer. Combinatorial and number theory methods are used to derive an explicit formula for the solution number .
The following lemma shows a known result in the literature. For convenience, we re-state it and provide a simple proof.
Let be a prime number in the form of , where is a positive integer. Then every element in is a cubic residue mod .
Let . By Fermat’s little theorem . Thus, . Therefore, every element in is a cubic residue mod .□
Consequently, we claim
Let be a prime number in the form of , where is a positive integer. Then
By Lemma 2.1, there is a one-to-one and onto correspondence between the quadratic solutions to the equation in and the quadratic solutions to the equation in .□
In , an explicit formula for is given:
 Let be an odd prime with . Then for every positive integer , the Dirichlet character sum is given by
In particular, . We use this value to help evaluating or .
If is an odd prime with , then
Since , when passes through a reduced residue system mod , also passes through a reduced residue system mod . Note that the equation and involved in the proof below is over the ring .
Furthermore, if with in , then and in . Thus, in the above sum, the first of the four summands is calculated as follows:
Note that when passes through a reduced residue system mod , also passes through a reduced residue system mod for all with . Then we replace by and by and apply properties of Dirichlet character sums to calculate the second and the third summand:
Finally, from all the above,
Consider . The set of non-zero quadratic residues mod 17 has eight numbers:
For any prime number , or . It is obvious that the number , or , is a multiple of 3 since . We further claim that
If is an odd prime with , then is divisible by 6 when or . However, is divisible by 3 but not by 6 if .
Theorem 2.4 gives
Now we discuss the solution number , which is the number of non-trivial quadratic solutions to the equation over . When , is the same as the number of non-trivial quadratic solutions to the equation and is also the number of non-trivial solutions to the equation over . It is obvious that if is a quadratic non-residue mod , then all of these equations have no solution, that is, . However, if is a quadratic residue mod , , is a non-trivial quadratic solution to the equation and all of the non-trivial quadratic solutions to the equation are of this form. Thus, . By a similar proof as in the proof of Theorem 2.4, we also can obtain the same result. In summary,
Let be an odd prime with . Then
The situation for , the number of non-trivial solutions to in , is similar. It can be evaluated as follows.
If is an odd prime with , then
As before, the equation is considered over the ring . Similarly as in the proof of Theorem 2.4,
Research has been done on the distribution and density of solutions to a Diophantine equation in the set of all the possible elements. For example, in , the number of the integer solutions modulo a prime to the equation is studied. It is shown that is relatively small compared to . More precisely, and the constant 4 is the best possible. In our study, all the non-trivial solutions to equation (1) are chosen from the set whose size is . Table 1 shows the ratio of the number of solutions to the size of for the first six primes which reflects the density of the solutions in the set .
It seems when is larger and larger, the density is smaller and smaller. We define the density function as follows.
Let be a prime number. Define and call it the density function of the solutions to equation (1) in the set .
In the next theorem, we give the explicit formula for the density function which indicates that when is approaching to infinity, the density function acts similarly as . Note that, when , or 23 modulo 24.
Let be an odd prime number with . Then
From Theorem 2.4,
Immediately from (1),
It confirms that the density function is approaching to 0 when goes to infinity. Actually, .
3 Solution types and the resulting partitions
A classical number theory problem is on the partitions of positive integers. Many researchers have studied counting the number of integers partitions and that of restricted partitions, conjugate and self-conjugate partitions, graphical representations of partitions, and so on. There are many applications of integer partitions in other fields such as molecular chemistry, crystallography, and quantum mechanics. In modern algebra, it is well related to the study of symmetric polynomials, which we will see in Section 4.
Let be a prime number with . Theorem 2.4 states that the number of non-trivial solutions to the equation in , or the number of non-trivial quadratic solutions to in , is and the set of such solutions is . Also,
In Definition 1.5, the sets of all 3Q-partitions of 0 in , those of type I, and those of type II, are denoted as . Recall that for any , in and . Thus, every triple in produces one 3Q partition of 0 in . On the other hand, for every 3Q-partition of 0 in , that is, , it gives three or six solution triples in , depending on being of type I or II. If , where , , and , it produces three solutions of type I in : , , and . Similarly, for , six solutions in of type II are produced by permutation. Recall that and . The relationships between , , and are given as follows:
Let be a prime with . Then
Also note that, for any , as well for any . We define an equivalence relation on . One can easily check the equivalence property.
Let be a prime number with . For any two triples , if and only if there exists such that . The equivalence class containing is denoted as . The set of equivalence classes is denoted by .
Let be a prime number with . Then
Obviously, . The number of equivalence classes, , is given by .□
In this section, we provide formulas for , , and correspondingly the number of type I and type II solutions in . We first examine the situations for and .
Consider . The set of non-zero quadratic residues mod is . From Proposition 3.3, . The six equivalence classes are as follows:
For the prime number , we obtain solutions of both types.
For , there are three equivalence classes of type I: , , . There are six equivalence classes of type II: , , , , , .
In this example, , so each equivalence class has 20 triples from . Thus, has solutions of type I and solutions of type II. Altogether, . From Theorem 2.4, we also can calculate that .
The equivalence classes and give the set of the partitions of 0 of type I and type II in , respectively. In particular,
Let be a prime number greater than 5 and .
If or , then all the solutions in are of type II and is divisible by 6.
If or , then there are exactly solutions of type I in .
and has no solutions of type II.
Let , a solution triple of type I. Then and . It implies that is a quadratic residue mod .
Assume or . Then is not a quadratic residue of . From the above, does not have solution triples of type I. Thus, all the solution triples in are of type II and . By Lemma 3.1, is divisible by 6.
Assume or . Then is a quadratic residue mod . Consider any solution triple of type I as above. Since , for a unique . It is obvious that all the three triples , , and are solutions in of type I and there are exactly of them. Every solution triple of type I in must also be of such a form. Thus, has exactly many solutions of type I.
From (2), has solutions of type I. By Lemma 3.1,
Next, we focus on 3Q-partitions of 0 in . We derive formulas , , and relationships between them. We examine an example first.
Consider . . From Proposition 3.6, .
We now give the formulas for , and show relationship between them.
Let be a prime number with .
If or , and
If or , then , and
The number of all the 3Q-partitions of 0 in is given as follows:
Note that is odd when or and is even when or . When or , . Then and the result follows from (1). For or , by Proposition 3.6(2). Add to obtained from (1) above, we have
Let be a prime number with .
If , then or . That is, has no solutions of type II only when or 17.
If or and , , then
If or and , , then
For (1), from Theorem 3.8, the only way to make is when . This only can occur when or
Similar to the proof of (2), for (3), assume or , , and . It implies that . We have
Corollary 3.9(1) claims two cases and the only two cases when type II solution does not exist. It happens only when or . Example 3.7 confirms the truth when . For , we use Theorem 2.4 to calculate . has three equivalence classes each of which is of size 8: , , . They produce all the 24 solutions in and they are all of type I which confirms that there is no solution of type II in .
4 Counting monomials in three variables of certain degree in
Polynomials are important functions which have many interesting properties and they play important roles in many areas of mathematics and science. For example, polynomials are used to approximate other complex functions. In advanced mathematics, polynomial rings and algebraic varieties over a field are central concepts in algebra and algebraic geometry. Among the polynomials with multiple variables, homogeneous polynomials are those with all the monomials having the same degree. Homogeneous polynomials are building blocks of the multivariable polynomials and they often appear in physics as a consequence of dimensional analysis, where measured quantities must match in real-world problems. Any non-zero polynomial can be decomposed, in a unique way, as a sum of homogeneous polynomials of different degrees. Consider a polynomial ring over a field and a positive integer . It is known that the set of all homogeneous polynomials of degree forms a vector space whose dimension is the number of different monomials of degree (see ). We are interested in applying the results from the previous sections to calculate the number of certain monomials of the same degree , for some values of .
Consider the polynomial ring with being prime and a monomial , where are non-negative integers. By Fermat’s little theorem, for all . Thus, we are only interested in the monomials with . When , we say is of degree . For any non-constant monomial of degree with (or ), . We write where and . A polynomial has the form of
Consider the polynomial ring , where is odd and . Let be a non-negative integer. A polynomial in is called a homogeneous polynomial of degree if the degrees of all the involved monomials are of the same degree .
Consider , where and , that is, . It implies that or . In this section, we count the number of monomials of degree or .
The number is the number of monomials of degree or , where , a disjoint union. Then . The values of , , and for small primes are indicated in Table 2.
We note that in Table 2, for some primes such as 17, 29, 41, 53, and so on. We classify the prime numbers achieving this property as follows.
Let be a prime number with .
There are exactly many monomials of degree or ;
If or 17 , then
Note that for any monomial , where , the exponent for each of the variables is non-zero quadratic residue mod and the total degree is for and for . The aforementioned results provided the number of such monomials. Next, we show that these types of monomials have an interesting formal partial derivative. Let be a monomial in the polynomial ring , the formal partial derivative of with respect to is .
Let be an odd prime number with and .
Let be a monomial in with . Then
A polynomial in satisfying if all of the monomial terms of are of degree or .
The left hand side expression equals 0 if and only if the coefficients of all the three monomials are divisible by . Let , where . Then or . Then
This is immediately from (1).□
5 Conclusions and future directions
In this paper, we have made connections between the number of solutions of certain Diophantine equations modulo a prime number and the number of 3Q-partitions of 0 in the ring . We classified two types of 3Q-partitions of 0 and provided the number of each type of partitions. Many questions remain open. In the theory of partitions of positive integers, researchers have worked on restricted partitions with a given number of parts, with distinct parts, or with a given maximal value of all the parts, etc. Other questions involve concepts such as conjugate and self-conjugate partitions. We are interested in studying similar problems for our partition problems. We also plan to study similar Diophantine equations mod involving more than three variables and generalize the results.
In Section 4, we counted the number of certain monomials of degree or in the polynomial ring . We provided exact formulas for the number of each type of monomials when or . It remains open to count such monomials for or . Let and . It is known from  that and are vector spaces over and the dimensions of these two spaces are given by
A homogeneous ideal of the ring is an ideal generated by homogeneous polynomials. These ideals are important algebraic structures in the study of projective varieties in algebraic geometry. We would like to seek further connections and applications in this area.
The authors would like to thank the referees for helpful and detailed comments, which have significantly contributed to improving the presentation of this paper.
Funding information: This work was supported by the Fundamental Research Funds for the Central Universities, CHD (300102121102).
Conflict of interest: Authors state no conflict of interest.
 A. Wiles , Modular elliptic curves and Fermatas last theorem, Ann. Math. 141 (1995), no. 3, 443–551. Search in Google Scholar
 J. Ax , Solving Diophantine problems modulo every prime, Ann. Math. 85 (1967), no. 2, 161–183. Search in Google Scholar
 M. Murata , Primitive solutions of nonscalar quadratic Diophantine equations, J. Number Theory 201 (2019), 398–435. Search in Google Scholar
 G. Gao and Z. Liu , Small prime solution to diagonal Diophantine equations, Int. J. Number Theory 16 (2020), no. 3, 447–460. Search in Google Scholar
 S. Li , On a Diophantine equation with prime numbers, Int. J. Number Theory 15 (2019), no. 8, 1601–1616. Search in Google Scholar
 T. Ching and K. Tsang , Small prime solutions to linear equations in three variables, Acta Arith. 178 (2017), no. 1, 57–76. Search in Google Scholar
 N. D. Elkies , On A4.B4.C4=D4 , Math. Comp. 51 (1988), no. 184, 825–835. Search in Google Scholar
 W. Zhang and X. Wang , On a kind of character sums and their recurrence properties, Acta Arith. 185 (2018), no. 4, 347–355. Search in Google Scholar
 S. Shen and W. Zhang , On the quartic Gauss sums and their recurrence property, Adv. Differ. Equ. 2017 (2017), 43. Search in Google Scholar
 W. Zhang and J. Hu , The number of solutions of the diagonal cubic congruence equation mod p, Math. Rep. 20 (2018), no. 70, 73–80. Search in Google Scholar
 G. Andrews , The Theory of Partitions, Cambridge University Press, Cambridge, 1998. Search in Google Scholar
 B. Kim , On the number of partitions of n into k different parts, J. Number Theory 132 (2012), no. 6, 1306–1313. Search in Google Scholar
 J. Melenk and I. Babuska , The partition of unity finite element method: basic theory and applications, Comput. Meth. Appl. Mech. Eng. 139 (1996), 289–314. Search in Google Scholar
 T. M. Apostol , Introduction to Analytic Number Theory, Springer-Verlag, New York, 1976. Search in Google Scholar
 B. C. Berndt and R. J. Evans , Sums of Gauss, Jacobi, and Jacobsthal, J. Number Theory 11 (1979), 349–389. Search in Google Scholar
 B. C. Berndt and R. J. Evans , The determination of Gauss sums, Bull. Amer. Math. Soc. (N.S.) 5 (1981), no. 2, 107–129. Search in Google Scholar
 W. Zhang and H. Li , Elementary Number Theory, Shaanxi Normal University Press, Shaanxi, 2008. Search in Google Scholar
 W. Zhang and H. Liu , On the general Gauss sums and their fourth power mean, Osaka J. Math. 42 (2005), 189–199. Search in Google Scholar
 H. Cohen , A Course in Computational Algebraic Number Theory, Springer-Verlag Berlin Heidelberg, France, 1993. Search in Google Scholar
 D. Cox , J. Little , and D. O’Shea , Using Algebraic Geometry, 2nd ed., Springer Science+Business Media, Inc., New York, NY, USA, 2005. Search in Google Scholar
© 2021 Wang Xiao and Aihua Li, published by De Gruyter
This work is licensed under the Creative Commons Attribution 4.0 International License.