Translation:Summatio quarandum serierum singularium

1.
Among the remarkable truths to which the theory of the division of the circle has opened the way, the summation proposed in Disquisitiones Arithmeticae art. 356 claims not the last place for itself, not only because of its particular elegance and wonderful fecundity, which will be explained more fully on another occasion, but also because its rigorous demonstration is not burdened by uncommon difficulties. Of course, this should have been expected, since the difficulties do not fall so much into the theorem itself, but rather into a limitation of the theorem, which was then ignored, but whose demonstration is immediately available and easily derived from the theory explained in the present work. The theorem is presented there in the following form. Supposing $n$ to be a prime number, denoting all of the quadratic residues modulo $n$  between the limits 1 and $n-1$  (incl.) indefinitely by $a,$  denoting all the non-residues between the same limits by $b,$  denoting by $\omega$  the arc $\frac{360^{\circ}}{n},$  and denoting by $k$  any fixed integer not divisible by $n,$  we have


 * I. for values of $n$ which are of the form $4m+1,$

$$\begin{aligned} \Sigma \cos a k \omega & =-\frac{1}{2} \pm \frac{1}{2} \surd{n} \\ \Sigma \cos b k \omega & =-\frac{1}{2} \mp \frac{1}{2} \surd{n}, \text{ and therefore } \\ \Sigma \cos a k \omega -\Sigma \cos b k \omega & = \pm \surd{n} \\ \Sigma \sin a k \omega & =0 \\ \Sigma \sin b k \omega & =0 \end{aligned}$$


 * II. for values of $n$ which are of the form $4m+3,$

$$\begin{aligned} \Sigma \cos a k \omega & =-\frac{1}{2} \\ \Sigma \cos b k \omega & =-\frac{1}{2} \\ \Sigma \sin a k \omega & = \pm \frac{1}{2} \surd{n} \\ \Sigma \sin b k \omega & =\mp \frac{1}{2} \surd{n} \\ \Sigma \sin a k \omega -\Sigma \sin b k \omega & = \pm \surd{n} \end{aligned}$$

These sums have been demonstrated with all rigor in loc. cit. , and the only remaining difficulty is in determining the sign to be assigned to the radical quantity. It can easily be shown that this sign depends only on the number $k,$ that the same sign must hold for all values of $k$  that are quadratic residues modulo $n,$  and that the opposite sign must hold for all values of $k$  that are quadratic non-residues modulo $n.$  Therefore, the whole matter depends upon the case $k=1,$  and it is evident that as soon as the sign for this value is known, the signs for all other values of $k$  will immediately follow. But in this very question, which at first glance seems to be among the easier ones, we encounter unforeseen difficulties, and the method with which we have made progress so far completely denies us further help.

2.
It would not be out of place, before proceeding further, to work out some examples of our summation by numerical calculation. However, it will be convenient to preface this with some general observations.


 * I. If in the case where $n$ is a prime number of the form $4m+1,$  all quadratic residues of $n$  lying between 1 and $\frac{1}{2}(n-1)$  (inclusive) are denoted indefinitely by $a^{\prime},$  and all non-residues between the same limits are denoted by $b^{\prime},$  then certainly all $n-a^{\prime}$  are included in $a,$  and all $n-b^{\prime}$  are included in $b.$  Therefore, since $a^{\prime},$  $b^{\prime},$  $n-a^{\prime},$  $n-b^{\prime}$  together clearly exhaust the entire set of numbers $1,$  $2,$  $3 \ldots n-1,$  all $a^{\prime}$  together with all $n-a^{\prime}$  include all $a,$  and likewise all $b^{\prime}$  together with all $n-b^{\prime}$  include all $b.$  Hence we have

$$\begin{aligned} \Sigma \cos ak\omega &= \Sigma \cos a^{\prime}k\omega + \Sigma \cos (n-a^{\prime})k\omega \\ \Sigma \cos bk\omega &= \Sigma \cos b^{\prime}k\omega + \Sigma \cos (n-b^{\prime})k\omega \\ \Sigma \sin ak\omega &= \Sigma \sin a^{\prime}k\omega + \Sigma \sin (n-a^{\prime})k\omega \\ \Sigma \sin bk\omega &= \Sigma \sin b^{\prime}k\omega + \Sigma \sin (n-b^{\prime})k\omega \end{aligned}$$


 * Now, considering that $\cos (n-a^{\prime})k\omega = \cos a^{\prime}k\omega,$ $\cos (n-b^{\prime})k\omega = \cos b^{\prime}k\omega,$  $\sin (n-a^{\prime})k\omega = -\sin a^{\prime}k\omega,$  $\sin (n-b^{\prime})k\omega = -\sin b^{\prime}k\omega,$  it is clear that

$$\begin{aligned} \Sigma \sin ak\omega &= \Sigma \sin a^{\prime}k\omega - \Sigma \sin a^{\prime}k\omega = 0 \\ \Sigma \sin bk\omega &= \Sigma \sin b^{\prime}k\omega - \Sigma \sin b^{\prime}k\omega = 0 \end{aligned}$$


 * The summation of cosines, on the other hand, takes on the form

$$\begin{aligned} \Sigma \cos ak\omega &= 2 \Sigma \cos a^{\prime}k\omega \\ \Sigma \cos bk\omega &= 2 \Sigma \cos b^{\prime}k\omega \end{aligned}$$


 * from which it follows that

$$\begin{aligned} 1 + 4\Sigma \cos a^{\prime}k\omega &= \pm \surd{n} \\ 1 + 4\Sigma \cos b^{\prime}k\omega &= \mp \surd{n} \\ 2 \Sigma \cos a^{\prime}k\omega - 2 \Sigma \cos b^{\prime}k\omega &= \pm \surd{n} \end{aligned}$$


 * II. In the case where $n$ is of the form $4m+3,$  the complement of any quadratic residue $a$  modulo $n$  will be a quadratic non-residue, and the complement of any quadratic non-residue $b$  will be a quadratic residue; therefore, all $n-a$  will coincide with all $b,$  and all $n-b$  will coincide with all $a.$  Hence we conclude

$$\Sigma \cos a k \omega=\Sigma \cos (n-b) k \omega=\Sigma \cos b k \omega$$


 * and so, since $a$ and $b$  together fill out all the numbers $1,$  $2,$  $3 \ldots n-1,$  and therefore

$$\Sigma \cos a k \omega+\Sigma \cos b k \omega=\cos k \omega+\cos 2 k \omega+\cos 3 k \omega+\text{etc.}+\cos (n-1) k \omega=-1,$$


 * the summations

$$\begin{aligned} & \Sigma \cos a k \omega=-\frac{1}{2} \\ & \Sigma \cos b k \omega=-\frac{1}{2} \end{aligned}$$


 * are automatically evident. Similarly,

$$\Sigma \sin a k \omega=\Sigma \sin (n-b) k \omega=-\Sigma \sin b k \omega$$


 * and from this it is clear how the summations

$$\begin{aligned} & 2\Sigma \sin a k \omega= \pm \surd{n} \\ & 2\Sigma \sin b k \omega= \mp \surd{n} \end{aligned}$$


 * depend upon each other.

3.
Now here are some examples of numerical computations:


 * I. For $n=5,$ there is one value of $a^{\prime},$  namely $a^{\prime}=1,$  and one value of $b^{\prime},$  namely $b^{\prime}=2;$  and these are

$$\cos \omega=+0{,}3090169944 \qquad \qquad \cos 2 \omega=-0{,}8090169944$$


 * Hence $1+4 \cos \omega=+\surd{5},$ $1+4 \cos 2 \omega=-\surd{5}.$


 * II. For $n=13,$ there are three values of $a^{\prime},$  namely $1,$  $3,$  $4,$  and an equal number of values of $b^{\prime},$  namely $2,$  $5,$  $6,$  from which we compute

$$\begin{array}{r} \cos \omega\phantom{1} = + 0{,}8854560257 \\ \cos 3\omega = + 0{,}1205366803 \\ \cos 4 \omega = - 0{,}3546048870 \\ \hline \text{Sum} = + 0{,}6513878190 \end{array} \qquad \qquad \begin{array}{r} \cos 2\omega = + 0{,}5680647467 \\ \cos 5\omega = - 0{,}7485107482 \\ \cos 6 \omega = - 0{,}9709418174 \\ \hline \text{Sum} = - 1{,}1513878189 \end{array}$$


 * Hence $1+4 \Sigma \cos a^{\prime} \omega=+\surd{13},$ $1+4 \Sigma \cos b^{\prime} \omega=-\surd{13}.$


 * III. For $n=17,$ we have four values of $a^\prime,$  namely $1,$  $2,$  $4,$  $8,$  and an equal number of values of $b^\prime,$  namely $3,$  $5,$  $6,$  $7.$  From this, we compute the cosines

$$\begin{array}{r} \cos \omega\phantom{1} =+0{,}9324722294 \\ \cos 2 \omega =+0{,}7390089172 \\ \cos 4 \omega =+0{,}0922683595 \\ \cos 8 \omega =-0{,}9829730997 \\ \hline \text{Sum} =+0{,}7807764064 \end{array} \qquad \qquad \begin{array}{r} \cos 3 \omega =+0{,}4457383558 \\ \cos 5 \omega =-0{,}2736629901 \\ \cos 6 \omega =-0{,}6026346364 \\ \cos 7 \omega =-0{,}8502171357 \\ \hline \text{Sum} =-1{,}2807764065 \end{array}$$


 * Hence $1+4 \Sigma \cos a^{\prime} \omega=+\surd{17},1+4 \Sigma \cos b^{\prime} \omega=-\surd{17}.$


 * IV. For $n=3,$ there is one value of $a,$  namely $a=1,$  which corresponds to

$$\sin \omega=+0.8660254038 \quad\quad \phantom{\sin \omega=+0.8660254038}$$


 * Hence, $2 \sin \omega=+\surd{3}.$


 * V. For $n=7,$ there are three values of $a,$  namely $1,$  $2,$  $4\text{:}$  hence we have the sines

$$\begin{array}{rl} \sin \omega\phantom{1} =+0{,}7818314825 \phantom{,}&\\ \sin 2 \omega =+0{,}9749279122 \phantom{,}&\\ \sin 4 \omega =-0{,}4338837391 \phantom{,}&\\ \begin{array}{c}\hline \phantom{a}\text{Sum} =+1{,}3228756556,\end{array}& \text{hence } 2 \Sigma \sin a \omega=+\surd{7}. \end{array}$$


 * VI. For $n=11,$ the values of $a$  are $1,$  $3,$  $4,$  $5,$  $9,$  which correspond to sines

$$\begin{array}{rl} \sin \omega\phantom{1} =+0{,}5406408175 \phantom{,}&\\ \sin 3 \omega =+0{,}9898214419 \phantom{,}&\\ \sin 4 \omega =+0{,}7557495744 \phantom{,}&\\ \sin 5 \omega =+0{,}2817325568 \phantom{,}&\\ \sin 9 \omega =-0{,}9096319954 \phantom{,}&\\ \begin{array}{r}\hline \phantom{a}\text{Sum} =+1{,}6583123952,\end{array}& \text{hence } 2 \Sigma \sin a \omega=+\surd{11}. \end{array}$$


 * VII. For $n=19,$ the values of $a$  are $1,$  $4,$  $5,$  $6,$  $7,$  $9,$  $11,$  $16,$  $17,$  which correspond to sines

