# 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). - 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

In the first case, if , then is an exception; and so

(2Β·31). In the second case, if , then is an exception; and so

(2Β·32).

We can now distinguish possible cases.(2Β·41)β.

If , is an exception; and so

(2Β·411). (2Β·42)β.

(2Β·421). (2Β·43)β.

If , is an exception; and so

(2Β·431). (2Β·44)β.

If , is an exception; and so

(2Β·441). (2Β·45)β.

If , is an exception; and so

(2Β·451). (2Β·46)β.

If , is an exception; and so

(2Β·461). (2Β·47)β.

If , is an exception; and so

(2Β·471).

We have thus eliminated all possible sets of values of , , , , except the following 55:1, 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 ^{[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(3Β·1)

is that it should be of the form(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), *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 number

is plainly not of the form , and is therefore expressible in the form .Next, let . If , take . Then

. If , take . Then

.

In neither of these cases is of the form , and therefore in either case it can be expressed in the form .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.

Therefore in either case can be expressed in the form . - 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

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

for all values of . Then,

where is any positive integer, is not an integer; and so can certainly not 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(5Β·21), or is of any of the forms

(5Β·22),

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.

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. - I shall consider the various cases which may arise in order of simplicity.
(6Β·1)β.

There are an infinity of exceptions. For suppose that

.

Then the number

cannot be expressed in the form .(6Β·2)β.

There is only a finite number of exceptions. In proving this we may suppose that . Take . Then the number

is congruent to , , , or to modulus , and so can be expressed in the form .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)β.

There is only a finite number of exceptions. We may suppose again that . First, let . Take . Then

.

If we cannot take , since;

so we take . Then.

In either of these cases is of the form .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)β.

There is only a finite number of exceptions. Take

.

If , take . Then.

If , take . Then.

In either case the proof is completed as before.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

.

But the numbers which are multiples of and which cannot be expressed in the form are the numbers.

The exceptions required are therefore those of the numbers(6Β·41)

which lie between and and are of the form(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,

lying between and , where if is of the form , and if is 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.

In order to prove (i) suppose that . Then obviously cannot be zero. But if is not zero is always of the form . Hence

.

Since , must be greater than or equal to , to ensure that the right-hand side shall not be negative. Hence, where

is an integer; and so is not of the form .In order to prove (ii) we may suppose, as usual, that

.

If , take . Then.

If , take . Then, 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)β.

By arguments similar to those used in (6Β·4), we can show that the only numbers which cannot be expressed in the form (5Β·2) are those of the form less than , and those 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.

lying between and , where if is of the form and if is of the form . - 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 .

First, let us suppose even. Then, since is odd and is even, it is clear that must be even. Suppose then that

.

We have to show that can be expressed in the form(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*even*integers which cannot be expressed in the form (7Β·1) are those of the form less than .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

,

where is an integer of the form , so that may assume the values . And we have to consider whether can be expressed in the form,

or in the form(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)β.

If is equal to , , or , take . Then

is one of the forms.

If we cannot take , since assumes the form ; so we take . Then

is of the form . In either of these cases is of the form . Hence the only values of , other than those already specified, which cannot be expressed in the form (7Β·3), are those of the form,

lying between and . In other words, the only numbers greater than which cannot be expressed in the form (7Β·1), in this case, are the numbers of the form,

lying between and .(8Β·2)β.

If , take . Then

is one of the forms.

If , we cannot take , since assumes the form ; so we take . Then

is of the form . In either of these cases is of the form . Hence the only values of , other than those already specified, which cannot be expressed in the form (7Β·3), are those of the form lying between and . In other words, the only numbers greater than which cannot be expressed in the form (7Β·1), in this case, are the numbers of the form lying between and .(8Β·3)β.

If , take . Then

is of one of the forms.

If , take . Then

is of the form . In either of these cases is of the form .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

.

But the numbers which are multiples of and which cannot be expressed in the form are the numbers.

The exceptional values of required are therefore those of the numbers(8Β·31)

which lie between and and are of the form(8Β·32).

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,

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

lying between and , where if is of the form , and if is of the form .

- β 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.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 is in the **public domain** in the **United States** because it was published before January 1, 1923.

The author died in 1920, so this work is also in the **public domain** in countries and areas where the copyright term is the author's **life plus 80 years or less**. This work may also be in the **public domain** in countries and areas with longer native copyright terms that apply the **rule of the shorter term** to foreign works.