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