$$\begin{array}{rl} \sin \omega\phantom{11}=+0{,}3246994692 \phantom{,}&\\ \sin 4 \omega\phantom{1}=+0{,}9694002659 \phantom{,}&\\ \sin 5 \omega\phantom{1}=+0{,}9965844930 \phantom{,}&\\ \sin 6 \omega\phantom{1}=+0{,}9157733267 \phantom{,}&\\ \sin 7 \omega\phantom{1}=+0{,}7357239107 \phantom{,}&\\ \sin 9 \omega\phantom{1}=+0{,}1645945903 \phantom{,}&\\ \sin 11 \omega=-0{,}4759473930 \phantom{,}&\\ \sin 16 \omega=-0{,}8371664783 \phantom{,}&\\ \sin 17 \omega=-0{,}6142127127 \phantom{,}&\\ \begin{array}{r}\hline \phantom{a}\text{Sum}=+2{,}1794494718,\end{array}&\text{hence } 2 \Sigma \sin a \omega=+\surd{19}. \end{array}$$

4.
In all these examples the radical quantity has a positive sign, and the same is easily confirmed for larger values $n=23,$ $n=29,$  etc. , from which a strong likelihood emerges that this holds generally. However, the proof of this phenomenon cannot be sought from the principles set forth in loc. cit. , and must be regarded as deserving of a thorough investigation. Therefore, the purpose of this commentary is to present a rigorous proof of this most elegant theorem, which has been attempted in vain in various ways for many years, and was finally achieved successfully through careful and subtle considerations. At the same time, we will bring the theorem itself, with its elegance preserved or rather enhanced, to a much greater generality. Finally, in the conclusion, we will reveal a remarkable and close connection between this summation and another very important arithmetic theorem. We hope that not only will geometers be gratified by the results of these investigations, but also that the methods, which may well be useful on other occasions, will be deemed worth of their attention.

5.
Our proof relies on the consideration of a specific type of series, whose terms depend on expressions of the form

$$\frac{(1-x^{m})(1-x^{m-1})(1-x^{m-2}) \ldots(1-x^{m-\mu+1})}{(1-x)(1-x x)(1-x^{3}) \ldots (1-x^{\mu})}$$

For the sake of brevity, we will denote such a fraction by $(m, \mu),$ and we will first present some general observations about such functions.


 * I. Whenever $m$ is a positive integer smaller than $\mu,$  the function $(m, \mu)$  clearly vanishes, since the numerator involves the factor $1-x^{0}.$  For $m = \mu,$  the factors in the numerator will be identical, but in the reverse order compared to the factors in the denominator, so that $(\mu, \mu) = 1.$  Finally, in the case where $m$  is a positive integer greater than $\mu,$  we have the formulas

$$\begin{aligned} & (\mu+1, \mu) = \frac{1-x^{\mu+1}}{1-x} = (\mu+1,1) \\ & (\mu+2, \mu) = \frac{(1-x^{\mu+2})(1-x^{\mu+1})}{(1-x)(1-x x)} = (\mu+2,2) \\ & (\mu+3, \mu) = \frac{(1-x^{\mu+3})(1-x^{\mu+2})(1-x^{\mu+1})}{(1-x)(1-xx)(1-x^{3})} = (\mu+3,3) \text{ etc.} \end{aligned}$$


 * or more generally,

$$(m, \mu) = (m, m-\mu)$$


 * II. Furthermore, it is easily confirmed that, in general,

$$(m, \mu+1)=(m-1, \mu+1)+x^{m-\mu-1}(m-1, \mu)$$


 * and likewise

$$\begin{aligned} (m-1, \mu+1)&=(m-2, \mu+1)+x^{m-\mu-2}(m-2, \mu) \\ (m-2, \mu+1)&=(m-3, \mu+1)+x^{m-\mu-3}(m-3, \mu) \\ (m-3, \mu+1)&=(m-4, \mu+1)+x^{m-\mu-4}(m-4, \mu) \text{ etc.} \end{aligned}$$


 * which continues until

$$\begin{aligned} (\mu+2, \mu+1) & =(\mu+1, \mu+1)+x(\mu+1, \mu) \\ & =(\mu, \mu)+x(\mu+1, \mu) \end{aligned}$$


 * and therefore, as long as $m$ is a positive integer greater than $\mu+1,$

$$(m, \mu+1)=(\mu, \mu) +x(\mu+1, \mu)+x x(\mu+2, \mu)+x^{3}(\mu+3, \mu)+\text{etc.} +x^{m-\mu-1}(m-1, \mu)$$


 * Hence it is clear that if, for any given value of $\mu,$ the function $(m, \mu)$  is integral for all positive integer values of $m,$  then the function $(m, \mu+1)$  must also be integral. Therefore, since this assumption holds for $\mu=1,$  the same will hold for $\mu=2,$  and thus for $\mu=3$  etc ., i . e . in general for any positive integer value of $m$  the function $(m, \mu)$  will be integral, or in other words the product

$$(1-x^{m})(1-x^{m-1})(1-x^{m-2}) \ldots(1-x^{m-\mu+1})$$


 * will be divisible by

$$(1-x)(1-x^{2})(1-x^{3}) \ldots(1-x^{\mu}).$$

6.
We will now consider two series, each of which can be used to achieve our goal. The first series is

$$1-\frac{1-x^{m}}{1-x}+\frac{(1-x^{m})(1-x^{m-1})}{(1-x)(1-xx)}-\frac{(1-x^{m})(1-x^{m-1})(1-x^{m-2})}{(1-x)(1-xx)(1-x^{3})}+\ldots$$

or

$$1-(m, 1)+(m, 2)-(m, 3)+(m, 4)-\ldots$$

which for the sake of brevity we will denote by $f(x, m).$ It is immediately clear that when $m$  is a positive integer, this series terminates after its ${m+1}^{\text{st}}$  term (which is $= \pm 1$ ), and therefore in this case, the sum must be a finite integral function of $x.$  Furthermore, according to observation II of article 5, it is clear that in general, for any value of $m,$  we have

$$\begin{aligned} 1 & =1 \\ -(m, 1) & =-(m-1,1)-x^{m-1} \\ +(m, 2) & =+(m-1,2)+x^{m-2}(m-1,1) \\ -(m, 3) & =-(m-1,3)-x^{m-3}(m-1,2) \ldots \end{aligned}$$

and therefore

$$f(x, m)=1-x^{m-1}-(1-x^{m-2})(m-1,1)+(1-x^{m-3})(m-1,2)-(1-x^{m-4})(m-1.3)+\ldots$$

But it is also clear that

$$\begin{aligned} & (1-x^{m-2})(m-1,1)=(1-x^{m-1})(m-2,1) \\ & (1-x^{m-3})(m-1,2)=(1-x^{m-1})(m-2,2) \\ & (1-x^{m-4})(m-1,3)=(1-x^{m-1})(m-2,3) \ldots \end{aligned}$$

from which we deduce the equation

$$

7.
Since for $m=0$ we have $f(x, m)=1,$  we obtain, from the formula we have just found,

$$\begin{aligned} & f(x, 2)=1-x \\ & f(x, 4)=(1-x)(1-x^{3}) \\ & f(x, 6)=(1-x)(1-x^{3})(1-x^{5}) \\ & f(x, 8)=(1-x)(1-x^{3})(1-x^{5})(1-x^{7}) \text{ etc.} \end{aligned}$$

or more generally, for any even value of $m,$

$$

On the other hand, since for $m=1$ we have $f(x, m) = 0,$  we have

$$\begin{aligned} & f(x, 3) = 0 \\ & f(x, 5) = 0 \\ & f(x, 7) = 0 \text{ etc.} \end{aligned}$$

or, in general, for any odd value of $m,$

$$f(x, m) = 0$$

Indeed, the latter sum could have already been derived from the fact that in the series

$$1-(m, 1)+(m, 2)-(m, 3)+\text{etc.}+(m, m-1)-(m, m),$$

the last term destroys the first, the penultimate destroys the second, etc.

8.
For our purpose it suffices to consider the case where $m$ is a positive odd integer. However, it will not hurt to add a few remarks about the cases where $m$ is fractional or negative, due to the singularity of the matter. Clearly in these cases our series will not be interrupted, but will diverge to infinity. Moreover, it is easily seen that the series diverges whenever the value of $x$ is less than 1, so its summation should be restricted to values of $x$  which are greater than 1.

According to formula [1] in article 6, we have

$$\begin{aligned} & f(x,-2)=\frac{1}{1-\frac{1}{x}} \\ & f(x,-4)=\frac{1}{1-\frac{1}{x}} \cdot \frac{1}{1-\frac{1}{x^{3}}} \\ & f(x,-6)=\frac{1}{1-\frac{1}{x}} \cdot \frac{1}{1-\frac{1}{x^{3}}} \cdot \frac{1}{1-\frac{1}{x^{5}}} \text{ etc.} \end{aligned}$$

so that for negative, integral, even values of $m,$ the function $f(x, m)$  can also be assigned a value with finitely many terms. For the remaining values of $m,$ we will convert the function $f(x, m)$  into an infinite product using the following method.

As $m$ approaches negative infinity, the function $f(x, m)$  converges to

$$1+\frac{1}{x-1}+\frac{1}{x-1} \cdot \frac{1}{x x-1}+\frac{1}{x-1} \cdot \frac{1}{x x-1} \cdot \frac{1}{x^{3}-1}+\text{etc.}$$

Therefore, this series is equal to the infinite product

$$\frac{1}{1-\frac{1}{x}} \cdot \frac{1}{1-\frac{1}{x^{3}}} \cdot \frac{1}{1-\frac{1}{x^{5}}} \cdot \frac{1}{1-\frac{1}{x^{7}}} \text{ etc. to infinity}$$

Moreover, since it is generally true that

$$f(x, m)=f(x, m-2 \lambda). (1-x^{m-1})(1-x^{m-3})(1-x^{m-5}) \ldots (1-x^{m-2 \lambda+1})$$

we have

$$\begin{aligned} f(x, m) & =f(x,-\infty) \cdot(1-x^{m-1})(1-x^{m-3})(1-x^{m-5}) \text{ etc. to infinity} \\ & =\frac{1-x^{m-1}}{1-x^{-1}} \cdot \frac{1-x^{m-3}}{1-x^{-3}} \cdot \frac{1-x^{m-5}}{1-x^{-5}} \cdot \frac{1-x^{m-7}}{1-x^{-7}} \text{ etc. to infinity} \end{aligned}$$

whose factors clearly converge to unity.

The case $m=-1$ deserves special attention. Here we have

$$f(x,-1)=1+x^{-1}+x^{-3}+x^{-6}+x^{-10}+\text{etc.}$$

It follows that this series can be expressed as an infinite product

$$\frac{1-x^{-2}}{1-x^{-1}} \cdot \frac{1-x^{-2}}{1-x^{-3}} \cdot \frac{1-x^{-6}}{1-x^{-5}} \text{ etc.}$$

