# On the expression of a number in the form 𝑎𝑥²+𝑏𝑦²+𝑐𝑧²+𝑑𝑢²

*On the expression of a number in the form .*

By S. Ramanujan, B.A., Trinity College. (Communicated by Mr G. H. Hardy.)

[*Received* 19 September 1916; *read* October 30, 1916.]

- It is well known that all positive integers can be expressed as the sum of four squares. This naturally suggests the question:
*For what positive integral values of , , , can all positive integers be expressed in the form*? (1·1) I prove in this paper that there are only sets of values of , , , for which this is true.

The more general problem of finding all sets of values of , , , for which all integers*with a finite number of exceptions*can be expressed in the form (1·1), is much more difficult and interesting. I have considered only very special cases of this problem, with two variables instead of four; namely the cases in which (1·1) has one of the special forms(1·2), and (1·3).

These two cases are comparatively easy to discuss. In this paper I give the discussion of (1·2) only, reserving that of (1·3) for another paper. - Let us begin with the first problem. We can suppose, without loss of generality, that
(2·1).

If , then cannot be expressed in the form (1·1); and so(2·2).

If , then is an exception; and so(2·3).

We have therefore only to consider the two cases in which (1·1) has one or other of the forms(2·31).

In the second case, if , then is an exception; and so(2·32). We can now distinguish possible cases.

(2·41) .

(2·411). (2·42) .

(2·421). (2·43) .

(2·431). (2·44) .

(2·441). (2·45) .

(2·451). (2·46) .

(2·461). (2·47) .

(2·471). We have thus eliminated all possible sets of values of , , , , except the following 55:

Of these 55 forms, the 12 forms1, 1, 1, 1 1, 2, 3, 5 1, 2, 4, 8 1, 1, 1, 2 1, 2, 4, 5 1, 2, 5, 8 1, 1, 2, 2 1, 2, 5, 5 1, 1, 2, 9 1, 2, 2, 2 1, 1, 1, 6 1, 2, 3, 9 1, 1, 1, 3 1, 1, 2, 6 1, 2, 4, 9 1, 1, 2, 3 1, 2, 2, 6 1, 2, 5, 9 1, 2, 2, 3 1, 1, 3, 6 1, 1, 2, 10 1, 1, 3, 3 1, 2, 3, 6 1, 2, 3, 10 1, 2, 3, 3 1, 2, 4, 6 1, 2, 4, 10 1, 1, 1, 4 1, 2, 5, 6 1, 2, 5, 10 1, 1, 2, 4 1, 1, 1, 7 1, 1, 2, 11 1, 2, 2, 4 1, 1, 2, 7 1, 2, 4, 11 1, 1, 3, 4 1, 2, 2, 7 1, 1, 2, 12 1, 2, 3, 4 1, 2, 3, 7 1, 2, 4, 12 1, 2, 4, 4 1, 2, 4, 7 1, 1, 2, 13 1, 1, 1, 5 1, 2, 5, 7 1, 2, 4, 13 1, 1, 2, 5 1, 1, 2, 8 1, 1, 2, 14 1, 2, 2, 5 1, 2, 3, 8 1, 2, 4, 14 1, 1, 3, 5 1, 1, 1, 2 1, 1, 2, 4 1, 2, 4, 8 1, 1, 2, 2 1, 2, 2, 4 1, 1, 3, 3 1, 2, 2, 2 1, 2, 4, 4 1, 2, 3, 6 1, 1, 1, 4 1, 1, 2, 8 1, 2, 5, 10 have been already considered by Liouville and Pepin

^{[1]}. -
I shall now prove that all integers can be expressed in each of the 55 forms. In order to prove this we shall consider the seven cases (2·41)—(2·47) of the previous section separately. We shall require the following results concerning ternary quadratic arithmetical forms.
The necessary and sufficient condition that a number
*cannot*be expressed in the form

is that it should be of the form(3·1) (3·11).

Similarly the necessary and sufficient conditions that a number*cannot*be expressed in the forms(3·2), (3·3), (3·4), (3·5), (3·6), (3·7),

are that it should be of the forms(3·21), (3·31), (3·41), (3·51), (3·61),

The result concerning is due to Cauchy: for a proof see Landau,*or*^{[2]}(3·71). *Handbuch der Lehre von der Verteilung der Primzahlen*, p. 550. The other results can be proven in an analogous manner. The form has been considered by Lebesgue, and the form by Dirichlet. For references see Bachmann,*Zahlentheorie*, vol. iv, p. 149. - We proceed to consider the seven cases (2·41)—(2·47). In the first case we have to show that any number can be expressed in the form
(4·1), being any integer between and inclusive.

If is not of the form , we can satisfy (4·1) with . We may therefore suppose that .

First, suppose that has one of the values , , , , . Take . Then the numberNext, let . If , take . Then

.

If , take . Then

.

Finally, let . If is equal to , , or , take . Then is equal to , , or . If , take . Then

.

Thus in all cases is expressible in the form (4·1). Similarly we can dispose of the remaining cases, with the help of the results stated in §3. Thus in discussing (2·42) we use the theorem that every number not of the form (3·21) can be expressed in the form (3·2). The proofs differ only in detail, and it is not worth while to state them at length.

