How did Ramanujan discover this identity?

You have two questions: 1) How Ramanujan discovered it? 2) Is an accidental, isolated result? The second one is easier to answer and may shed light on the first.

I. Define $F_n = x_1^n+x_2^n+x_3^n-(y_1^n+y_2^n+y_3^n),\;$ where $\,\small x_1+x_2+x_3=y_1+y_2+y_3 = 0$.

Theorem 1: If $F_1 = F_3 = 0$, then,

$$9x_1x_2x_3 F_6 = 2F_9 = 9y_1y_2y_3 F_6$$

Theorem 2: If $F_2 = F_4 = 0$, then,

$$64F_6F_{10} = 45F_8^2\quad \text{(Ramanujan)}$$

$$25F_3F_{7} = 21F_5^2\quad \text{(Hirschhorn)}$$

II. Define $F_n = x_1^n+x_2^n+x_3^n+x_4^n-(y_1^n+y_2^n+y_3^n+y_4^n),\;$ where also $\,\small \sum x_i =\sum y_i= 0$.

Theorem 3: If $F_1 = F_3 = F_5 = 0$, then,

$$7F_4F_9 = 12F_6F_7\quad \text{(yours truly)}$$

This also has a similar Ramanujan-type formulation. Define,

$$\small P_n = ((a+b+c)^n + (a-b-c)^n + (-a-b+c)^n + (-a+b-c)^n – ((d+e+f)^n + (d-e-f)^n + (-d-e+f)^n + (-d+e-f)^n)$$

If two conditions are satisfied,

$$\small abc = def,\quad a^2+b^2+c^2 = d^2+e^2+f^2$$

then,

$$7P_4P_9 = 12P_6P_7$$

(The two conditions have an infinite number of primitive solutions, one of which is $1,10,12;\,2,4,15$.)

If you are looking for the general theory behind Ramanujan's 6-10-8 Identity, the theorems flow from the properties of equal sums of like powers. The 6-10-8 needed only one condition, namely $ad=bc$. Going higher, you now need two. Presumably going even higher would need more. Also, there is a constraint $\,\small \sum x_i =\sum y_i= 0$. Without this constraint, then more generally,

III. Define $F_n = x_1^n+x_2^n+x_3^n-(y_1^n+y_2^n+y_3^n),\;$ and $m = (\sum x_i^4)/(\sum x_i^2)^2$.

Theorem 4: If $F_2 = F_4 = 0$, then,

$$32F_6F_{10} = 15(m+1)F_8^2$$

(Note: Ramanujan's simply was the case $m=1/2$.)

IV. Define $F_n = x_1^n+x_2^n+x_3^n+x_4^n-(y_1^n+y_2^n+y_3^n+y_4^n),\;$ and $m = (\sum x_i^4)/(\sum x_i^2)^2$.

Theorem 5: If $F_2 = F_4 = F_6 = 0$, then,

$$25F_8F_{12} = 12(m+1)F_{10}^2$$

and so on for similar identities with more terms and multi-grade higher powers, ad infinitum.

V. Conclusion: Thus, was the 6-10-8 Identity an isolated result? No, it is a special case (and a particularly beautiful one at that) of a more general phenomenon. And how did Ramanujan find it? Like most of his discoveries, he plucked it out of thin air, I suppose.

P.S. Humor aside, what I read was that, as he found paper expensive, he would scribble on a small slateboard with chalk. After he was satisfied with a result, he would write it down on his notebook, and erase the intermediate steps that was on the slateboard. (Sigh.)

Also, since he spent most of his waking hours thinking about mathematics, I think it was only natural it spilled over into his dream state. (A similar thing happened with the chemist Kekule and the discovery of the benzene ring.)

P.P.S. Results for multi-grades can be found in Table 2 of this MO answer.


One line of argument (section II), from a fellow MO-user, starts from the premise that Ramanujan knew that $F_n=0$ for $n=2$ or $n=4$:

It’s almost a shame to give away the secret of the 6-10-8 Identity. To quote the poet Keats, it’s like unweaving a rainbow: things will be different once we know something too well.


(This is an addendum to my answer.)

I. Identities. For those curious on further generalizations of Ramanujan's 6-10-8, while Theorem 3 used $2^3$ terms, one with higher powers uses $2^5$ terms. Define,

$$\small P_n = \sum^{16}\, (\mu(a_1\pm a_2\pm a_3\pm a_4\pm a_5))^n - \sum^{16}\, (\mu(b_1\pm b_2\pm b_3\pm b_4\pm b_5))^n\tag1$$

where $\mu = \pm1$ and is the product of the interior signs. If four conditions are now satisfied,

$$\small\prod^5 a_i = \prod^5 b_i$$

$$\small \sum^5 a_i^k = \sum^5 b_i^k$$

for $k = 2,4,6$, then,

$$P_1 = P_2 = P_3 = P_4 = P_5 = P_6 = P_7 = P_9 = P_{11} = 0$$

and,

$$957\,P_8 P_{15} = 1547\,P_{10} P_{13}$$

II. Families. I found one can solve the four conditions in two ways: the first in terms of quadratic forms, and the second as an elliptic curve.

Family 1: If $x^2+21y^2 = z^2$, then,

$$a_i = x + 6 y,\; x + 5 y - z,\; x + 5 y + z,\; \tfrac{1}{2}(-5x+2y),\; \tfrac{3}{2}(x-6y)$$

$$b_i = x - 6 y,\; -x + 5 y - z,\; -x + 5 y + z,\; \tfrac{1}{2}(5x+2y),\; \tfrac{3}{2}(x+6y)$$

Family 2: If $-4a^2+5b^2=4c^2,\;\; 25a^2+24b^2=d^2$, then,

$$a_i = 4 a - 4 b,\; 3 b - 2 c,\; 3 b + 2 c,\; 6 a,\; 4 a + 4 b$$

$$b_i = b - 2 c,\; b + 2 c,\; 4 a,\; -a + d,\; a + d$$

Note: For the second family, eight terms will cancel out in $(1)$, so it really involves only $2^5-8=24$ terms. An initial solution is $a,b,c,d = 29, 26, 2, 193$ and, using an elliptic curve, one can get an infinite more. Explicitly,

$$\small( 281, -207, -199, -107, \color{blue}{-61}, 125, \color{blue}{33}, -13, \color{blue}{25}, -21, \color{blue}{-113}, 49, 95, 187, 195, -269)^n=\\ \small(277, -247, -161, \color{blue}{-113}, -55, 131, 83, \color{blue}{25}, -3, \color{blue}{-61}, -109, \color{blue}{33}, 91, 139, 225, -255)^n$$

for $n = 1,2,3,4,5,7,9,11$. (The second family was found in 2013 with the help of Roger Glendenning who provided numerical solutions. After some trial and error, I found the form above.)