or, by replacing $x$ with $x^{-1},$

$$1+x+x^{3}+x^{6}+\text{etc.}=\frac{1-x x}{1-x} \cdot \frac{1-x^{4}}{1-x^{3}} \cdot \frac{1-x^{6}}{1-x^{5}} \cdot \frac{1-x^{8}}{1-x^{7}} \text{ etc.}$$

This equality between two somewhat complicated expressions, to which we will return on another occasion, is indeed very remarkable.

9.
Secondly, we consider the series

$$1+x^{\frac{1}{2}} \frac{1-x^{m}}{1-x}+x \frac{(1-x^{m})}{(1-x)} \frac{(1-x^{m-1})}{(1-x x)}+x^{\frac{3}{2}} \frac{(1-x^{m})(1-x^{m-1})(1-x^{m-2})}{(1-x)(1-x x)(1-x^{3})}+\text{etc.}$$

or

$$1+x^{\frac{1}{2}}(m, 1)+x(m, 2)+x^{\frac{3}{2}}(m, 3)+x x(m, 4)+\text{etc.}$$

which we will denote by $F(x, m).$ We will restrict this discussion to the case where $m$  is a positive integer, so that the series always terminates at the $m+1^{\text{st}}$  term, which is $=x^{\frac{1}{2} m}(m, m).$  Since

$$(m, m)=1, \quad(m, m-1)=(m, 1), \quad(m, m-2)=(m, 2) \text{ etc.}$$

the above series can also be expressed as:

$$F(x, m)=x^{\frac{1}{2} m}+x^{\frac{1}{2}(m-1)}(m, 1)+x^{\frac{1}{2}(m-2)}(m, 2)+x^{\frac{1}{2}(m-3)}(m, 3)+\text{etc.}$$

Hence we have

$$\begin{aligned} (1+x^{\frac{1}{2} m+\frac{1}{2}}) F(x, m) =1&+x^{\frac{1}{2}}(m, 1)+x(m, 2)+x^{\frac{3}{2}}(m, 3)+\text{etc.} \\ & +x^{\frac{1}{2}}. x^{m}+x. x^{m-1}(m, 1)+x^{\frac{3}{2}}. x^{m-2}(m, 2)+\text{etc.} \end{aligned}$$

Therefore, since we have (art. 5, II)

$$\begin{aligned} (m, 1)+x^{m} & =(m+1,1) \\ (m, 2)+x^{m-1}(m, 1) & =(m+1,2) \\ (m, 3)+x^{m-2}(m, 2) & =(m+1,3) \text{ etc.,} \end{aligned}$$

we obtain the result

$$

But $F(x, 0)=1;$ therefore we have

$$\begin{aligned} & F(x, 1)=1+x^{\frac{1}{2}} \\ & F(x, 2)=(1+x^{\frac{1}{2}})(1+x) \\ & F(x, 3)=(1+x^{\frac{1}{2}})(1+x)(1+x^{3}) \text{ etc.,} \end{aligned}$$

or in general

$$

10.
Having made these preliminary observations, let us now proceed towards our objective. Since the squares $1,$ $4,$  $9 \ldots (\frac{1}{2}(n-1))^2$  are all incongruent to each other modulo $n,$  it is clear that their minimal residues modulo $n$  must be identical to the numbers $a,$  and therefore

$$\begin{aligned} &\Sigma \cos a k \omega=\cos k \omega+\cos 4 k \omega+\cos 9 k \omega+\text{etc.}+\cos (\frac{1}{2}(n-1))^2 k \omega \\ &\Sigma \sin a k \omega=\sin k \omega+\sin 4 k \omega+\sin 9 k \omega+\text{etc.}+\sin (\frac{1}{2}(n-1))^2 k \omega \end{aligned}$$

Similarly, since the same squares $1,$ $4,$  $ 9 \ldots (\frac{1}{2}(n-1))^2$  are congruent to $(\frac{1}{2}(n+1))^2,$  $(\frac{1}{2}(n+3))^2,$  $(\frac{1}{2}(n+5))^2 \ldots (n-1)^2$  in reverse order, we have

$$\begin{aligned} &\Sigma \cos a k \omega=\cos (\frac{1}{2}(n+1))^2 k \omega+\cos (\frac{1}{2}(n+3))^2 k \omega+\text{etc.}+\cos (n-1)^2 k \omega \\ &\Sigma \sin a k \omega=\sin (\frac{1}{2}(n+1))^2 k \omega+\sin (\frac{1}{2}(n+3))^2 k \omega+\text{etc.}+\sin (n-1)^2 k \omega \end{aligned}$$

Therefore, assuming

$$\begin{alignedat}{2} &T=1+\cos k \omega+\cos 4 k \omega+\cos 9 k \omega+\text{etc.}+\cos (n-1)^2 k \omega \\ & U= \sin k \omega+\sin 4 k \omega+\sin 9 k \omega+\text{etc.}+\sin (n-1)^2 k \omega \end{alignedat}$$

we will have

$$\begin{aligned} 1+2 \Sigma \cos a k \omega & =T \\ 2 \Sigma \sin a k \omega & =U \end{aligned}$$

Hence it is clear that the summations proposed in article 1 depend on the summations of the series $T$ and $U.$  We will therefore direct our discussion to these, and complete it in a general way that it includes not only prime values of $n$  but composite values as well. Let us also suppose that the number $k$ is relatively prime to $n;$  for the case where $k$  and $n$  have a common divisor can be reduced to this one without any difficulty.

11.
Let us denote the imaginary quantity $\surd{-1}$ by $i,$  and let

$$\cos k \omega+i \sin k \omega=r$$

so that $r^{n}=1,$ or equivalently $r$  is a root of the equation $r^{n}-1=0.$  It is easy to see that the numbers $k,$  $2 k,$  $3 k \ldots (n-1) k$  are all indivisible by $n$  and are incongruent to each other modulo $n\text{:}$  therefore, the powers of $r$

$$1, r, r^{2}, r^{3} \ldots r^{n-1}$$

will all be distinct, and each of them will satisfy the equation $x^{n}-1=0.$ Because of this, these powers represent all of the roots of the equation $x^{n}-1=0.$

These conclusions would be invalid if $k$ had a common divisor with $n.$  For if $\nu$  were such a common divisor, then $k\mathrm{.}\frac{n}{\nu}$  would be divisible by $n,$  and hence a power less than $r^{n},$  say $r^{\frac{n}{\nu}},$  would be equal to unity. In this case, therefore, the powers of $r$ up to the $\frac{n}{\nu}^{th}$  would all be roots of the equation $x^{n}-1=0,$  and indeed they would be distinct roots, if $\nu$  were the greatest common divisor of $k$  and $n.$  In our case, where $k$  and $n$  are assumed to be prime to each other, $r$  can conveniently be called a proper root of the equation $x^{n}-1=0.$  In the other case, where $k$  and $n$  have a (greatest) common divisor $\nu,$  we will say that $r$  is an improper root of that equation. Clearly in the latter case, $r$ would be a proper root of the equation $x^{\frac{n}{\nu}}-1=0.$  The simplest improper root is unity, and in the case where $n$  is a prime number, there are no other improper roots whatsoever.

12.
If we now set

$$W=1+r+r^{4}+r^{9}+\text{etc.}+r^{(n-1)^{2}}$$

it is clear that $W=T+i U,$ so that $T$  is the real part of $W,$  and $U$  is obtained from the imaginary part of $W$  by suppressing the factor $i.$  The whole matter is therefore reduced to finding the sum $W\text{:}$  for this purpose, either the series considered in article 6 or the one we have shown how to sum in article 9 can be used, although the former is less suitable in the case where $n$  is an even number. Nonetheless, we hope that it will be agreeable to the reader if we treat the case where $n$ is odd according to both methods.

Let us first suppose that $n$ is an odd number, that $r$  is an arbitrary proper root of the equation $x^{n}-1=0,$  and that in the function $f(x, m)$  we set $x=r$  and $m=n-1.$  Then clearly

$$\begin{alignedat}{3} & \frac{1-x^{m}}{1-x}&=\frac{1-r^{-1}}{1-r}&=-r^{-1} \\ & \frac{1-x^{m-1}}{1-x x}&=\frac{1-r^{-2}}{1-r r}&=-r^{-2} \\ & \frac{1-x^{m-2}}{1-x^{3}}&=\frac{1-r^{-3}}{1-r^{3}}&=-r^{-3} \text{ etc.} \end{alignedat}$$

up to

$$\begin{alignedat}{3} &\frac{1-x}{1-x^{m}}&=\frac{1-r^{-m}}{1-r^{m}}&=-r^{-m}\phantom{\text{etc.}} \end{alignedat}$$

(It will not be superfluous to mention that these equations are valid only to the extent that $r$ is assumed to be a proper root: for if $r$  were an improper root, the numerator and denominator of some of these fractions would simultaneously vanish, and thus the fractions would become indeterminate).

From this, we derive the following equation:

$$\begin{aligned} f(r, n-1) & =1+r^{-1}+r^{-3}+r^{-6}+\text{etc.}+r^{-\frac{1}{2}(n-1) n} \\ & =(1-r)(1-r^{3})(1-r^{5}) \ldots(1-r^{n-2}) \end{aligned}$$

The same equation will still hold if we substitute $r^{\lambda}$ for $r,$  where $\lambda$  is any arbitrary integer relatively prime to $n,$  for then $r^{\lambda}$  will also be a proper root of the equation $x^{n}-1=0.$  Let us write $r^{n-2}$  instead of $r,$  or equivalently $r^{-2}.$  Then

$$1+r^{2}+r^{6}+r^{12}+\text{etc.}+r^{(n-1) n}=(1-r^{-2})(1-r^{-6})(1-r^{-10}) \ldots(1-r^{-2(n-2)})$$

Next, let us multiply both sides of this equation by

$$r \cdot r^{3} \cdot r^{5} \ldots \cdot r^{(n-2)}=r^{\frac{1}{4}(n-1)^{2}}$$

Since

$$\begin{alignedat}{4} r^{2+\frac{1}{4}(n-1)^{2}} & =r^{\frac{1}{4}(n-3)^{2}},\quad & r^{(n-1) n+\frac{1}{4}(n-1)^{2}}&=r^{\frac{1}{4}(n+1)^{2}} \\ r^{6+\frac{1}{4}(n-1)^{2}} & =r^{\frac{1}{4}(n-5)^{2}},\quad & r^{(n-2)(n-1)+\frac{1}{4}(n-1)^{2}}&=r^{\frac{1}{4}(n+3)^{2}} \\ r^{12+\frac{1}{4}(n-1)^{2}} & =r^{\frac{1}{4}(n-7)^{2}},\quad & r^{(n-3)(n-2)+\frac{1}{4}(n-1)^{2}}&=r^{\frac{1}{4}(n+5)^{2}} \text{ etc.} \end{alignedat}$$

we get the following equation