- We have seen that all integers without any exception can be expressed in the form
(5·1), when , and . We shall now consider the values of and for which all integers

In the first place must be or . For, if , we can choose an integer so that*with a finite number of exceptions*can be expressed in the form (5·1).,

We have therefore only to consider the two cases in which is or . First let us consider the form

(5·2).

I shall show that, when has any of the values

or is of any of the forms(5·21), (5·22), then all integers save a finite number, and in fact all integers from onwards at any rate, can be expressed in the form (5·2); but that for the remaining values of there is an infinity of integers which cannot be expressed in the form required.

In proving the first result we need obviously only consider numbers of the form greater than , since otherwise we may take . The numbers of this form less than are plainly among the exceptions. - I shall consider the various cases which may arise in order of simplicity.
(6·1) .

.

(6·2) .

Hence the only numbers which cannot be expressed in the form (5·2) in this case are the numbers of the form not exceeding .

(6·3) .

.

;

.

Hence the only numbers which cannot be expressed in the form (5·2) are those of the form not exceeding , and those of the form lying between and .

(6·4) .

.

.

.

In order to determine precisely which are the exceptional numbers, we must consider more particularly the numbers between and for which . For these must be , and

.

.

which lie between and and are of the form(6·41) (6·42).

Now in order that (6·41) may be of the form (6·42), must be if is of the form and may have any of the values if is of the form . Thus the only numbers which cannot be expressed in the form (5·2), in this case, are those of the form less than and those of the form,

(6·5) .

In this case we have to prove that

(i) if , there is an infinity of integers which cannot be expressed in the form (5·2);

(ii) if is , , , or , there is only a finite number of exceptions.

.

,

where is an integer; and so is not of the form .

In order to prove (ii) we may suppose, as usual, that.

.

,

where . In either case the proof may be completed as before. Thus the only numbers which cannot be expressed in the form (5·2), in this case, are those of the form not exceeding . In other words, there is no exception when ; is the only exception when ; and are the only exceptions when ; , and are the only exceptions when .

(6·6) .

By arguments similar to those used in (6·5), we can show that

(i) if , there is an infinity of integers which cannot be expressed in the form (5·2);

(ii) if is equal to , , , or , there is only a finite number of exceptions, namely the numbers of the form not exceeding .

(6·7) .

By arguments similar to those used in (6·3), we can show that the only numbers which cannot be expressed in the form (5·2) are those of the form not exceeding , and those of the form lying between and .

(6·8) .

,

lying between and , where if is of the form and if is of the form . We have thus completed the discussion of the form (5·2), and determined the exceptional values of precisely whenever they are in finite number. - We shall proceed to consider the form
(7·1). In the first place, must be odd; otherwise the odd numbers cannot be expressed in this form. Suppose then that is odd. I shall show that all integers save a finite number can be expressed in the form (7·1); and that the numbers which cannot be so expressed are

(i) the odd numbers less than ,

(ii) the numbers of the form less than ,

(iii) the numbers of the form greater than and less than ,

(iv) the numbers of the form,

greater than and less than , where if , if , if , and if .

.

(7·2). Since , it follows from (6·2) that all integers except those which are less than and of the form can be expressed in the form (7·2). Hence the only

This completes the discussion of the case in which is even. If is odd the discussion is more difficult. In the first place, all odd numbers less than are plainly among the exceptions. Secondly, since and are both odd, must also be odd. We can therefore suppose that*even*integers which cannot be expressed in the form (7·1) are those of the form less than .,

,

(7·3).

If is not of the form , we can take . If it is of this form, and less than , it is plainly an exception. These numbers give rise to the exceptions specified in (iii) of section 7. We may therefore suppose that is of the form and greater than . - In order to complete the discussion, we must consider the three cases in which , , and separately.
(8·1) .

.

,

,

lying between and .(8·2) .

.

(8·3) .

.

This completes the proof that there is only a finite number of exceptions. In order to determine what they are in this case, we have to consider the values of , between and , for which and

.

.

which lie between and and are of the form(8·31)

But in order that (8·31) may be of the form (8·32), must be if is of the form , and may have any of the values if is of the form . It follows that the only numbers greater than which cannot be expressed in the form (7·1), in this case, are the numbers of the form(8·32). ,

This completes the proof of the results stated in section 7.

- ↑ There are a large number of short notes by Liouville in vols. v–viii of the second series of his journal. See also Pepin,
*ibid*., ser. 4, vol vi, pp. 1–67. The object of the work of Liouville and Pepin is rather different from mine, viz. to determine, in a number of special cases, explicit formulae for the number of representations, in terms of other arithmetical functions. - ↑ Results (3·11)—(3·71) may tempt us to suppose that there are similar simple results for the form , whatever are the values of , , . It appears, however, that in most cases there are no such simple results. For instance, the numbers which are not of the form are those belonging to one or other of the
*four*classesHere some of the numbers of the first class belong also to one of the next three classes.

Again, the even numbers which are not of the form are the numbers

,

while the odd numbers that are not of that form, viz.do not seem to obey any simple law.

I have succeeded in finding a law in the following six simple cases:

The numbers which are not of these forms are the numbers*or*,

,

,

, ,*or*,

,

*or*.

This work was published before January 1, 1926, and is in the **public domain** worldwide because the author died at least 100 years ago.