title: On diagonal equations over finite fields
authors: José Alves Oliveira
text: 
  
  
  Let  be a finite field with q=p^t elements. In this paper, we study the number of solutions of equations of the form a_1 x_1^d_1+…+a_s x_s^d_s=b over . A classic well-konwn result from Weil yields a bound for such number of solutions. In our main result we give an explicit formula for the number of solutions of diagonal equations satisfying certain natural restrictions on the exponents. In the case d_1=…=d_s, we present necessary and sufficient conditions for the number of solutions of a diagonal equation being maximal and minimal with respect to Weil's bound. In particular, we completely characterize maximal and minimal Fermat type curves. 
  
  
  Monocular, One-stage, Regression of Multiple 3D People
  
      Yu Sun^1This work was done when Yu Sun was an intern at JD AI Research.   Qian Bao^2   Wu Liu^2Corresponding author.   Yili Fu^1†  Michael J. Black^3   Tao Mei^2
  
  
  ^1Harbin Institute of Technology   ^2JD AI Research 
  
  ^3Max Planck Institute for Intelligent Systems, Tübingen, Germany
  
  
  
  
  
  
      December 30, 2023
  =====================================================================================================================================================================================================================================================================================================
  
  
  
  
  
  § INTRODUCTION
  
  
  Let p be a prime number and t be a positive integer. Let  be a finite field with q elements, where q=p^t.  For a⃗=(a_1,…,a_s)∈^s, d⃗=(d_1,…,d_s)∈_+^s and b∈, let N_s(a⃗,d⃗,q,b) be the number of solutions of the diagonal equation
  
      a_1 x_1^d_1+⋯+a_s x_s^d_s=b
  
  over . In the general case,  Weil <cit.> and Hua and Vandiver <cit.> independently showed that N_s(a⃗,d⃗,q,b) can be expressed in terms of character sums. For the case b=0, Weil's result implies that
  
      |N_s(a⃗,d⃗,q,0)-q^s-1|≤ I(d_1,…,d_s)(q-1)q^(s-2)/2
  
  where I(d_1,…,d_s) is the number of s-tuples (y_1,…,y_s)∈^n, with 1≤ y_i≤ d_i-1 for all i=1,…,s, such that
  
      y_1/d_1+…+y_s/d_s≡ 01.
  
   A formula for I(d_1,…,d_s) can be found in Lidl and
  Niederreiter <cit.>. Some properties of I(d_1,…,d_s) have been explored for several authors <cit.> and the possible values of N_s(a⃗,d⃗,q,0) in the case where I(d_1,…,d_s)∈{1,2} was studied by Sun and Yuan <cit.>. A diagonal equation given by Eq. (<ref>) (with b=0) is called maximal (or minimal) if its number of solutions attains the bound (<ref>) and the maximality or minimality are set accordingly to N_s(a⃗,d⃗,q,0) attaining the upper or lower bound, respectively. The number of solutions of diagonal equations, with s=3, d_1=d_2=d_3 and b=0, is closely related to the number of -rational points on curves of the form ax^n+by^n=c (see Section <ref> for more details). Maximality and minimality have been extensively studied in the context of curves <cit.>. For instance, maximal and minimal Fermat type curves of the form x^n+y^n=1 were studied by Tafazolian <cit.>.
  
   The number of solutions of diagonal equations have been extensively studied in the last few decades <cit.>. In many cases, the authors present a formula for the number of solutions of equations whose exponents satisfy certain natural restrictions. The case where q is a square provides families of diagonal equations whose number of points can be obtained by means of simple parameters. For instance, in the case where q=p^2t, Wolfmann <cit.> presented an explicit formula for N_s(a⃗,d⃗,q,b) in the case where d=d_1=…=d_s and there exists a divisor r of t such that d divides p^r+1. Still in the case where q=p^2t, Cao, Chou and Gu <cit.> obtained a formula for N_s(a⃗,d⃗,q,b) in terms of I(d_1,…,d_s) in the case where there exists a divisor r of t such that d_i divides p^r+1 and a_i∈_p^r for all i=1,…,s. For more results concerning diagonal equations over finite fields, see Section 7.3 in <cit.> and the references therein.
  
  In this paper, we obtain an explicit formula for N_s(a⃗,d⃗,q,b) in a setting more general than that presented in <cit.> and <cit.>. In Theorem <ref>, we present the number of solutions of Eq. (<ref>) in the case where b= 0, q=p^2t and, for each i=1,…,s, there exists a divisor r_i of t such that d_i|(p^r_i+1). Most notably, Theorem <ref> provides the number of solutions of Eq. (<ref>) in the case where b≠ 0, q=p^2t and  there exists a divisor r of t such that d_i|(p^r+1) for all i=1,…,s. As a consequence of our results, a simple formula for I(d_1,…,d_s) is obtained. In the case d_1=…=d_s, we study the number of solutions of (<ref>) in order to find those diagonal equations whose number of solutions attains the bound (<ref>). In Theorem <ref> we provide necessary and sufficient conditions on a_1,…,a_s and q for the diagonal equation of the form (<ref>) being maximal or minimal. In particular, we prove that a maximal (or minimal) diagonal equation must satisfy the hypothesis of Theorem <ref>. As a direct consequence of Theorem <ref> we obtain a complete characterization of maximal and minimal curves of the form ax^n+by^n=c. In particular, we prove that the curve with affine equation ax^n+by^n=c is maximal only if it is covered by the Hermitian curve. We also discuss further problems concerning the number of solutions of diagonal equations in the projective space.
  
  
  
  The paper is organized as follows. In Section <ref> we state our main results and provide some important remarks. Section <ref> provides preliminary results concerning Jacobi sums. In Section <ref> we prove our main counting results. In Section <ref> we study the conditions in which a diagonal equation attains Weil's bound and in Section <ref> we give a characterization of maximal and minimal projective varieties arising from diagonal equations. Finally, in Section <ref> we provide some final considerations and open problems. 
  
  
  
  § MAIN RESULTS
  
   In this section we state the main results of this article. Throughout the paper, unless otherwise stated,  q=p^t for some positive integer t and an odd prime p and α is a primitive element of . Let n be a positive integer. If d_i=1 for some i∈{1,…,s}, then the number of solutions of Eq. (<ref>) over  is q^n(s-1), then along the paper we assume that d_i>1 for all i=1,…,s. Moreover, by simple change of variables, we may assume without loss of generality that d_i is a divisor of q^n-1 for all i=1,…,s. Also, we let a⃗ denote a vector (a_1,…,a_s)∈^s, where a_i≠ 0 for all i=1,…,s. The following definitions will be extensively used in our main results.
  
  
  	For a⃗=(a_1,…,a_s)∈^s and d⃗=(d_1,…,d_s), let N_s(a⃗,d⃗,q^n,b) be the number of solutions of the diagonal equation 
  	
      a_1 x_1^d_1+⋯+a_s x_s^d_s=b
  
  	over _q^n.
  
  Throughout the paper, unless otherwise stated, N_s(a⃗,d⃗,q^n,b) denotes the number
  of solutions of Eq. (<ref>) over  with a⃗∈^s and d_i|(q^n-1) for all i=1,…,s.
  
  For d a divisor of q^2-1 and a,b∈^*, we set
  	
      θ_d(a,b)=
      	1,    if a^(q^2-1)/d=b^(q^2-1)/d;
      
      	0,    otherwise.
  
  
  
  Our main results can be summarized as follows.
  
  
  	 Let a⃗∈^s. Assume that for each i, with i=1,…,s, there exists a divisor r_i of t such that d_i|(p^r_i+1). For each i=1,…,s, let λ_i=α^(p^t+1)/2 if d_i|(p^t+1) and let λ_i=1 otherwise. Then 
  	
      N_s(a⃗,d⃗,q^2,0)=q^2(s-1)+ q^s-2∑_j=1^q^2-1∏_i=1^sε_i(1-d_i)^Δ_i,j,
  
  	 where ε_i=(-1)^t/r_i and Δ_i,j=θ_d_i(a_i,λ_iα^j).
  
  The following results are generalizations of Theorem 1 in Wolfmann <cit.> and Theorem 2.9 in Cao, Chou and Gu <cit.>.
  
  	Let a⃗∈^s. If there exists a divisor r of t such that d_i|(p^r+1) for all i=1,…,s, then 
  	
      N_s(a⃗,d⃗,q^2,0)=q^2(s-1)+ε^s q^s-2(q+ε)∑_j=1^q-ε∏_i=1^s(1-d_i)^δ_i,j,
  
  	where δ_i,j=θ_d_i(a_i,α^j) and ε=(-1)^t/r.
  
  For the case b≠0, we have the following result.
   Let a⃗∈^s. If there exists a divisor r of t such that d_i|(p^r+1) for all i=1,…,s, then
  	
      N_s(a⃗,d⃗,q^2,b)=q^2(s-1)-ε^s+1q^s-2(q∏_i=1^s(1-d_i)^ν_i(b)-∑_j=1^q-ε∏_i=1^s(1-d_i)^δ_i,j)
  
  	for b≠ 0, where δ_i,j=θ_d_i(a_i,α^j), ν_i(b)=θ_d_i(a_i,b) and ε=(-1)^t/r.
  
  
  In the special case where s=2, we have the following result for the number of points on Fermat type curves.
  
  
  	Let a,b∈^* and c∈. Let m and n be divisors of q^2-1 and let N(c) be the number of -rational points on the Fermat type curve given by the affine equation a x^n+b y^m=c. If there exists a divisor r of t such that n|(p^r+1) and m|(p^r+1), then
  	
      N(0)=q^2-(q^2-1)(1-l)^θ_l(a,b)+1-C(n,m)
  
  	and
  	
      N(c)=q^2-ε q(1-n)^θ_n(a,c)(1-m)^θ_m(b,c)-ε(q-ε)(1-l)^θ_l(a,b)+1-C(n,m)
  
  	for c≠ 0, where l=(m,n), ε=(-1)^t/r and C(n,m):=(1-n)^θ_n(a,b) if n=m and C(n,m):=0 otherwise.
  
  
   Let a⃗∈ and let d⃗=(d_1,…,d_s) such that d_i|(q-1) for all i=1,…,s. The bounds provided by Weil <cit.> entail that
  	
  		
    *  |N_s(a⃗,d⃗,q,0)-q^s-1|≤ I(d_1,…,d_s)(q-1) q^(s-2)/2;0.1cm
  		
    *   |N_s(a⃗,d⃗,q,b)-q^s-1|≤  q^(s-2)/2[√(q)∏_i=1^s(d_i-1)-(√(q)-1)I(d_1,…,d_s)].
  	
  
  
  Diagonal equations are called maximal or minimal if its number of solutions attains the upper or the lower bound, respectively. 
  
  
  	 For d⃗∈^s such that d_i|(q-1) for all i=1,…,s, it follows that
  	
      I(d_1,…,d_s)=(-1)^sq-1∑_m=0^q-1∏_d_i|m (1-d_i).
  
  
  
  
  Theorem <ref> provides the number os solutions of diagonal equations under conditions on d_1,…,d_s and q. Among the family of diagonal curves covered by this result there exist those whose number of solutions attains Weil's bound (see Remark <ref>). Indeed, if d_1=…=d_s, then a diagonal equation attaining Weil's bound satisfies the conditions imposed in Theorem <ref>, as we state in the following result.
  
  
  	For d a divisor of q-1, let χ_d be a multiplicative character of ^* of order d. Assume that d_1=…=d_s=d>2, (s,b)≠(2,0), (s,d,b)≠(4,3,0) and (s,d)≠(3,3) if b≠ 0. Then the bounds in Remark <ref> are attained if and only if the following hold:
  	
  		
    * q=p^2t for some positive integer t;
  		
    * there exists a divisor r of t such that d|(p^r+1);
  		
    * if b=0, then χ_d(a_1)=…=χ_d(a_s);
  		
    * if b≠ 0, then χ_d(a_1)=…=χ_d(a_s)=χ_d(b).
  	
  	Suppose Weil's bound is attained. If b=0, then the diagonal equation is minimal if and only if t/r is even and s is odd. If b≠ 0, then the diagonal equation is minimal if and only if t/r and s are both even. 
  
  
  The case (s,b)=(2,0) is commented in Remark <ref>. The cases (s,d,b)=(4,3,0) and (s,d)≠(3,3) with b≠ 0 are not included in Theorem <ref> because of a technical obstruction in Lemma <ref>. The number of solutions of diagonal equations of degree d=2 is well-known (see Theorems 6.26 and 6.27 in <cit.>). As a direct consequence of Theorem <ref>, we have the following characterization for maximal and minimal Fermat type curves.
  
  
  	For n a divisor of q-1, let χ_n be a multiplicative character of ^* of order n. For a,b,c∈ and n a divisor of q^2-1, let 𝒞 be the curve ax^n+by^n=c over _q^2 with q=p^t. Then
  	
  		
    * 𝒞 is maximal over _q^2 if and only if  the following hold:
  		
  			
    * n divides q+1;
  			
    * χ_n(a)=χ_n(b)=χ_n(c).
  		
  		
    * 𝒞 is minimal over _q^2 if and only if the following hold:
  		
  			
    * t is even and there exists a divisor r of t/2 such that n divides p^r+1;
  			
    * χ_n(a)=χ_n(b)=χ_n(c).
  		
  	
  
  
  Corollary <ref> generalizes the main result of Tafazolian <cit.> and also generalizes Theorem 4.4 of Garcia and Tafazolian <cit.>, where the authors study maximal curves of the form x^n+y^n=1. In particular, Corollary <ref> implies that 𝒞 is maximal (or minimal) only if it is covered by a Hermitian curve. In Section <ref> we provide a more general approach on the number of points on diagonal equations in the s-dimensional projective space. In particular, Fermat type varieties attaining the Weil-Deligne bound are completely characterized (see Corollary <ref>).
  
  
  
  
  § PRELIMINARIES
  
  Let  be a non-singular and geometrically irreducible curve defined over  and let () denote the set of -rational points on . The Hasse-Weil bound asserts that 
  
      |()-q^n-1|≤ 2g√(q^n),
  
  where g is the genus of . The curve  is called maximal if 
  
      ()=q^n+1+2g√(q^n).
  
  For r a positive integer, let _r be the Hermitian curve over _p^2r given by the affine equation x^p^r+1+y^p^r+1=1. It is well-known that _r is maximal over _p^2r and, since g=p^r(p^r-1)/2, the number of rational points on _r over _p^2r is p^2r+1+p^r(p^r-1)p^r=p^3r+1. For λ_1,…, λ_k multiplicative characters of ^*, the Jacobi sum of λ_1,…, λ_k is defined as 
  
      J_q(λ_1,…,λ_k, b)=∑_b_1+⋯ b_k=bλ_1(b_2)⋯λ_k(b_k)
  
  where the summation is extended over k-tuples (b_1,…,b_k)∈^k. The following useful result is a basic result of Jacobi sums.
  
  <cit.> Let λ_1,…,λ_k be nontrivial multiplicative characters of ^*. Then 
  	
      |J_q(λ_1,…,λ_k, b)|=
      	q^k-1/2,    if b≠0 and λ_1⋯λ_k is nontrivial;
      
      	q^k-2/2,    if b≠0 and λ_1⋯λ_k is trivial;
      
      	(q-1)q^k-2/2,    if b=0 and λ_1⋯λ_k is trivial;
      
      	0,    if b=0 and λ_1⋯λ_k is nontrivial.
  
  	
  
  
  From here, we use the maximality of the Hermitian curve in order to compute certain Jacobi sums.
  
  
  	Let q=p^t and let r be a divisor of t. Let m and n be divisors of q^2-1 such that m|(p^r+1) and n|(p^r+1) and let χ_m and χ_n be primitive multiplicative characters of ^* of order m and n, respectively. For ℓ_1,ℓ_2 integers, it follows that
  	
      J_q^2(χ_n^ℓ_1,χ_m^ℓ_2,1)=ε q, if χ_n^ℓ_1χ_m^ℓ_2 is nontrivial;
      
      	-1, otherwise,
  
  	where ε=(-1)^t/r.
  
  
  
  	If χ_n^ℓ_1χ_m^ℓ_2 is trivial, then
  	
      J_q^2(χ_n^ℓ_1,χ_m^ℓ_2,1)=∑_b_1+b_2=1χ_n^ℓ_1(b_1)χ_n^-ℓ_1(b_2)=∑_b_1+b_2=1
      b_1≠ 1χ_n^ℓ_1(b_11-b_1)=-χ_n^ℓ_1(-1)=-1.
  
  	
  	Suppose that χ_n^ℓ_1χ_m^ℓ_2 is nontrivial. We observe that χ_n^ℓ_1=χ_p^r+1^(p^r+1)ℓ_1/n and χ_m^ℓ_2=χ_p^r+1^(p^r+1)ℓ_2/m and then we may suppose without loss of generality that n=m=p^r+1. Since _r is maximal over _p^2r, it follows that _r()=p^2t+1-ε p^r(p^r-1)p^t, where ε is 1 or -1 according to the minimality or maximality of _r over . The line at infinity contains p^r+1 points, then the number N of solutions of the affine equation x^p^r+1+y^p^r+1=1 over  is equal to
  	
      p^2t+1-ε p^r(p^r-1)p^t-(p^r+1)=p^2t-p^r-ε p^r(p^r-1)p^t.
  
  	On the other hand, we have that
  	
      N   =∑_b_1+b_2=1[1+χ_p^r+1(b_1)+⋯+χ_p^r+1^p^r(b_1)] [1+χ_p^r+1(b_2)+⋯+χ_p^r+1^p^r(b_2)]
         =p^2t+∑_b_1+b_2=1∑_1≤ℓ_1,ℓ_2≤ p^rχ_p^r+1^ℓ_1(b_1)χ_p^r+1^ℓ_2(b_2)
         =p^2t+∑_1≤ℓ_1,ℓ_2≤ p^r 
      ℓ_2≠ p^r+1-ℓ_1∑_b_1+b_2=1χ_p^r+1^ℓ_1(b_1)χ_p^r+1^ℓ_2(b_2)+∑_1≤ℓ_1≤ p^r∑_b_1∈\{1}χ_p^r+1^ℓ_1(b_11-b_1)
         =p^2t+∑_1≤ℓ_1,ℓ_2≤ p^r 
      ℓ_2≠ p^r+1-ℓ_1J_q^2(χ_p^r+1^ℓ_1,χ_p^r+1^ℓ_2,1)-∑_1≤ℓ_1≤ p^rχ_p^r+1^ℓ_1(-1)
         =p^2t-p^r+∑_1≤ℓ_1,ℓ_2≤ p^r 
      ℓ_2≠ p^r+1-ℓ_1 J_q^2(χ_p^r+1^ℓ_1,χ_p^r+1^ℓ_2,1).
  
  	Since the summation contains p^r(p^r-1) elements, it follows from Proposition <ref> and Eq. (<ref>) that J_q^2(χ_p^r+1^ℓ_1,χ_p^r+1^ℓ_2,1)=-ε p^t and this proves the assertion of our result.
  
  
  Another proof for Lemma <ref> can be obtained using Theorems 5.16, 5.21 and 5.26 of Lidl and Niederreiter <cit.>.
  
  
  
  § ON THE NUMBER OF SOLUTIONS
  
  
  In this section, we prove our counting results. For proving Theorem <ref>, we will follow the main ideas of Wolfmann <cit.>. To this end, let a∈ and let ψ_a=exp((2π i)(ax)/p) be an additive character, where  denotes the trace from _q^2 to . We have the following known results.
  
  
  	Let a⃗=(a_1,…,a_s)∈^s and d⃗=(d_1,…,d_s)∈_+^s such that d_i|(q^2-1) for all i=1,…,s. Then 
  	
      N_s(a⃗,d⃗,q^2,b)=q^-2∑_c∈0.7^*ψ_c(-b)∏_i=1^sS_i(c),
  
  	where S_i(c):=∑_x∈0.7^*ψ_ca_i(x^d_i).
  
  
  	It follows by a similar argument to the proof of Proposition 1 of <cit.>.
  
  
  <cit.>
  	Let q=p^t and a⃗,d⃗ and S_i(c) as defined in Lemma <ref>. Suppose that there exists a divisor r_i of t such that d_i|(p^r_i+1) for each i=1,…,s. Let ε_i=(-1)^t/r_i and ϵ_i=ε_i^(p^r_i+1)/d_i. Then, for each i, we have that
  	
  		
    * If (ca_i)^(q^2-1)/d_i=ϵ_i, then S_i(c)=-ε_i(d_i-1)q;
  
  		
    * If (ca_i)^(q^2-1)/d_i≠ϵ_i, then S_i(c)= ε_i  q.
  
  	
  
  From Lemmas <ref> and <ref>, we are able to prove Theorem <ref>.
  
  
  
   §.§ Proof of Theorem <ref>
   Since b=0, it follows from Lemma <ref> that 
  	
      N_s(a⃗,d⃗,q^2,0)=q^-2∑_c∈0.7^*∏_i=1^sS_i(c).
  
  	We observe that S_i(0)=∑_x∈ψ_0· a_i(x^d_i)=∑_x∈exp(0)=q^2. Therefore
  	
      N_s(a⃗,d⃗,q^2,0)=q^-2∏_i=1^sq^2+q^-2∑_c∈0.7^*∏_i=1^sS_i(c)=q^2(s-1)+q^-2∑_c∈∈0.7^*∏_i=1^sS_i(c^-1).
  
  	By Lemma <ref>, it follows that 
  	
      S_i(c^-1)=
      	-ε_i(d_i-1)q,    if a_i^(q^2-1)/d_i=ϵ_ic^(q^2-1)/d_i;
      ε_i  q,    if a_i^(q^2-1)/d_i≠ϵ_ic^(q^2-1)/d_i,
  
  	where ε_i:=(-1)^t/r_i and ϵ_i:=ε_i^(p^r_i+1)/d_i. Since there exists r_i a divisor of t such that d_i|(p^r_i+1), it follows that ϵ_i=-1 if and only if d_i|(p^t+1) and (p^r_i+1)/d_i is odd. Furthermore, if d_i|(p^t+1), then (α^(p^t+1)/2)^(q^2-1)/d_i=ϵ_i. Altogether, we have shown that 
  	
      S_i(c^-1)=ε_i(1-d_i)^θ_d_i(a_i,λ_ic)q,
  
  	where λ_i=α^(p^t+1)/2 if d_i|(p^t+1) and λ_i=1 otherwise. Eq. (<ref>) and <ref> imply that
  	
      N_s(a⃗,d⃗,q^2,0)=q^2(s-1)+q^s-2∑_j=1^q^2-1∏_i=1^sε_i(1-d_i)^θ_d_i(a_i,λ_i α^j),
  
  	proving our result.
  	
  	
  		Assume that d>2. From Theorem <ref>, it can be verified that 
  		
      |N_s(a⃗,d⃗,q^2,0)-q^2(s-1)|≤ q^s-2|∑_m=1^q^2-1∏_d_i|m (1-d_i)|,
  
  		for a⃗ and d⃗ satisfying the hypothesis of Theorem <ref>.
  	
  	
  	
  	Let d=(d_1,…,d_s)∈^s be a s-tuple satisfying the hypothesis of Theorem <ref> and such that d_1,…,d_k are divisors of q-1 and d_k+1,…,d_s are divisors of q+1. Let λ=α^(q+1)/2. By Theorem <ref>, the number of solutions of the diagonal equation
  	
      x^d_1+…+x^d_k+λ x^d_k+1+…+λ x^d_s=0
  
  	attains the bound in Remark <ref>.
  	
  
  
  
   §.§ Proof of Corollary <ref>
  
  	By Theorem <ref>, it follows that
  	
      N_s(a⃗,d⃗,q^2,0)=q^2(s-1)+ q^s-2ε^s∑_j=1^q^2-1∏_i=1^s(1-d_i)^Δ_i,j,
  
  	where ε=(-1)^t/r, Δ_i,j=θ_d_i(a_i,λ_iα^j) and λ_i=α^(p^t+1)/2 if d_i|(p^t+1) and λ_i=1 otherwise. We observe that (p^r+1)|(p^t+1) if and only if t/r is odd. If t/r is odd, then λ_i=1 for all i=1,…,s. If t/r is even, then λ_i=α^(p^t+1)/2 for all i=1,…,s and so Δ_i,j=θ_d_i(a_i,α^(p^t+1)/2+j)=Δ_i,(p^t+1)/2+j. In both cases, we have that
  	
      N_s(a⃗,d⃗,q^2,0)=q^2(s-1)+ q^s-2ε^s∑_j=1^q^2-1∏_i=1^s(1-d_i)^Δ_i,j=q^2(s-1)+ q^s-2ε^s∑_j=1^q^2-1∏_i=1^s(1-d_i)^δ_i,j,
  
  	where δ_i,j:=θ_d_i(a_i,α^j). We observe that d_i|(p^r+1) implies that d_i|(q-ε). Therefore δ_i,j=δ_i,k if j≡ kq-ε and then the assertion of our result follows by Eq. (<ref>) .
  
  
  
  In this section, for l a divisor of q^2-1, let χ_l be a multiplicative character of ^* of order l. The first step in order to prove Theorem <ref> is the following result.
  
  
  	If there exists a divisor r of t such that d_1|(p^r+1) and d_2|(p^r+1), then
  	
      N_2(a⃗,d⃗,q^2,0)=q^2-(q^2-1)(1-l)^θ_l(a_1,a_2)
  
  	and
  	
      N_2(a⃗,d⃗,q^2,c)=q^2-ε q(1-d_1)^θ_d_1(a_1,c)(1-d_2)^θ_d_2(a_2,c)-ε(q-ε)(1-l)^θ_l(a_1,a_2)
  
  	for c≠0, where l:=(d_1,d_2) and ε=(-1)^t/r.
  
  
  
  
   For c∈, let 
  	
      _c={(x,y)∈^2:a_1 x_1^d_1+a_2 x_2^d_2=c}
  
  	be the set of solutions of a_1 x_1^d_1+a_2 x_2^d_2=c. Assume c=0. A pair (x_1,x_2)=(α^i,α^j) is a solution of a_1 x_1^d_1+a_2 x_2^d_2=0 if and only if α^id_1-jd_2=-a_2a_1 and it is easy to verify that this occurs if and only if θ_l(a_1,a_2)=1. If θ_l(a_1,a_2)=0, then (x_1,x_2)=(0,0) is the unique solution of a_1 x^d_1+a_2 y^d_2=0. Otherwise, there exists an integer k such that -a_2a_1=α^lk and then 
  	
      _0=⋃_λ=0^l-1{(α^i,α^j):α^id_1l+jd_2l=α^λq^2-1/lα^k}⋃{(0,0)},
  
  	where the sets in the union are disjoint. Let A_λ={(α^i,α^j):α^id_1l+jd_2l=α^λq^2-1/lα^k}. We note that
  	
      |A_λ|=|{(i,j)∈_(q^2-1):id_1l+jd_2l≡λq^2-1l+kq^2-1}|.
  
  	Let (i_0,j_0) be integers such that i_0 d_1l+j_0d_2l=1. For u∈_(q^2-1), let
  	
      B_u:={(i,j)∈_(q^2-1):id_1l+jd_2l≡ uq^2-1}.
  
  	For u,v∈_(q^2-1), it is easy to verify that the function φ:B_u→ B_v defined by φ:(i,j)↦(i+i_0(v-u),j+j_0(v-u)) is a bijective function from B_u to B_v and so |B_u|=|B_v|. As u and v are arbitrarily taken, it follows that ∑_u |B_u|=(q-1)^2, then |B_u|=q-1 for all u∈. In particular, |A_λ|=|B_λ(q^2-1)/l+k|=q-1 and so |C_0|=l(q-1)+1, proving the first part of our result for the case θ_l(a_1,a_2)=1. 
  	
  	Assume c≠0 and let B_0 the set as defined in Eq. <ref>. We have that
  	
      |_c|   =∑_b_1+b_2=1[1+⋯+χ_d_1^d_1-1(bb_1a_1)][1+⋯+χ_d_2^d_2-1(bb_2a_2)]
         =p^2t+∑_b_1+b_2=1∑_1≤ℓ_i≤ d_i-1χ_d_1^ℓ_1(bb_1a_1)χ_d_2^ℓ_2(bb_2a_2)
         =p^2t+∑_1≤ℓ_i≤ d_i-1
       (ℓ_1,ℓ_2)∉B_0∑_b_1+b_2=1χ_d_1^ℓ_1(bb_1a_1)χ_d_2^ℓ_2(bb_2a_2)+∑_1≤ℓ_i≤ d_i-1
       (ℓ_1,ℓ_2)∈ B_0∑_b_1+b_2=1χ_d_1^ℓ_1(bb_1a_1)χ_d_2^ℓ_2(bb_2a_2)
         =p^2t+ε p^t∑_1≤ℓ_i≤ d_i-1
       (ℓ_1,ℓ_2)∉B_0χ_d_1^ℓ_2(ba_1)χ_d_2^ℓ_2(ba_2)-∑_1≤ℓ_i≤ d_i-1
       (ℓ_1,ℓ_2)∈ B_0χ_d_1^ℓ_1(ba_1)χ_d_2^ℓ_2(ba_2).
  
  	The last equality follows from Lemma <ref> and entails that
  	
      |_c|   =p^2t+ε p^t∑_1≤ℓ_i,≤ d_i-1χ_d_1^ℓ_2(ba_1)χ_d_2^ℓ_2(ba_2)-(ε p^t-1)∑_1≤ℓ_i,≤ d_i-1
       (ℓ_1,ℓ_2)∈ B_0χ_d_1^ℓ_1(ba_1)χ_d_2^ℓ_2(ba_2)
         =q^2+ε q(1-d_1)^θ_d_1(a_1,b)(1-d_2)^θ_d_2(a_2,b)-(ε p^t-1)∑_(ℓ_1,ℓ_2)∈Λχ_d_1^ℓ_1(ba_1)χ_d_2^ℓ_2(ba_2),
  
  	where Λ:=B_0∩{(ℓ_1,ℓ_2):1≤ℓ_i≤ d_i-1 for i=1,2}. A direct computation shows that
  	
      Λ={(nd_1l,-nd_2l):1≤ n≤ l-1}
  
  	and therefore
  	
      ∑_(ℓ_1,ℓ_2)∈Λχ_d_1^ℓ_1(ba_1)χ_d_2^ℓ_2(ba_2)=∑_n=1^d-1χ_l^n(a_2a_1)=
      	l-1,    if θ_l(a_1,a_2)=1;
      
      	-1,    if θ_l(a_1,a_2)=0.
  
  	Our result follows from Eq. (<ref>) and (<ref>).
  
  The following definitions will be useful in the proof of our results.
   We define the following:
  	
  		
    * For f∈[x_1…,x_s], let 
  		
      N(f(x_1,…,x_s)=0)=|{(x_1,…,x_s)∈^s:f(x_1,…,x_s)=0}|,
   the number of solutions of the equation f(x_1,…,x_s)=0 over .
  		
    * For f∈[x,y], let 
      N_y^*(f(x,y)=0)=|{(x,y)∈×^*:f(x,y)=0}|,
   the number of solutions of the equation f(x,y)=0 with y≠0.
  	
  
  
  
  The following result is straightforward.
  
  	Let a,b∈ and let α be a primitive element of . Let d_1 and d_2 be divisors of q^2-1. Then
  	
      d_2^-1· N_y^*(a_1x^d_1+α^j y^d_2=b)=∑_i=1^(q-1)/d_2N(a_1x^d_1=b-α^j+id_2)
  
  
  
  
  
  	If Theorem <ref> holds for N_s(a⃗,d⃗,q^2,b) for all b∈, then it also holds for N_s+1(a⃗,d⃗,q^2,0).
  
  
  
  	We observe that
  	
      N_s+1(a⃗,d⃗,q^2,0)   =N(a_1 x_1^d_1+⋯+a_s+1 x_s+1^d_s+1=0)
         =N_s(a⃗,d⃗,q^2,0)+∑_k=1^q^2-1N(a_1 x_1^d_1+⋯+a_s x_s^d_s=-a_s+1 (α^k)^d_s+1)
         =N_s(a⃗,d⃗,q^2,0)+∑_k=1^q^2-1N_s(-a_s+1α^kd_s+1)
         =N_s(a⃗,d⃗,q^2,0)+d_s+1∑_k=1^mN_s(-a_s+1α^kd_s+1),
  
  	where m:=q^2-1d_s+1. Set S_j=∏_i=1^s(1-d_i)^ν_i(α^j) and S=∑_j=1^q-ε∏_i=1^s(1-d_i)^δ_i,j and let k_0 be an integer such that a_s+1=α^k_0. The hypothesis entails that the equality in (<ref>) for N_s+1(0) becomes
  	
      N_s+1(a⃗,d⃗,q^2,0)   =q^2(s-1)+ε^s q^s-2(q+ε)S+d_s+1∑_k=1^m[q^2(s-1)-ε^s+1q^s-2(qS_k_0+kd_s+1-S)]
         =q^2s+ε^sq^s-2S[(q+ε)+(q^2-1)ε]-d_s+1∑_k=1^mε^s+1q^s-2qS_k_0+kd_s+1
         =q^2s+ε^s+1q^s-1[(q+ε)S- d_s+1∑_k=1^mS_k_0+kd_s+1].
  
  	From the definition of ν_i,δ_i,j, S and S_i, it follows that S=∑_j=1^q-ε S_j and ν_i(α^j)=δ_i,j. Furthermore, we have that S_i=S_j if i≡ jq-ϵ and therefore 
  	
      (q+ε)S- d_s+1∑_j=1^mS_j_0+jd_s+1   =(q+ε)∑_j=1^q-ε S_j- ∑_k=1^md_s+1S_k_0+kd_s+1
         =(q+ε)∑_j=1^q-ε S_j- q^2-1q-ε∑_k=1^q-εd_s+1d_s+1S_k_0+kd_s+1
         =(q+ε)[∑_j=1^q-ε S_j- ∑_j=1^q-εS_j(1-(1-d_s+1)^θ_d_s+1(a_s+1,α^j))]
         =(q+ε)∑_j=1^q-ε∏_i=1^s(1-d_i)^ν_i(α^j)(1-d_s+1)^θ_d_s+1(a_s+1,α^j)
         =(q+ε)∑_j=1^q-ε∏_i=1^s+1(1-d_i)^δ_i,j.
  
  	Our result follows from Eq. (<ref>) and (<ref>).
  
  
  
  The following lemma will be important in the proof of Theorem <ref>. 
  
   Let ε∈{± 1} and d,d_1,…,d_s be integers such that d|(q-ε) and d_i|(q-ε) for all i=1,…,s.  
  	
  		
    *  For b∈^*, we have the following relation:
  		
      ∑_j=1^q-ε (1-d)^θ_d(α^j,b)=0.
  
  		
    *  Let M_s(a⃗,d⃗,q^2,α^j) denote the right-hand expression in Eq. (<ref>) of Theorem <ref>. Then
  		
      ∑_j=1^q-ε M_s(a⃗,d⃗,q^2,α^j)=q^2(s-1)(q-ε)-ε^sq^s-2∑_j=1^q-ε∏_i=1^s(1-d_i)^δ_i,j.
  
  	
  
  
  
  	We observe that 
  	
      -(1-d)^θ_d(α^j,b)=χ_d(α^j/b)+…+χ_d^d-1(α^j/b).
   Therefore, for  b∈^*, it follows that
  	
      -∑_j=1^q-ε (1-d)^θ_d(α^j,b)=∑_j=1^q-ε[χ_d(α^j/b)+…+χ_d^d-1(α^j/b)]=0,
  
  	which proves item <ref>.
  	For an integer s≥ 2, it follows that
  	
      ∑_j=1^q-ε M_s(a⃗,d⃗,q^2,α^j)   =(q-ε)(q^2s-2-∑_j=1^q-ε∏_i=1^s(1-d_i)^δ_i,j)-ε^sq^s-2∑_j=1^q-ε∏_i=1^s(1-d_i)^δ_i,j
         = q^2(s-1)(q-ε)-ε^sq^s-2∑_j=1^q-ε∏_i=1^s(1-d_i)^δ_i,j,
  
  	proving item <ref>.
  
  
  From the previous results we are able to prove our main result.
  
  
  
   §.§ Proof of Theorem <ref>
    We proceed by induction on s. We make an abuse of language using a⃗ and d⃗ for all k≤ s; meaning that, for each k, we use only the first k entries of a⃗ and d⃗. The base case of the induction is s = 2, which we prove as follows.
  
  
  
    §.§.§ The case s=2
   By Proposition <ref>, we only need to show that 
  
      (1-l)^θ_l(a_1,a_2)=-(q-ε)^-1∑_j=1^q-ε(1-d_1)^θ_d_1(a_1,α^j)(1-d_2)^θ_d_2(a_2,α^j),
  
  where l=(d_1,d_2). By the Inclusion and Exclusion Principle, the sum in Eq. (<ref>) is equal to
  
      (1-d_1)(1-d_2)n+∑_i=1^2(1-d_i)(q-εd_i-n)+(q-ε-(q-εd_1-n)-(q-εd_2-n)-n)
         =d_1d_2n-(q-ε),
  
  where n:=|{1≤ j≤ q-ε:θ_d_1(a_1,α^j)=θ_d_2(a_2,α^j)=1}|.
  We split the proof for Eq. (<ref>) into two cases:
  
  	
    * The case θ_l(a_1,a_2)=0. Since a_1^(q^2-1)/l≠ a_2^(q^2-1)/l, it follows that there exists no j such that a_1^(q^2-1)/d_1=(α^j)^(q^2-1)/d_1 and a_2^(q^2-1)/d_2=(α^j)^(q^2-1)/d_2 and then n=0. In this case, d_1d_2n-(q-ε)=-(q-ε);
  	
    * The case θ_l(a_1,a_2)=1. Let j_1 and j_2 be integers such that a_1=α^j_1 and a_2=α^j_2. Since a_1^(q^2-1)/l= a_2^(q^2-1)/l, it follows that j_1≡ j_2l and this relation entails that
  	
      {1≤ j≤ q-ε:θ_d_i(a_i,α^j)=1 for i=1,2}={k(d_1,d_2):1≤ k≤q-ε(d_1,d_2)}
  
  	and then n=q-ε(d_1,d_2). In this case, d_1d_2n-(q-ε)=(q-ε)(l-1);
  
  Altogether, we have shown that d_1d_2n-(q-ε)=-(q-ε)(1-l)^θ_l(a_1,a_2) and then
  
      (q-ε)^-1∑_j=1^q-ε(1-d_1)^θ_d_1(a_1,α^j)(1-d_2)^θ_d_2(a_2,α^j)=-(1-l)^θ_l(a_1,a_2),
  
  therefore our result follows for the case s=2.
  
  
  
    §.§.§ Induction Hypothesis
   Suppose that the result holds for N_s(a⃗,d⃗,q^2,b) with s≤ k and b∈^*. We observe that 
  
      N_k+1(a⃗,d⃗,q^2,b)
         =∑_c∈ N(a_1 x_1^d_1+⋯+a_k x_k^d_k=c)N(b-a_k+1x_k+1^d_k+1=c)
         =∑_c∈ N_k(a⃗,d⃗,q^2,c)N(b-a_k+1x_k+1^d_k+1=c).
  
  Along the proof, we denote N_k(a⃗,d⃗,q^2,c) by M_c. Let θ_b=θ_d_k+1(a_k+1,b) and C_0=(1-(1-d_k+1)^θ_b)M_0. Since M_α^i=M_α^j if i≡ jq-ε, it follows that
  
      N_k+1(a⃗,d⃗,q^2,b)   =N(b=a_k+1x_k+1^d_k+1)M_0 +∑_j=1^q-ε M_α^j∑_i≡ jN(b-a_k+1x_k+1^d_k+1=α^i)
         =(1-(1-d_k+1)^θ_b)M_0+∑_j=1^q-ε M_α^j∑_i≡ jN(b-a_k+1x_k+1^d_k+1=α^i)
         =C_0+∑_j=1^q-ε(M_α^j/q-ε)N_y^*(b-a_k+1x_k+1^d_k+1=α^j y^q-ε),
  
  where the last equality follows from Lemma <ref> and N_y^*(b-a_k+1x_k+1^d_k+1=α^j y^q-ε) is defined as in Definition <ref>. Let M_j^*=N_y^*(b-a_k+1x_k+1^d_k+1=α^j y^q-ε) for 1≤ j≤ q-ε. Let B be a positive integer such that b=α^B, where B=(q-ε)ℓ+m for some non-negative integer ℓ and some m< q-ε. Proposition <ref> entails that
  
      M_j^*=    q^2-1+(1-ε q)(1-d_k+1)^θ_b-ε(q-ε)(1-d_k+1)^θ_d_k+1(α^j,b), if j≠ m;
         q^2-1+(ε q-1)(q-1)(1-d_k+1)^θ_b-ε(q-ε)(1-d_k+1)^θ_d_k+1(α^j,b), if j=m.
  
  Let θ_j=θ_d_k+1(α^j,b) for 1≤ j≤ q-ε. Then from Eq. (<ref>) it follows that
  
      N_k+1(a⃗,d⃗,q^2,b)=C_0+∑_j=1^q-εM_α^j(q^2-1+(1-ε q)(1-d_k+1)^θ_b-ε(q-ε)(1-d_k+1)^θ_j)q-ε+ε q(1-d_k+1)^θ_bM_b.
  
  Set S_j=∏_i=1^k(1-d_i)^ν_i(α^j) and S=∑_j=1^q-ε∏_i=1^k(1-d_i)^δ_i,j. By the induction hypothesis and Lemma <ref>, the last equality becomes
  
  
      N_k+1(a⃗,d⃗,q^2,b)= C_0+C_1+ε^kq^k-1∑_j=1^q-εS_j(1-d_k+1)^θ_j+C_2.
  
  where C_1:=(q^2(k-1)(q-ε)-ε^kq^k-2S)(q^2-1+(1-ε q)(1-d_k+1)^θ_b)q-ε and C_2:=ε q(1-d_k+1)^θ_bM_b. We recall that the values of M_b and M_0 are known (by the induction hypothesis and Corollary <ref>) and so a straightforward computation shows that C_0+C_2 equals
  
      q^2(k-1)+ε^k q^k-2(q+ε)S-(1-d_k+1)^θ_b((1-ε q)q^2(k-1)+ε^k+1q^k-2S+ε^k q^k∏_i=1^k(1-d_i)^ν_i(b))
  
  
  By Eq. (<ref>) and (<ref>), it follows that
  
      N_k+1(a⃗,d⃗,q^2,b)   =q^2k-ε^k q^k-1(q(1-d_k+1)^θ_b∏_i=1^k(1-d_i)^ν_i(b)-∑_j=1^q-εS_j(1-d_k+1)^θ_j)
         =q^2k-ε^k q^k-1(q∏_i=1^k+1(1-d_i)^ν_i(b)-∑_j=1^q-ε∏_i=1^k+1(1-d_i)^δ_i,j),
  
  which proves the result for s=k+1.
  
  
  Let ℱ(n,m) be the projective Fermat type curve given by the affine equation ax^n+by^m=c. As a direct consequence Theorem <ref>, we have the number of points on ℱ(n,m) in the case where there exists a divisor r of t such that n and m divide p^r+1. In fact, Corollary <ref> follows easily from Theorem <ref> by taking account the points at the infinity. From Example 6.3.3 in <cit.>, it follows that the genus g of ℱ(n,m) is given by
  
      g=(n-1)(m-1)+1-(n,m)/2.
  
   Corollary <ref> provides conditions in which the number of -rational points on ℱ(n,m) attains the Hasse-Weil bound. In fact, the characterization of maximal and minimal varieties is a problem that has been extensively studied in the last few decades. In Section <ref> we will study this problem in the case where the variety is given by a diagonal equation. Before doing that, we will study the number of solutions attaining Weil's bound in the affine space.
  
  
  
  § ON MAXIMALITY AND MINIMALITY
  
  
  As a consequence of Theorem <ref>, we get an explicit formula for the number I(d_1,…,d_s) defined in the introduction. 
  
  	Let r be a positive integer and let p be a prime. Let d_1,…,d_s be positive integers such that d_i|(p^r+1). By Theorem 2.9 in <cit.> and Theorem <ref>, it follows that
  	
      I(d_1,…,d_s)=(-1)^sp^r+1∑_j=1^p^r+1∏_i=1^s(1-d_i)^δ_i,j,
  
  	where δ_i,j=1 if d_i|j and δ_i,j=0 otherwise. Therefore
  	
      I(d_1,…,d_s)=(-1)^sp^r+1∑_m=1^p^r+1∏_d_i|m (1-d_i).
  
  
  
  Indeed, the formula in Remark <ref> is also true in a more general setting. 
  
  	Let d_1,…,d_s be positive integers. Then
  	
      I(d_1,…,d_s)=(-1)^sD∑_m=1^D∏_d_i|m (1-d_i),
  
  	where D:=(d_1,…,d_s). 
  
  
  
  	A well-known formula for I(d_1,…,d_s) (see p.293 of <cit.>) is the following:
  	
      I(d_1,…,d_s)=(-1)^s+(-1)^s∑_r=1^s (-1)^r∑_1≤ i_1<…<i_r≤ sd_i_1… d_i_r/(d_i_1,…,d_i_r).
  
  	Let i_1,…,i_r be integers such that 1≤ i_1<…<i_r≤ s. The product d_i_1⋯ d_i_r appears in an expansion of a product in (<ref>) whenever d_i_j|m for all j=1,…,r, which occurs D(d_i_1,…,d_i_r) times, since 1≤ m≤ D. Therefore the expressions in (<ref>) and (<ref>) coincide, proving our result.
  
  
  From here, Lemma <ref> is a simple employment of Lemma <ref>. The formula in Lemma <ref> had already been established in Lemma 9 of <cit.> with a different proof.   Most notably, sufficient and necessary conditions in which I(d_1,…,d_s)=0 were studied by Sun and Wan <cit.>, where the authors state the following result.
  
  <cit.>
  	Let s>2 be an integer and let d_1,…,d_s be positive integers. Then I(d_1,…,d_s)=0 if and only if one of the following holds:
  	
  		
    * for some d_i, (d_i,d_1… d_s/d_i)=1, or
  		
    * if d_i_1,…,d_i_k (1≤ i_1<… i_k≤ s) is the set of all even integers among {d_1,…,d_s}, then 2∤ k, d_i_1/2,…,d_i_k/2 are pairwise prime, and d_i_jis prime to any odd number in {d_1,…,d_s}  (j=1,…,k).
  	
  	
  
  
  
  
   In this section we will work on diagonal equations over , where q=p^t. For l a divisor of q-1, let χ_l be a multiplicative character of ^* of order l. In order to bound the number of solutions of diagonal equations, let us recall a well-known way to compute such number. 
  
      N_s(a⃗,d⃗,q,b)   =∑_b_1+…+b_s=b ∏_i=1^s[1+χ_d_i(a_i^-1b_i)+…+χ^d_i-1_d_i(a_i^-1b_i)]
         =q^s-1+∑_0< ℓ_i<d_iχ_d_1^ℓ_1(a_1^-1)…χ_d_s^ℓ_s(a_s^-1)J_q(χ_d_1^ℓ_1,…,χ_d_s^ℓ_s,b).
  
  From here, since we want to estimate N_s(a⃗,d⃗,q,b), an interesting problem is to find necessary and sufficient conditions for χ_1^ℓ_1(a_1^-1)…χ_s^ℓ_s(a_s^-1)J_q(χ_1^ℓ_1,…,χ_s^ℓ_s,b) being real. In order to do that, we use the concept of purity of Jacobi sums. A Jacobi sums is said to be pure if some non-zero integral power of it is real. The purity of Jacobi sums have been extensively studied <cit.>. The following result concerning this concept will be useful in the proof of our results. From now, we restrict ourselves to the case d_1=…=d_s.
  
  <cit.>
  	Let s≥ 2 be an integer, d≥ 3 be a divisor of q-1 and let
  	
      𝒰_s(d)={(ℓ_1,…,ℓ_s)∈[1,d-1]^s:ℓ_1+…+ℓ_s≢0d}.
  
  	If s=3, assume that d>3. If the Jacobi sum J_q(χ_d^ℓ_1,…,χ_d^ℓ_s,1) is pure for all s-tuples (ℓ_1,…,ℓ_s)∈𝒰_s(d), then there exists an integer r such that d|(p^r+1). 
  
  
  
  
  
   §.§ Proof of Theorem <ref>
  
   Assume that b=0. The bound for |N_s(a⃗,d⃗,q,0)-q^s-1| is a direct consequence of Weil's bound <cit.> and Remark <ref> entails that 
      I(d_1,…,d_s)=(-1)^sq-1∑_m=1^q-1∏_d_i|m (1-d_i).
   
  Assume that b≠0, let B=[1,d_1-1]×…×[1,d_s-1] and let 𝒲={(ℓ_1,…,ℓ_s)∈ B:ℓ_1d_1+…+ℓ_sd_s∉}. By Eq. (<ref>) and Proposition <ref>, we have that
  
  
      |N_s(a⃗,d⃗,q,b)-q^s-1|≤ q^(s-1)/2·|𝒲|+q^(s-2)/2·|𝒲^c|,
  
  where 𝒲^c:={(ℓ_1,…,ℓ_s)∈ B:ℓ_1d_1+…+ℓ_sd_s∉}. Since |𝒲^c|=I(d_1,…,d_s), it follows that
  
      |N_s(a⃗,d⃗,q,b)-q^s-1|≤ q^(s-1)/2(∏_i=1^s(d_i-1)-I(d_1,…,d_s))+q^(s-2)/2I(d_1,…,d_s),
  
  which yields  our bound for the case b=0. Let us prove the second part of our theorem. Assume that d_1=…= d_s=d> 2 and l
  
  
  Let 𝒰_s(d) be as defined in Lemma <ref>. Suppose that b=0, s≥ 3 and assume that the bound <ref> is attained. By Eq. (<ref>) and Proposition <ref>, we have that
  
      N_s(a⃗,d⃗,q,0)=q^s-1+∑_0< ℓ_i<d
       (ℓ_1,…,ℓ_s)∈𝒰_s^c(d)χ_d^ℓ_1(a_1^-1)…χ_d^ℓ_s(a_s^-1)J_q(χ_d^ℓ_1,…,χ_d^ℓ_s,0),
  
  where 𝒰_s^c(d):={(ℓ_1,…,ℓ_s)∈[1,d-1]^s:ℓ_1+…+ℓ_s≡ 0d}. Moreover, if (ℓ_1,…,ℓ_s)∈𝒰_s^c(d), then
  
      J_q(χ_d^ℓ_1,…,χ_d^ℓ_s,0)   =∑_b_1+…+b_s=0χ_d^ℓ_1(b_1)…χ_d^ℓ_s(b_s)
         =(q-1)∑_b_1+…+b_s-1=1χ_d^ℓ_1(b_1)…χ_d^ℓ_s-1(b_s-1)
         =(q-1)J_q(χ_d^ℓ_1,…,χ_d^ℓ_s-1,1).
  
  We recall that |𝒰_s^c(d)|=I(d,…,d) and that we are assuming that the bound <ref> is attained. Furthermore, by Lemma <ref>, it follows that I(d,…,d)=0 if and only if d=2 and s is odd. Therefore, since we are under the assumption d>2, it follows from Eq. (<ref>) and (<ref>) that 
  
      χ_d^ℓ_1(a_1^-1)…χ_d^ℓ_s(a_s^-1)J_q(χ_d^ℓ_1,…,χ_d^ℓ_s-1,1)∈{± q^(s-2)/2}
  
  for all (ℓ_1,…,ℓ_s)∈𝒰_s^c(d) or, equivalently, for all (ℓ_1,…,ℓ_s-1)∈𝒰_s-1(d). In particular, J_q(χ_d^ℓ_1,…,χ_d^ℓ_s-1,1) is pure for all (ℓ_1,…,ℓ_s-1)∈𝒰_s-1(d) and so, by Lemma <ref>, it follows that there exists an integer r such that d|(p^r+1). Assume that r is the smallest integer such that d|(p^r+1). Then 2r is the order of p in the multiplicative group _d^×. Since q≡ 1d, with q=p^n, it follows that 2r|n. In particular, n=2t for some t multiple of r. Therefore we are under the hypothesis of Theorem <ref> and so
  	
      N_s(a⃗,d⃗,q,0)=q^2(s-1)+ε^s q^s-2(q+ε)∑_j=1^q-ε∏_i=1^s(1-d)^δ_i,j,
  
  where ε=(-1)^t/r. It is direct to verify that |(-1)^s(q-ε)^-1∑_j=1^q-ε∏_i=1^s(1-d)^δ_i,j|=|I(d,…,d)| if and only if χ_d(a_1)=…=χ_d(a_s), proving our result. Moreover, 
  
      (-1)^s(q-ε)^-1∑_j=1^q-ε∏_i=1^s(1-d)^δ_i,j=-I(d,…,d)
  
   if and only if ε=1 and s is odd, which occurs if and only if t/r is even and s is odd. The converse follows from Theorem <ref>. 
  
   The case b≠ 0 can be obtained similarly to the case b=0.Theorem <ref> does not consider the case where s=2 and b=0. For s=2 only the upper bound can be attained, as it is shown in the following remark.
   
  
  	 If s=2 and b=0, then I(d,d)=d-1 and
  	
      J_q(χ_d^ℓ_1,χ_d^ℓ_2,0)=∑_b_1∈χ_d(b_1^ℓ_1(-b_1)^ℓ_2)=
      	
      	0,   if d∤(ℓ_1+ℓ_2);
      
      	(q-1)χ_d((-1)^ℓ_2),   if d|(ℓ_1+ℓ_2).
  
  	Furthermore, d|(ℓ_1+ℓ_2) if and only if ℓ_1=d-ℓ_2 with ℓ_2=1,…,d-1. Therefore, by Eq. (<ref>) we have that
  	
      N_2(a⃗,d⃗,q,0)   =q+∑_ℓ_2=1^d-1χ_d^-ℓ_2(a_1^-1)χ_d^ℓ_2(a_2^-1)(q-1)χ_d((-1)^ℓ_2)
         =q+(q-1)∑_ℓ_2=1^d-1χ_d^-ℓ_2(a_1^-1)χ_d^ℓ_2(-a_2^-1)
  
  	and then the bound <ref> is attained if and only if χ_d(-a_1a_2^-1)=1. Therefore the bound in Theorem <ref> is attained only if χ_d(a_1)=χ_d(-a_2) and, in this case, the upper bound is attained. 
  
  
  
  
  
  
  § DIAGONAL EQUATIONS IN THE PROJECTIVE SPACE
  
  Let f∈[x_1,…,x_s] be a homogeneous polynomial of degree d and let V be the projective variety defined by f. Let V() be the number of points of V over . If V is absolutely irreducible and non-singular, then the Weil-Deligne bound states that 
  
      |V()-q^s-1-1/q-1|≤ q^(s-2)/2B(d,s),
  
  where B(d,s)=(d-1)^s+(-1)^s(d-1)d. In the case where s=3, this bound is the well-known Hasse-Weil bound. Projective varieties attaining the Weil-Deligne bound are called maximal and minimal. Let f(x_1,…,x_s)=a_1 x_1^d+…+a_s x_s^d and let V_s,d be the variety defined by f(x_1,…,x_s)=0. It is easy to verify that 
  
      (q-1)V_s,d()+1=N_s(a⃗,d⃗,q,0)
  
  where a⃗=(a_1,…,a_s) and d⃗=(d,…,d). Corollary <ref> provides the number of projective points on V_s,d for a family of polynomials f satisfying some conditions under their degree. In the following result we employ Corollary <ref> and Theorem <ref>  in order to present conditions under f in which the Weil-Deligne bound is attained.
  
  
  	Assume that s≥3 and d>2 are integers such that (s,d)≠(4,3) and let V_s,d be the projective variety defined by the equation a_1 x_1^d+… +a_s x_s^d=0. Then the following hold.
  	
  		
    * V_s,d is maximal over  if and only if 
  		
  			
    * q=p^2t for some positive integer t;
  			
    * there exists a divisor r of t such that d|(p^r+1);
  			
    * either t/r is odd or s is even;
  			
    * χ_d(a_1)=…=χ_d(a_s).
  		
  		
    * V_s,d is minimal over _q^2 if and only if 
  		
  			
    * q=p^2t for some positive integer t;
  			
    * t is even and there exists a divisor r of t/2 such that d|(p^r+1);
  			
    * s is odd;
  			
    * χ_d(a_1)=…=χ_d(a_s).
  		
  	
    
  
  Corollary <ref> is the particular case s=3 of Corollary <ref>.
  
  
  
  
  
  § FINAL COMMENTS AND OPEN PROBLEMS
  
  
  This paper provided a counting on the number of solutions of diagonal equations of the form a_1 x_1^d_1+…+a_s x_s^d_s=b satisfying conditions on the exponents. Our counting results extend the main result of <cit.> and some results of <cit.>. In the general situation where no conditions are imposed under the exponents, an explicit formula for such number is unknown. Indeed, the problem of counting solutions of diagonal equations in a general setting is still an open problem. Many authors have studied particular cases in the last few years. For example, complicated explicit formulas for the case where d_1=…=d_s∈{3,4} and q=p are presented in Chapter 10 of <cit.>. Still in the small degree case, in <cit.> the authors studied the number of solutions of diagonal equations in the case where s=2 and d_i∈{2,3,4,6} are suitably chosen. From here, we pose the following open problem.
  
  
  	Finding an explicit formula for N_s(a⃗,d⃗,q^2,b) (with b≠0) for exponents satisfying the conditions of Theorem <ref>.
  
  
  In Section <ref> we studied the purity of the Jacobi sums arising from the counting of solutions of diagonal equations. In fact, this sums are the eigenvalues of the
  endomorphism of the ℓ-adic étale cohomology group induced by the Frobenius morphism of Fermat type varieties given by diagonal equations. When all eigenvalues are pure Jacobi sums, the variety is called supersingular. Supersingular Fermat varieties was studied by Shioda and Katsura <cit.> and Yui <cit.>. From here, an interesting question is the following. 
  
  
  	What are the conditions on the exponents in which all Jacobi sums arising from the counting of solutions of (<ref>) are pure?
  
  This is an unsolved problem even in the case s=2.
  
  
  
  § ACKNOWLEDGMENTS
  
  
  I am grateful to Fabio Enrique Brochero Martínez for his helpful suggestions and I thank him for his useful comments. This study was financed in part by the Coordenação de Aperfeiçoamento de Pessoal de Nível Superior - Brasil (CAPES) - Finance Code 001. 
  
  abbrv
  
  
  
  