$$\begin{aligned} r^{\frac{1}{4}(n-1)^{2}}&+r^{\frac{1}{4}(n-3)^{2}}+r^{\frac{1}{4}(n-5)^{2}}+\text{etc.}+r+1 \\ +r^{\frac{1}{4}(n+1)^{2}}&+r^{\frac{1}{4}(n+3)^{2}}+r^{\frac{1}{4}(n+5)^{2}}+\text{etc.}+r^{\frac{1}{4}(2 n-2)^{2}} \\ &=(r-r^{-1})(r^{3}-r^{-3})(r^{5}-r^{-5}) \ldots(r^{n-2}-r^{-n+2}) \end{aligned}$$

or, by rearranging the terms of the first member,

$$

13.
The factors of the second member of the equation [5] can also be written as

$$\begin{aligned} r-r^{-1} & =-(r^{n-1}-r^{-n+1}) \\ r^{3}-r^{-3} & =-(r^{n-3}-r^{-n+3}) \\ r^{5}-r^{-5} & =-(r^{n-5}-r^{-n+5}) \text{ etc.} \end{aligned}$$

up to

$$r^{n-2}-r^{-n+2}=-(r^{2}-r^{-2})\phantom{\text{ etc.}}$$

in which case the equation takes the following form:

$$W=(-1)^{\frac{1}{2}(n-1)}(r^{2}-r^{-2})(r^{4}-r^{-4})(r^{6}-r^{-6}) \ldots (r^{n-1}-r^{-n+1})$$

Multiplying this equation by [5] in its original form, we obtain

$$W^{2}=(-1)^{\frac{1}{2}(n-1)}(r-r^{-1})(r^{2}-r^{-2})(r^{3}-r^{-3}) \ldots (r^{n-1}-r^{-n+1})$$

where $(-1)^{\frac{1}{2}(n-1)}$ is either $+1$  or $-1,$  depending on whether $n$  is of the form $4 \mu+1$  or $4 \mu+3.$  Therefore,

$$W^{2}= \pm r^{\frac{1}{2} n(n-1)}(1-r^{-2})(1-r^{-4})(1-r^{-6}) \ldots(1-r^{-2(n-1)})$$

But it is clear that $r^{-2},$ $r^{-4},$  $r^{-6} \ldots r^{-2 n+2}$  are precisely the roots of the equation $x^{n}-1=0,$  except for the root $x=1.$  Hence the following equation must hold

$$(x-r^{-2})(x-r^{-4})(x-r^{-6}) \ldots(x-r^{-2 n+2})=x^{n-1}+x^{n-2}+x^{n-3}+\text{etc.}+x+1$$

and setting $x=1,$ we find that

$$(1-r^{-2})(1-r^{-4})(1-r^{-6}) \ldots(1-r^{-2 n+2})=n$$

Since it is evident that $r^{\frac{1}{2} n(n-1)}=1,$ our equation becomes:

$$

In the case where $n$ is of the form $4 \mu+1,$  we have:

$W= \pm \surd{n},$ and therefore $T= \pm \surd{n},$ $U=0$

On the other hand, in the case where $n$ is of the form $4 \mu+3,$  we have:

$W= \pm i \surd{n},$ and therefore $T=0,$ $U= \pm \surd{n}$

14.
The method of the previous article determines only the absolute values of $T$ and $U,$  and leaves their signs ambiguous, so it is necessary to determine whether $T$  (in the first case) and $U$  (in the second case) are equal to $+\surd{n}$  or $-\surd{n}$. However, at least when $k=1,$ this can be deduced from equation [5] in the following way. Since, for $k=1,$

$$\begin{aligned} r-r^{-1} & =2 i \sin \omega \\ r^{3}-r^{-3} & =2 i \sin 3 \omega \\ r^{5}-r^{-5} & =2 i \sin 5 \omega \text{ etc., } \end{aligned}$$

this equation is transformed into

$$W=(2 i)^{\frac{1}{2}(n-1)} \sin \omega \sin 3 \omega \sin 5 \omega \ldots \sin (n-2) \omega$$

Now, in the case where $n$ is of the form $4 \mu+1,$  in the series of odd numbers

$$1,3,5,7 \ldots \frac{1}{2}(n-3), \frac{1}{2}(n+1) \ldots(n-2)$$

there can be found $\frac{1}{4}(n-1)$ which are less than $\frac{1}{2} n,$  and these clearly correspond to positive sines. On the other hand, the remaining $\frac{1}{4}(n-1)$ will be larger than $\frac{1}{2} n,$  and these correspond to negative sines. Therefore, the product of all the sines must be equal to a product of a positive quantities, multiplied by the factor $(-1)^{\frac{1}{4}(n-1)},$ and thus $W$  will be equal to the product of a positive real quantity with $i^{n-1},$  or $1,$  since $i^{4}=1$  and $n-1$  is divisible by 4. That is, the quantity $W$ will be a positive real quantity, and hence we must have

$$W=+\surd{n}, \quad T=+\surd{n}$$

In the second case, where $n$ is of the form $4 \mu+3,$  in the series of odd numbers

$$1,3,5,7 \ldots \frac{1}{2}(n-1), \frac{1}{2}(n+3) \ldots(n-2)$$

the first $\frac{1}{4}(n+1)$ will be smaller than $\frac{1}{2} n,$  and the remaining $\frac{1}{4}(n-3)$  will be larger. Among the sines of the arcs $\omega,$ $3 \omega,$  $5 \omega \ldots (n-2) \omega,$  therefore, $\frac{1}{4}(n-3)$  will be negative, and thus $W$  will be the product of $i^{\frac{1}{2}(n-1)}$  with a positive real quantity and $(-1)^{\frac{1}{4}(n-3)};$  the third factor is $=i^{\frac{1}{2}(n-3)},$  which when combined with the first, gives $i^{n-2}=i,$  since $i^{n-3}=1.$  Therefore we must have

$W=+i \surd{n},$ and $U=+\surd{n}$

15.
We will now show how the same conclusions can be deduced from the series considered in article 9. Let us write $-y^{-1}$ in place of $x^{\frac{1}{2}}$  in equation [4], so that

$$1-y^{-1} \frac{1-y^{-2 m}}{1-y^{-2}}+y^{-2} \frac{(1-y^{-2 m})(1-y^{-2 m+2})}{(1-y^{-2})(1-y^{-4})}-y^{-3} \frac{(1-y^{-2 m})(1-y^{-2 m+2})(1-y^{-2 m+2})}{(1-y^{-2})(1-y^{-4})(1-y^{-6})}+\text{etc.}$$

up to the $m+1^{\text{st}}$ term will be

$$

If we take $y$ to be a proper root of the equation $y^{n}-1=0,$  say $r,$  and at the same time we set $m=n-1,$  then we have

$$\begin{aligned} & \frac{1-y^{-2 m}}{1-y^{-2}}=\frac{1-r^{2}}{1-r^{-2}}=-r^{2} \\ & \frac{1-y^{-2 m+2}}{1-y^{-4}}=\frac{1-r^{4}}{1-r^{-4}}=-r^{4} \\ & \frac{1-y^{-2 m+4}}{1-y^{-6}}=\frac{1-r^{6}}{1-r^{-6}}=-r^{6} \text{ etc.} \end{aligned}$$

up to

$$\frac{1-y^{-2}}{1-y^{-2 m}}=\frac{1-r^{2 n-2}}{1-r^{-2 n+2}}=-r^{2 n-2}$$

where it should be noted that none of the denominators $1-r^{-2},$ $1-r^{-4}$  etc. will be $=0.$ Hence equation [7] takes the form

$$1+r+r^{4}+r^{9}+\text{etc.}+r^{(n-1)^{2}}=(1-r^{-1})(1+r^{-2})(1-r^{-3}) \ldots(1+r^{-n+1})$$

in the second member of this equation, if we multiply the first term by the last, the second term by the penultimate, etc. , then we obtain

$$\begin{aligned} & (1-r^{-1})(1+r^{-n+1})=r-r^{-1} \\ & (1+r^{-2})(1-r^{-n+2})=r^{n-2}-r^{-n+2} \\ & (1-r^{-3})(1+r^{-n+3})=r^{3}-r^{-3} \\ & (1+r^{-4})(1-r^{-n+4})=r^{n-4}-r^{-n+4} \text{ etc.} \end{aligned}$$

From these products, it is easy to see that the product

$$(r-r^{-1})(r^{3}-r^{-3})(r^{5}-r^{-5}) \ldots(r^{n-4}-r^{-n+4})(r^{n-2}-r^{-n+2})$$

will be

$$=1+r+r^{4}+r^{9}+\text{etc.}+r^{(n-1)^{2}}=W$$

This equation is identical to equation [5] in article 12, which was derived from the first series, so the rest of the argument can be carried out in the same way as in articles 13 and 14.

16.
We now move on to the other case, where $n$ is an even number. First let $n$ be of the form $4 \mu+2,$  or equivalently an oddly even number. It is clear that the numbers $\frac{1}{4} n n,$ $(\frac{1}{2} n+1)^{2}-1,$  $(\frac{1}{2} n+2)^{2}-4,$  etc. , or in general $(\frac{1}{2} n+\lambda)^{2}-\lambda \lambda,$ can be divided by $\frac{1}{2} n$  to produce odd quotients, and thus they are congruent to $\frac{1}{2} n$  modulo $n.$  Hence, if $r$  is a proper root of the equation $x^{n}-1=0,$  and thus $r^{\frac{1}{2} n}=-1,$  it follows that

$$\begin{aligned} r^{(\frac{1}{2} n)^{2}} & =-1 \\ r^{(\frac{1}{2} n+1)^{2}} & =-r \\ r^{(\frac{1}{2} n+2)^2} & =-r^{4} \\ r^{(\frac{1}{2} n+3)^{2}} & =-r^{9} \text{ etc.} \end{aligned}$$

Hence, in the series

$$1+r+r^{4}+r^{9}+\text{etc.}+r^{(n-1)^{2}}$$

the term $r^{(\frac{1}{2} n)^{2}}$ destroys the first term, the following term destroys the second term, etc. , and therefore

$$W=0, \quad T=0, \quad U=0$$

17.
There remains the case where $n$ is of the form $4 \mu,$  or evenly even. Here, in general, $(\frac{1}{2} n+\lambda)^{2}-\lambda \lambda$ will be divisible by $n,$  and therefore

$$r^{(\frac{1}{2} n+\lambda)^{2}}=r^{\lambda \lambda}$$

Hence, in the series

$$1+r+r^{4}+r^{9}+\text{etc.}+r^{(n-1)^{2}}$$

the term $r^{(\frac{1}{2} n)^{2}}$ will be equal the first term, the following term will be equal to the second term, etc. , so that

$$W=2(1+r+r^{4}+r^{9}+\text{etc.}+r^{(\frac{1}{2} n-1)^{2}})$$

Let us now suppose that in equation [7] of article 15, we set $m=\frac{1}{2} n-1,$ and for $y$  we substitute a proper root $r$  of the equation $y^{n}-1=0.$  Then just as in article 15, the equation takes the form

$$1+r+r^{4}+\text{etc.}+r^{(\frac{1}{2} n-1)^{2}}=(1-r^{-1})(1+r^{-2})(1-r^{-3}) \ldots(1-r^{-\frac{1}{2} n+1})$$

or

$$

Furthermore, since $r^{\frac{1}{2} n}=-1,$ and thus

$$\begin{aligned} & 1+r^{-2}=-r^{\frac{1}{2} n-2}(1-r^{-\frac{1}{2} n+2}) \\ & 1+r^{-4}=-r^{\frac{1}{2} n-4}(1-r^{-\frac{1}{2} n+4}) \\ & 1+r^{-6}=-r^{\frac{1}{2} n-6}(1-r^{-\frac{1}{2} n+6}) \text{ etc.} \end{aligned}$$

and since the product of the factors $-r^{\frac{1}{2} n-2},$ $-r^{\frac{1}{2} n-4},$  $-r^{\frac{1}{2} n-6}$  etc. up to $-r^{2}$ is $=(-1)^{\frac{1}{4} n-1} r^{\frac{1}{16} n n-\frac{1}{4} n},$  the previous equation can also be expressed as

$$W=2(-1)^{\frac{1}{4} n-1} r^{\frac{1}{16} n n-\frac{1}{4} n}(1-r^{-1})(1-r^{-2})(1-r^{-3})(1-r^{-4}) \ldots(1-r^{-\frac{1}{2} n+1})$$

Since

$$\begin{aligned} & 1-r^{-1}=-r^{-1}(1-r^{-n+1}) \\ & 1-r^{-2}=-r^{-2}(1-r^{-n+2}) \\ & 1-r^{-3}=-r^{-3}(1-r^{-n+3}) \text{ etc.} \end{aligned}$$

we have

$$\begin{aligned} (1-r^{-1})&(1-r^{-2})(1-r^{-3}) \ldots(1-r^{-\frac{1}{2} n+1}) \\ =&(-1)^{\frac{1}{2} n-1} r^{-\frac{1}{8} n n+\frac{1}{4} n}(1-r^{-\frac{1}{2} n-1})(1-r^{-\frac{1}{2} n-2})(1-r^{-\frac{1}{2} n-3}) \ldots(1-r^{-n+1}) \end{aligned}$$

and therefore

$$W=2(-1)^{\frac{3}{4} n-2} r^{-\frac{1}{16} n n}(1-r^{-\frac{1}{2} n-1})(1-r^{-\frac{1}{2} n-2})(1-r^{-\frac{1}{2} n-3}) \ldots(1-r^{-n+1})$$

Multiplying this value of $W$ by the one we previously found, and adjoining the factor $1-r^{-\frac{1}{2} n}$  to both sides, we get

$$(1-r^{-\frac{1}{2} n}) W^{2}=4(-1)^{n-3} r^{-\frac{1}{4} n}(1-r^{-1})(1-r^{-2})(1-r^{-3}) \ldots(1-r^{-n+1})$$

But we have

$$\begin{aligned} 1-r^{-\frac{1}{2} n}&=2 \\ (-1)^{n-3}&=-1 \\ r^{-\frac{1}{4} n}&=-r^{\frac{1}{4} n} \\ (1-r^{-1})(1-r^{-2})(1-r^{-3}) &\ldots(1-r^{-n+1})=n \end{aligned}$$

From which it finally follows that

$$

Now it can be easily seen that $r^{\frac{1}{4} n}$ is either $=+i$  or $=-i,$  depending on whether $k$  is of the form $4 \mu+1$  or $4 \mu+3.$  And since

$$2 i=(1+i)^{2}, \quad-2 i=(1-i)^{2}$$

we will have, in the case where $k$ is of the form $4 \mu+1,$

$W= \pm(1+i) \surd{n},$ and thus $T=U=\pm \surd{n}$

and in the other case, where $k$ is of the form $4 \mu+3,$

$W= \pm(1-i) \surd{n},$ and thus $T=-U= \pm \surd{n}$

18.
The method of the previous article provided the absolute values of the functions $T$ and $U,$  and determined the conditions under which equal or opposite signs should be given to them. But the signs themselves are not yet determined at this point. We will supply this for the case $k=1,$ as follows.

Let $\rho=\cos \frac{1}{2} \omega+i \sin \frac{1}{2} \omega,$ so that $r=\rho \rho$  and $\rho^{n}=-1.$  It is clear that equation [8] can be expressed as

$$W=2(1+\rho^{n-2})(1+\rho^{-4})(1+\rho^{n-6})(1+\rho^{-8}) \ldots(1+\rho^{-n+4})(1+\rho^{2})$$

or, by arranging the factors in a different order,

$$W=2(1+\rho^{2})(1+\rho^{-4})(1+\rho^{6})(1+\rho^{-8}) \ldots(1+\rho^{-n+4})(1+\rho^{n-2})$$

Now we have

$$\begin{aligned} & 1+\rho^{2}=2 \rho \cos \frac{1}{2} \omega \\ & 1+\rho^{-4}=2 \rho^{-2} \cos \omega \\ & 1+\rho^{+6}=2 \rho^{3} \cos \frac{3}{2} \omega \\ & 1+\rho^{-8}=2 \rho^{-4} \cos 2 \omega \text{ etc.} \end{aligned}$$

up to

$$\begin{aligned} & 1+\rho^{-n+4}=2 \rho^{-\frac{1}{2} n+2} \cos (\frac{1}{4} n-1) \omega \\ & 1+\rho^{n-2}=2 \rho^{\frac{1}{2} n-1} \cos (\frac{1}{4} n-\frac{1}{2}) \omega \end{aligned}$$

Therefore, we have:

$$W=2^{\frac{1}{2} n} \rho^{\frac{1}{4} n} \cos \frac{1}{2} \omega \cos \omega \cos \frac{3}{2} \omega \ldots \cos (\frac{1}{4} n-\frac{1}{2}) \omega$$

The cosines in this product are clearly positive, but the factor $\rho^{\frac{1}{4}n}$ becomes $=\cos 45^{\circ}+i \sin 45^{\circ}=(1+i) \surd{\frac{1}{2}}.$  Hence we conclude that $W$  is the product of $1+i$  and a positive real quantity, so we must have

$$W=(1+i) \cdot \surd{n}, \quad T=+\surd{n}, \quad U=+\surd{n}$$

19.
It will be worthwhile to gather together here all of the summations we have evaluated so far. In general, we have

$$ \begin{array}{|c|c|c|} \hline T=&U=&\text{when }n\text{ is of the form}\\ \hline \pm\surd{n}&\pm\surd{n}&4\mu\\ \pm\surd{n}&0&4\mu+1\\ 0&0&4\mu+2\\ 0&\pm\surd{n}&4\mu+3\\ \hline \end{array} $$

and in the case where $k$ is assumed to be $=1,$  the positive sign must be assigned to the radical quantity. All of the things which had been observed by induction in article 3, for the first few values of $n$, have now been demonstrated with all rigor, and nothing remains but to determine the signs for other values of $k$ in all cases. But before this task can be undertaken in all generality, it will be necessary to first consider more closely the cases in which $n$ is either a prime number or a power of a prime number.

20.
Let $n$ be a prime odd number. Then it is clear from what was explained in article 10 that $W=1+2 \Sigma r^{a}=1+2 \Sigma R^{a k},$ where we set $R=\cos \omega+i \sin \omega,$  and $a$  denotes all of the quadratic residues of $n$  between $1$  and $n-1$  indefinitely. But if we also denote indefinitely by $b$ all the quadratic non-residues between the same limits, it is seen without any difficulty that all of the numbers $a k$  will be congruent modulo $n$  to either all of $a$  or all of $b,$  without respect to order, depending on whether $k$  is a quadratic residue or non-residue modulo $n$. Therefore, in the former case, we have

$$W=1+2 \Sigma R^{a}=1+R+R^{4}+R^{9}+\text{etc.}+R^{(n-1)^{2}}$$

and thus $W=+\surd{n},$ if $n$  is of the form $4 \mu+1,$  and $W=+i \surd{n},$  if $n$  is of the form $4 \mu+3.$

On the other hand, in the case where $k$ is a quadratic non-residue modulo $n,$  we have

$$W=1+2 \Sigma R^{b}$$

Hence, since it is clear that all integers $a$ and $b$  together complete the complex integer numbers $1,$  $2,$  $3 \ldots,$  and thus

$$\Sigma R^{a}+\Sigma R^{b}=R+R^{2}+R^{3}+\text{etc.}+R^{n-1}=-1$$

we have

$$W=-1-2 \Sigma R^{a}=-(1+R+R^{4}+R^{9}+\text{etc.}+R^{(n-1)^{2}})$$

and thus $W=-\surd{n}$ if $n$  is of the form $4\mu+1,$  and $W=-i\surd{n}$  if $n$  is of the form $4\mu+3.$

Hence we conclude:


 * first, if $n$ is of the form $4\mu+1,$  and $k$  is a quadratic residue modulo $n,$

$$T=+\surd{n}, \quad U=0$$


 * second, if $n$ is of the form $4\mu+1,$  and $k$  is a quadratic non-residue modulo $n,$

$$T=-\surd{n}, \quad U=0$$


 * third, if $n$ is of the form $4\mu+3,$  and $k$  is a quadratic residue modulo $n,$

$$T=0, \quad U=+\surd{n}$$


 * fourth, if $n$ is of the form $4\mu+3,$  and $k$  is a quadratic non-residue modulo $n,$

$$T=0, \quad U=-\surd{n}$$

21.
Let $n$ be a square or higher power of an odd prime $p$, and let $n = p^{2 \chi} q,$  where $q$  is either $1$  or $p.$  It is first of all important to observe here that if $\lambda$  is any integer not divisible by $p^{\chi},$  then we have

$$\begin{aligned} & r^{\lambda \lambda}+r^{(\lambda+p^{\chi} q)^{2}}+r^{(\lambda+2 p^{\chi} q)^{2}}+r^{(\lambda+3 p^{\chi} q)^{2}}+\text{etc.}+r^{(\lambda+n-p^{\chi} q)^{2}} \\& \quad=r^{\lambda \lambda}\left\{1+r^{2 \lambda p^{\chi} q}+r^{4 \lambda p^{\chi} q}+r^{6 \lambda p^{\chi} q}+\text{etc.}+r^{2 \lambda(n-p^{\chi} q)}\right\}=\frac{r^{\lambda \lambda}(1-r^{2 \lambda n})}{1-r^{2 \lambda p^{\chi} q}}=0 \end{aligned}$$

From this it is easy to see that

$$W=1+r^{p^{2 \chi}}+r^{4 p^{2 \chi}}+r^{9 p^{2 \chi}}+\text{etc.}+r^{(n-p^{\chi})^{2}}$$

Indeed, the remaining terms of the series

$$1+r+r^{4}+r^{9}+\text{etc.}+r^{(n-1)^{2}}$$

can be distributed into $(p^{\chi}-1) q$ partial sums, each of which has $p^{\chi}$  terms, and is seen to vanish by applying the transformation given above.

Hence it follows, in the case where $q=1,$ or where $n$  is a power of a prime number with an even exponent, that

$W=p^{\chi}=+\surd{n},$ and therefore $T=+\surd{n},$ $U=0$

On the other hand, in the case where $q=p,$ or where $n$  is a power of a prime number with an odd exponent, let us set $r^{p^{2\chi}}=\rho,$  where $\rho$  is a proper root of the equation $x^{p}-1=0,$  specifically $\rho=\cos \frac{k}{p} 360^{\circ}+i \sin \frac{k}{p} 360^{\circ}.$  Then

$$W=1+\rho+\rho^{4}+\rho^{9}+\text{etc.}+\rho^{(p^{\chi+1}-1)^{2}}=p^{\chi}(1+\rho+\rho^{4}+\rho^{9}+\text{etc.}+\rho^{(p-1)^{2}})$$

But the sum of the series $1+\rho+\rho^{4}+\rho^{9}+\text{etc.}+\rho^{(p-1)^{2}}$ has been determined in the preceding article, and from this we conclude that

$W= \pm \surd{n}=T,$ if $p$ is of the form $4 \mu+1 $ $W= \pm i \surd{n}=i U,$ if $p$  is of the form $4 \mu+3$

with a positive or negative sign depending on whether $k$ is a quadratic residue or a non-residue modulo $p.$

22.
The following proposition, which is easily derived from that which has been set forth in articles 20 and 21, will be of considerable use to us below. Let

$$W^{\prime}=1+r^{h}+r^{4 h}+r^{9 h}+\text{etc.}+r^{h(n-1)^{2}}$$

where $h$ is any integer not divisible by $p.$  Then in the case where $n=p,$  or where $n$  is a power of $p$  with an odd exponent, we have

$W^{\prime}=W$, if $h$ is a quadratic residue modulo $p$

$ W^{\prime}=-W$, if $h$ is a quadratic non-residue modulo $p$

For it is clear that $W^{\prime}$ arises from $W$  if $kh$  is substituted for $k.$  In the former case, $k$  and $kh$  will be the same, and in the latter different, insofar as they are quadratic residues or non-residues modulo $p.$

However, in the case where $n$ is a power of $p$  with an even exponent, it is clear that $W^{\prime}=+\surd{n},$  and therefore always $W^{\prime}=W.$

23.
In articles 20, 21, 22 we considered odd prime numbers and their powers. It remains, therefore, to consider the case where $n$ is a power of two.

For $n=2,$ it is clear that $W=1+r=0.$

For $n=4,$ we obtain $W=1+r+r^{4}+r^{9}=2+2 r.$  Hence $W=2+2 i,$  whenever $k$  is of the form $4 \mu+1,$  and $W=2-2 i,$  whenever $k$  is of the form $4 \mu+3.$

For $n=8,$ we have $W=1+r+r^{4}+r^{9}+r^{16}+r^{25}+r^{36}+r^{49}=2+4 r+2 r^{4}$  $=4 r.$  Hence

$W=(1+i) \surd{8}$ whenever $k$ is of the form $8 \mu+1 $

$W=(-1+i) \surd{8},$ whenever $k$  is of the form $8 \mu+3$

$W=(-1-i) \surd{8},$ whenever $k$  is of the form $8 \mu+5$

$W=(1-i) \surd{8},$ whenever $k$  is of the form $8 \mu+7$

If $n$ is a higher power of two, let $n=2^{2 \chi} q,$  so that $q$  is either equal to 1 or 2, and $\chi$  is greater than 1. It must first of all be observed here that if $\lambda$ is an integer not divisible by $2^{\chi-1},$  then we have

$$\begin{aligned} & r^{\lambda \lambda}+r^{(\lambda+2^{\chi} q)^{2}}+r^{(\lambda+2.2^{\chi} q)^{2}}+r^{(\lambda+3.2^{\chi} q)^{2}}+\text{etc.}+r^{(\lambda+n-2^{\chi} q)^{2}} \\ & \quad=r^{\lambda \lambda}\left\{1+r^{2^{\chi+1} \lambda q}+r^{2.2^{\chi+1} \lambda q}+r^{3.2^{\chi+1} \lambda q}+\text{etc.}+r^{(2 n-2^{\chi+1} q) \lambda}\right\}=\frac{r^{\lambda \lambda}(1-r^{2 \lambda n})}{1-r^{2^{\chi+1} \lambda q}}=0 \end{aligned}$$

Hence it is easy to see that

$$W=1+r^{2^{2 \chi-2}}+r^{4.2^{2 \chi-2}}+r^{9.2^{2 \chi-2}}+\text{etc.}+r^{(n-2^{\chi-1})^{2}}$$

Let us set $r^{2^{2 \chi-2}}=\rho.$ Then $\rho$  will be a root of the equation $x^{4 q}-1=0,$  and in fact $\rho=\cos \frac{k}{4 q} 360^{\circ}+i \sin \frac{k}{4 q} 360^{\circ}.$  Thus we have

$$\begin{aligned} W & =1+\rho+\rho^{4}+\rho^{9}+\text{etc.}+\rho^{(2^{\chi+1} q-1)^{2}} \\ & =2^{\chi-1}(1+\rho+\rho^{4}+\rho^{9}+\text{etc.}+\rho^{(4 q-1)^{2}}) \end{aligned}$$

But the sum of the series $1+\rho+\rho^{4}+\rho^{9}+\text{etc.}+\rho^{(4 q-1)^{2}}$ is determined by what we have already explained in the cases $n=4,$  $n=8.$  Hence we conclude that


 * in the case where $q=1,$ or where $n$  is a power of 4,

$ W=(1+i) 2^{\chi}=(1+i) \surd{n},$ if $k$ is of the form $4 \mu+1$ $W=(1-i) 2^{\chi}=(1-i) \surd{n},$ if $k$  is of the form $4 \mu+3$


 * which are the exact formulas already given for $n=4;$


 * in the case where $q=2,$ or where $n$  is a power of two with an odd exponent greater than 3,

$W=(1+i) 2^{\chi} \surd{2}\phantom{-}=(1+i) \surd{n},$ if $k$ is of the form $8 \mu+1$

$W=(-1+i) 2^{\chi} \surd{2}=(-1+i) \surd{n},$ if $k$  is of the form $8 \mu+3$

$W=(-1-i) 2^{\chi} \surd{2}=(-1-i) \surd{n},$ if $k$  is of the form $8 \mu+5$

$W=(1-i) 2^{\chi} \surd{2}\phantom{-}=(1-i) \surd{n},$ if $k$  is of the form $8 \mu+7$


 * which also precisely match the formulas we provided for $n=8.$

24.
It will also be worthwhile to determine the ratio of the sum of the series

$$W' = 1 + r^h + r^{4h} + r^{9h} + \text{etc.} + r^{h(n-1)^2}$$

to $W,$ where $h$  is an arbitrary odd integer. Since $W'$ arises from $W$  by replacing $k$  with $kh,$  the value of $W'$  will depend on the form of the number $kh$  in the same way as $W$  depends on the form of the number $k.$  Let us set $\frac{W'}{W} = l.$  Then it is clear that

I. In the case where $n = 4,$ or any higher power of two with an even exponent,

$l = 1,$ if $h$ is of the form $4\mu+1$

$l = -i,$ if $h$  is of the form $4\mu+3,$  and $k$  is of the form $4\mu+1$

$l = +i,$ if $h$  is of the form $4\mu+3,$  and $k$  is of the same form

II. In the case where $n = 8,$ or any higher power of two with an odd exponent,

$l = 1,$ if $h$ is of the form $8\mu+1,$

$l = -1,$ if $h$  is of the form $8\mu+5,$

$l = +i,$ if either $h$  is of the form $8\mu+3,$  and $k$  is of the form $4\mu+1,$

$\phantom{l = +i} \quad$ or $h$  is of the form $8\mu+7,$  and $k$  is of the form $4\mu+3,$

$l = -i,$ if either $h$  is of the form $8\mu+3,$  and $k$  is of the form $4\mu+3,$

$\phantom{l = -i}\quad$ or $h$  is of the form $8\mu+7,$  and $k$  is of the form $4\mu+1.$

With this, the determination of $W$ in those cases where $n$  is a prime number or a power of a prime number is complete. It remains, therefore, for us to finish those cases where $n$ is composed of several prime factors, to which end the following theorem paves the way.

25.
Let $n$ be the product of two relatively prime positive integers $a$  and $b,$  and set

$$\begin{aligned} & P=1+r^{a a}+r^{4 a a}+r^{9 a a}+\text{etc.}+r^{(b-1)^{2} a a} \\ & Q=1+r^{b b}+r^{4 b b}+r^{9 b b}+\text{etc.}+r^{(a-1)^{2} b b} \end{aligned}$$

Then I claim that $W=PQ.$ 

Proof. Let $\alpha$ indefinitely denote the numbers $0,$  $1,$  $2,$  $3 \ldots a-1,$  let $\beta$  indefinitely denote the numbers $0,$  $1,$  $2,$  $3 \ldots b-1,$  and let $\nu$  indefinitely denote the numbers $0,$  $1,$  $2,$  $3 \ldots n-1.$  Then it is clear that

$$P=\Sigma r^{a a \beta \beta}, \quad Q=\Sigma r^{b b \alpha \alpha}, \quad W=\Sigma r^{\nu \nu}$$

Thus, we have $PQ=\Sigma r^{a a \beta \beta +b b \alpha \alpha},$ where all possible values of $\alpha$  and $\beta$  are to be substituted. Furthermore, because $2ab\alpha\beta=2\alpha\beta n,$ we have $PQ=\Sigma r^{(a \beta+b \alpha)^{2}}.$  But it is clearly seen, without difficulty, that the individual values of $a \beta+b \alpha$  are distinct from each other, and each is equal to some value of $\nu.$  Thus, we have $PQ=\Sigma r^{\nu \nu}=W.$

It should also be noted that $r^{a a}$ is a proper root of the equation $x^{b}-1=0,$  and $r^{b b}$  is a proper root of the equation $x^{a}-1=0.$

26.
Now let $n$ be the product of three mutually prime numbers $a,$  $b,$  $c.$  Then clearly if we set $bc = b',$  then $a$  and $b'$  will be relatively prime. Therefore, $W$ is a product of two factors:

$$\begin{aligned} & 1+r^{aa}+r^{4aa}+r^{9aa}+\text{etc.}+r^{(b'-1)^2aa} \\ & 1+r^{b'b'}+r^{4b'b'}+r^{9b'b'}+\text{etc.}+r^{(a-1)^2b'b'} \end{aligned}$$

However, since $r^{aa}$ is a proper root of the equation $x^{bc} - 1 = 0,$  the first factor will be the product of two factors

$$\begin{aligned} & 1+\rho^{bb}+\rho^{4bb}+\rho^{9bb}+\text{etc.}+\rho^{(c-1)^2bb} \\ & 1+\rho^{cc}+\rho^{4cc}+\rho^{9cc}+\text{etc.}+\rho^{(b-1)^2cc} \end{aligned}$$

if we set $r^{aa} = \rho.$ Hence it is clear that $W$  is the product of three factors:

$$\begin{aligned} & 1+r^{bbcc}+r^{4bbcc}+r^{9bbcc}+\text{etc.}+r^{(a-1)^2bbcc} \\ & 1+r^{aacc}+r^{4aacc}+r^{9aacc}+\text{etc.}+r^{(b-1)^2aacc} \\ & 1+r^{aabb}+r^{4aabb}+r^{9aabb}+\text{etc.}+r^{(c-1)^2aabb} \end{aligned}$$

where $r^{bbcc},$ $r^{aacc},$  and $r^{aabb}$  are proper roots of the equations $x^a - 1 = 0,$  $x^b - 1 = 0,$  $x^c - 1 = 0,$  respectively.

27.
From this it is easily concluded that in general, if $n$ is the product of any prime factors $a,$  $b,$  $c,$  etc. , then $W$ will be a product of as many factors

$$\begin{aligned} & 1+r^{\frac{n n}{a a}}+r^{\frac{4 n n}{a a}}+r^{\frac{9 n n}{a a}}+\text{etc.}+r^{\frac{(a-1)^{2} n n}{a a}} \\ & 1+r^{\frac{n n}{b b}}+r^{\frac{4 n n}{b b}}+r^{\frac{9 n n}{b b}}+\text{etc.}+r^{\frac{(b-1)^{2} n n}{b b}} \\ & 1+r^{\frac{n n}{c c}}+r^{\frac{4 n n}{c c}}+r^{\frac{9 n n}{c c}}+\text{etc.}+r^{\frac{(c-1)^{2} n n}{c c}} \text{ etc.} \end{aligned}$$

where $r^{\frac{n n}{a b}},$ $r^{\frac{n n}{ b b}},$  $r^{\frac{n n}{c c}}$  etc. are proper roots of the equations $x^{a}-1=0,$ $x^{b}-1=0,$  $x^{c}-1=0$  etc.

28.
Out of these principles, a passage to the complete determination of $W$ for any given value of $n$  has appeared before us. Let $n$ be decomposed into factors $a,$  $b,$  $c,$  etc. , which are either distinct prime numbers or powers of distinct prime numbers. Let $r^{\frac{n n}{a a}}=A,$ $r^{\frac{n n}{b b}}=B,$  $r^{\frac{n n}{c c}}=C,$  etc. , and let $A,$ $B,$  $C,$  etc. be the respective roots of the equations $x^{a}-1=0,$ $x^{b}-1=0,$  $x^{c}-1=0,$  etc. Then $W$ is the product of the factors

$$\begin{aligned} & 1+A+A^{4}+A^{9}+\text{etc.}+A^{(u-1)^{2}} \\ & 1+B+B^{4}+B^{9}+\text{etc.}+B^{(b-1)^{2}} \\ & 1+C+C^{4}+C^{9}+\text{etc.}+C^{(c-1)^{2}} \text{ etc.} \end{aligned}$$

But each of these factors can be determined by the methods explained in articles 20, 21, 23. Hence, the value of the product can also be known. It will be useful to collect the rules for determining these factors here. When the root $A$ is $=\frac{k n}{a} \cdot \frac{360^{0}}{a},$  the sum $1+A+A^{4}+A^{9}+\text{etc.}+A^{(a-1)^{2}},$  which we shall denote by $L,$  will be determined by the number $\frac{k n}{a},$  in the same way that $W$  was determined by $k$  in our general discussion. We have already distinguished twelve cases:


 * I. If $a$ is a prime number of the form $4 \mu+1,$  say $=p,$  or a power of such a prime number with an odd exponent, and at the same time $\frac{k n}{a}$  is a quadratic residue modulo $p,$  then $L=+\surd{a}.$


 * II. If $\frac{k n}{a}$ is a quadratic non-residue modulo $p,$  then $L=-\surd{a}.$


 * III. If $a$ is a prime number of the form $4 \mu+3,$  say $=p,$  or a power of such a prime number with an odd exponent, and at the same time $\frac{k n}{a}$  is a quadratic residue modulo $p,$  then $L=+i \surd{a}.$


 * IV. If, with the rest of the assumptions as in III, $\frac{k n}{a}$ is a quadratic non-residue modulo $p,$  then $L=-i \surd{a}.$


 * V. If $a$ is a square number, or a higher power of a prime number (with an even exponent), then $L=+\surd{a}.$


 * VI. If $a=2,$ then $L=0.$


 * VII. If $a=4$ or a higher power of two with an even exponent, and also $\frac{k n}{a}$  is of the form $4 \mu+1,$  then $L=(1+i) \surd{a}.$


 * VIII. If, with the rest of the assumptions as in VII, $\frac{k n}{a}$ is of the form $4 \mu+3,$  then $L=(1-i) \surd{a}.$


 * IX. If $a=8,$ or a higher power of two with an odd exponent, and at the same time $\frac{k n}{a}$  is of the form $8 \mu+1,$  then $L=(1+i) \surd{a}.$


 * X. If, with the rest of the assumptions as in IX, $\frac{k n}{a}$ is of the form $8 \mu+3,$  then $L=(-1+i) \surd{a}.$


 * XI. If, with the rest of the assumptions as in IX, $\frac{k n}{a}$ is of the form $8 \mu+5,$  then $L=(-1-i) \surd{a}.$


 * XII. If, with the rest of the assumptions as in IX, $\frac{k n}{a}$ is of the form $8 \mu+7,$  then $L=(1-i) \surd{a}.$

29.
For example, let $n=2520=8. 9 . 5 . 7$ and $k=13.$  In this case, we have

for $a=8,$ by case XII, $L=(1-i) \surd{8}$

for the factor 9, by case V, the corresponding sum will be $=\surd{9}$

for the factor 5, by case II, the corresponding sum will be $=-\surd{5}$

for the factor 7, by case III, the corresponding sum will be $=+i \surd{7}$ Hence, we get $W=(1-i) \cdot(-i) \cdot \surd{2520}=(-1-i) \surd{2520}.$

If, for the same value of $n,$ we set $k = 1,$  then

for the factor 8, the sum is $(-1+i) \surd{8}$

for the factor 9, the sum is $\surd{9}$

for the factor 5, the sum is $\surd{5}$

for the factor 7, the sum is $-i \surd{7}$ Hence, the product is $W = (1+i) \surd{2520}.$

30.
Another method of finding the sum $W$ in a general manner is suggested by that which was set forth in articles 22 and 24. Set $\cos \omega+i \sin \omega=\rho,$ and

$$\rho^{\frac{n n}{a a}}=\alpha, \quad \rho^{\frac{n n}{b b}}=\beta, \quad \rho^{\frac{n n}{c c}}=\gamma \text{ etc.}$$

so that we have $r=\rho^{k},$ $A=\alpha^{k},$  $B=\beta^{k},$  $C=\gamma^{k}$  etc. Then

$$1+\rho+\rho^{4}+\rho^{9}+\text{etc.}+\rho^{(n-1)^{2}}$$

will be a product of factors

$$\begin{aligned} & 1+\alpha+\alpha^{4}+\alpha^{9}+\text{etc.}+\alpha^{(a-1)^{2}} \\ & 1+\beta+\beta^{4}+\beta^{9}+\text{etc.}+\beta^{(b-1)^{2}} \\ & 1+\gamma+\gamma^{4}+\gamma^{9}+\text{etc.}+\gamma^{(c-1)^{2}} \text{ etc.} \end{aligned}$$

and therefore $W$ will be a product of factors

$$\begin{aligned} & w=1+\rho+\rho^{4}+\rho^{9}+\text{etc.}+\rho^{(n-1)^{2}} \\ & \mathfrak{A}=\frac{1+A+A^{4}+A^{9}+\text{etc.}+A^{(a-1)^{2}}}{1+\alpha+\alpha^{4}+\alpha^{9}+\text{etc.}+a^{(a-1)^{2}}} \\ & \mathfrak{B}=\frac{1+B+B^{4}+B^{9}+\text{etc.}+B^{(b-1)^{2}}}{1+\beta+\beta^{4}+\beta^{9}+\text{etc.}+\beta^{(b-1)^2}} \\ & \mathfrak{C}=\frac{1+C+C^{4}+C^{9}+\text{etc.}+C^{(c-1)^{2}}}{1+\gamma+\gamma^{4}+\gamma^{9}+\text{etc.}+\gamma^{(c-1)^{2}}} \text{ etc.} \end{aligned}$$

Now, the first factor $w$ is determined by the discussion in article 19 above; the remaining factors $\mathfrak{A},$  $\mathfrak{B},$  $\mathfrak{C}$  etc. come from the formulas of articles 22 and 24, which are collected here again so that they can all be considered together. Twelve cases must be distinguished here, namely


 * I. If $a$ is a prime number (odd) $=p,$  or a power of such a number with an odd exponent, and $k$  is a quadratic residue modulo $p,$  then the corresponding factor will be $\mathfrak{A}=+1.$


 * II. If, with the rest of the assumptions as in I, $k$ is a quadratic non-residue modulo $p,$  then $\mathfrak{A}=-1.$


 * III. If $a$ is the square of an odd prime number, or a higher power with an even exponent, then $\mathfrak{A}=+1.$


 * IV. If $a$ is $=4,$  or a higher power of two with an even exponent, and $k$  is of the form $4 \mu+1,$  then $\mathfrak{A}=+1.$


 * V. If, with the rest of the assumptions as in IV, $k$ is of the form $4 \mu+3,$  and $\frac{n}{a}$  is of the form $4 \mu+1,$  then $\mathfrak{A}=-i.$


 * VI. If, with the rest of the assumptions as in IV, $k$ is of the form $4 \mu+3,$  and $\frac{n}{a}$  is of the form $4 \mu+3,$  then $\mathfrak{A}=+i.$


 * VII. If $a$ is $=8,$  or a higher power of two with an odd exponent, and $k$  is of the form $8 \mu+1,$  then $\mathfrak{A}=+1.$


 * VIII. If, with the rest of the assumptions as in VII, $k$ is of the form $8 \mu+5,$  then $\mathfrak{A}=-1.$


 * IX. If, with the rest of the assumptions as in VII, $k$ is of the form $8 \mu+3,$  and $\frac{n}{a}$  is of the form $4 \mu+1,$  then $\mathfrak{A}=+i.$


 * X. If, with the rest of the assumptions as in VII, $k$ is of the form $8 \mu+3,$  and $\frac{n}{a}$  is of the form $4 \mu+3,$  then $\mathfrak{A}=-i.$


 * XI. If, with the rest of the assumptions as in VII, $k$ is of the form $8 \mu+7,$  and $\frac{n}{a}$  is of the form $4 \mu+1,$  then $\mathfrak{A}=-i.$


 * XII. If, with the rest of the assumptions as in VII, $k$ is of the form $8 \mu+7,$  and $\frac{n}{a}$  is of the form $4 \mu+3,$  then $\mathfrak{A}=+i.$

We omit the case where $a=2;$ indeed, in this case $\mathfrak{A}$  would be $\frac{0}{0},$  or indeterminate, but then anyway $W=0$.

The remaining factors $\mathfrak{B},$ $\mathfrak{C},$  etc. depend in the same way on $b,$ $c,$  etc. , as $\mathfrak{A}$ depends on $a.$

31.
According to this second method, the first example in article 29 is as follows:


 * The factor $w$ is $=(1+i) \surd{2520}$


 * For $a=8,$ the corresponding factor $\mathfrak{A}$  is, by case VIII, $=-1$


 * The second factor $9$ corresponds to a factor $+1$  (by case III)


 * The factor $5$ corresponds to a factor $-1$  (by case II)


 * The factor $7$ corresponds to a factor $-1$  (by case II)

Hence, the product $W=(-1-i) \surd{2520}$ is obtained, as in article 29.

32.
Since the value of $W$ can be determined using two methods, one of which is based on the relations of the numbers $\frac{n k}{a},$  $\frac{n k}{b},$  $\frac{n k}{c},$  etc. with the numbers $a,$ $b,$  $c,$  etc. , and the other depending on the relations of $k$ with the numbers $a,$  $b,$  $c,$  etc. , there must be a certain conditional connection between all these relations, so that each of them must be determinable from the others. Let us suppose that all the numbers $a,$ $b,$  $c,$  etc. are odd prime numbers, and take $k=1.$ Let the factors $a,$  $b,$  $c,$  etc. be distributed into two classes, one of which contains those that are of the form $4\mu+1,$ and which are denoted by $p,$  $p^{\prime},$  $p^{\prime\prime},$  etc. , and the other consisting of those that are of the form $4\mu+3,$ and which are denoted by $q,$  $q^{\prime},$  $q^{\prime\prime},$  etc. We will designate the multitude of the latter by $m.$ Having done this, we observe first that $n$  will be of the form $4\mu+1,$  when $m$  is even (which also applies to the case where the factors of the other class are completely absent, or where $m=0$ ), whereas $n$  will be of the form $4\mu+3,$  when $m$  is odd. Now the determination of $W$ is achieved by the first method as follows. Let numbers $P,$ $P^{\prime},$  $P^{\prime\prime},$  etc. , $Q,$ $Q^{\prime},$  $Q^{\prime\prime},$  etc. be determined from the relations between the numbers $\frac{n}{p},$ $\frac{n}{p^{\prime}},$  $\frac{n}{p^{\prime \prime}}$  etc., $\frac{n}{q},$  $\frac{n}{q^{\prime}},$  $\frac{n}{q^{\prime \prime}}$  and the numbers $p,$  $p^{\prime},$  $p^{\prime\prime},$  etc. , $q,$ $q^{\prime},$  $q^{\prime\prime},$  etc. , respectively, by setting

$P=+1,$ if $\frac{n}{p}$ is a quadratic residue modulo $p$

$P=-1,$ if $\frac{n}{p}$  is a quadratic non-residue modulo $p$

and likewise for the rest. Then $W$ will be the product of the factors $P \surd{p},$  $P^{\prime} \surd{p^{\prime}},$  $P^{\prime\prime} \surd{p^{\prime\prime}},$  etc. , $iQ \surd{q},$ $iQ^{\prime} \surd{q^{\prime}},$  $iQ^{\prime\prime} \surd{q^{\prime\prime}},$  etc. , and hence

$$W=P P^{\prime} P^{\prime\prime} \ldots Q Q^{\prime} Q^{\prime\prime} \ldots i^{m} \surd{n}$$

By the second method, or rather directly by the rules from article 19,

$W=+\surd{n},$ if $n$ is of the form $4\mu+1,$ or equivalently, if $m$  is even

$W=+i \surd{n},$ if $n$  is of the form $4\mu+3,$  or if $m$  is odd Both cases may be included together in the following formula:

$$W=i^{m m} \surd{n}$$

Hence it follows that

$$P P^{\prime} P^{\prime\prime} \ldots Q Q^{\prime} Q^{\prime\prime} \ldots=i^{m m-m}$$

But $i^{m m-m}$ is $=1$  whenever $m$  is of the form $4\mu$  or $4\mu+1,$  and $=-1$  whenever $m$  is of the form $4\mu+2$  or $4\mu+3,$  and from this we deduce the following very elegant

''Let $a,$ $b,$  $c,$  etc. denote positive odd prime numbers that are not equal to each other, and let their product be $=n.$ Let $m$  be the number of the form $4\mu + 3$  among them, so that the other numbers are of the form $4\mu + 1.$  Then the multitude of those numbers among $a,$  $b,$  $c,$  etc. such that $\frac{n}{a},$ $\frac{n}{b},$  $\frac{n}{c},$  etc. are quadratic non-residues, will be even whenever $m$ is of the form $4\mu$  or $4\mu + 1,$  but odd whenever $m$  is of the form $4\mu + 2$  or $4\mu + 3.$ ''

By setting e. g. $a=3,$ $b=5,$  $c=7,$  $d=11,$  we have three numbers of the form $4\mu + 3,$  namely $3,$  $7,$  and $11;$  and we have $5. 7 . 11 R 3;$ $3. 7 . 11 R 5;$ $3. 5 . 11 R 7;$ $3. 5 . 7 N 11,$ so there is a unique $\frac{n}{d}$  which is a quadratic non-residue modulo $d.$

33.
The celebrated fundamental theorem concerning quadratic residues is nothing but a special case of the theorem just developed. By limiting the multitude of the numbers $a,$ $b,$  $c,$  etc. to two, it is evident that if only one of them, or neither, is of the form $4 \mu+3,$ then we must have simultaneously $a R b,$  $b R a,$  or simultaneously $a N b,$  $b N a.$  On the other hand, if both are of the form $4 \mu+3,$  then one of them must be a quadratic non-residue modulo the other, and the other a quadratic residue modulo the one. And so a fourth demonstration has been given for this most important theorem, the first and second demonstration having been given in Disquisitiones Arithmeticae, and the third recently in a special commentary (Commentt. T. XVI). We will present two other proofs in the future, based again on completely different principles. It is exceedingly surprising that this most beautiful theorem, which at first so obstinately eluded all attempts, could be approached later by methods so very distant from one other.

34.
In fact, the remaining theorems, which act as a supplement to the fundamental theorem, that is, by which the prime numbers for which $-1,$ $2,$  and $-2$  are quadratic residues or non-residues may be identified, can also be derived from the same principles. Let us start with the residue $+2.$

Set $n=8a,$ where $a$  is a prime number, and let $k=1.$  Then by the method of article 28, $W$  will be the product of two factors, of which one will be $+\surd{a}$  or $+i\surd{a},$  if $8,$  or equivalently $2,$  is a quadratic residue modulo $a;$  or else $-\surd{a}$  or $-i\surd{a},$  if 2 is a quadratic non-residue modulo $a.$  The second factor is

$(1+i)\surd{8},$ if $a$ is of the form $8\mu+1$

$(-1+i)\surd{8},$ if $a$  is of the form $8\mu+3$

$(-1-i)\surd{8},$ if $a$  is of the form $8\mu+5$

$(1-i)\surd{8},$ if $a$  is of the form $8\mu+7$

But by article 18, we will always have $W=(1+i)\surd{n}.$ Dividing this value by the four values of the second factor, it is clear that the first factor must be

$ +\surd{a},$ if $a$ is of the form $8\mu+1$

$-i\surd{a},$ if $a$  is of the form $8\mu+3$

$-\surd{a},$ if $a$  is of the form $8\mu+5$

$+i\surd{a},$ if $a$  is of the form $8\mu+7$

From this it follows automatically that $2$ must be a quadratic residue modulo $a$  in the first and fourth cases, and in the second and third cases it must be a quadratic non-residue.

35.
Prime numbers for which $-1$ is a quadratic residue or non-residue are easily recognized with the help of the following theorem, which is also quite memorable by itself.

The product of the two factors

$$\begin{aligned} & W^{\prime}=1+r^{-1}+r^{-4}+\text{etc.}+r^{-(n-1)^{2}} \\ & W=1+r+r^{4}+\text{etc.}+r^{(n-1)^{2}} \end{aligned}$$

is $=n,$ if $n$  is odd, or $=0,$  if $n$  is odd even, or $=2 n,$  if $n$  is evenly even.

Proof. Since it is clear that

$$\begin{aligned} W & =r+r^{4}+r^{9}+\text{etc.}+r^{n n} \\ & =r^{4}+r^{9}+\text{etc.}+r^{(n+1)^{2}} \\ & =r^{9}+\text{etc.}+r^{(n+2)^{2}} \text{ etc.} \end{aligned}$$

the product $W {W}^{\prime}$ can also be presented as

$$\begin{aligned} &\phantom{ +, } 1+r+r^{4}+r^{9}+\text{etc.}+r^{(n-1)^{2}} \\ &+ r^{-1}(r+r^{4}+r^{9}+r^{16}+\text{etc.}+r^{n n}) \\ &+ r^{-4}(r^{4}+r^{9}+r^{16}+r^{25}+\text{etc.}+r^{(n+1)^{2}}) \\ &+ r^{-9}(r^{9}+r^{16}+r^{25}+r^{36}+\text{etc.}+r^{(n+2)^{2}}) \\ &\text{etc.} \\ &+ r^{-(n-1)^{2}}(r^{(n-1)^{2}}+r^{n n}+r^{(n+1)^{2}}+r^{(n+2)^{2}}+\text{etc.}+r^{(2 n-2)^{2}}) \end{aligned}$$

which, when summed vertically, produces

$$\begin{aligned} &\phantom{+}n \\ &+r(1+r r+r^{4}+r^{6}+\text{etc.}+r^{2 n-2}) \\ &+r^{4}(1+r^{4}+r^{8}+r^{12}+\text{etc.}+r^{4 n-4}) \\ &+r^{9}(1+r^{6}+r^{12}+r^{18}+\text{etc.}+r^{6 n-6}) \\ &+\text{etc.} \\ &+r^{(n-1)^{2}}(1+r^{2 n-2}+r^{4 n-4}+r^{6 n-6}+\text{etc.}+r^{2(n-1)^{2}}) \end{aligned}$$

Now if $n$ is odd, each part of this sum, except the first $n,$  will be $=0.$  For the second part is clear $\frac{r(1-r^{2 n})}{1-r r},$  the third $\frac{r^{4}(1-r^{4 n})}{1-r^{4}},$  etc. When $n$ is even, it is also be necessary to study the part

$$r^{\frac{1}{4} n n}(1+r^{n}+r^{2 n}+r^{3 n}+\text{etc.}+r^{n n-n})$$

which is $=n r^{\frac{1}{4} n n}.$ In the former case, we therefore obtain $W W^{\prime}=n,$  but in the latter, $=n+n r^{\frac{1}{4} n n}.$  But $r^{\frac{1}{4} n n}$  will be $=+1,$  if $n$  is evenly even, and thus $W W^{\prime}=2 n.$  On the other hand, if $n$  is oddly even, then $r^{\frac{1}{4} n n}=-1,$  and thus $W W^{\prime}=0.$  Q. E. D.

36.
Already from article 22, it is clear that if $n$ is an odd prime number, then $\frac{W^{\prime}}{W}$  will be equal to $+1$  or $-1,$  depending on whether $-1$  is a quadratic residue or a non-residue modulo $n.$  Hence in the former case, we must have $W^{2}=+n,$  in the latter $W^{2}=-n;$  wherefore, by article 13, we conclude that the former case can only occur when $n$  is of the form $4 \mu+1,$  and the latter case when $n$  is of the form $4 \mu+3.$

Finally, from the combination of conditions for the residues $+2$ and $-1,$  it naturally follows that $-2$  is a quadratic residue modulo any prime number of the form $8\mu+1$  or $8\mu+3,$  and it is a quadratic non-residue modulo any prime number of the form $8\mu+5$  or $8\mu+7.$