Of course, we’re making this a bit more complex than it really needs to be.
How’s this for some mathematical trickery (about this particular case, not Ramanujan summation in general):
We’ll use 2 of the series mentioned above:
S1 = 1 - 1 + 1 - 1 + 1 -1 + …
1 - S1 = 1 - (1 - 1 + 1 - 1 + …)
1 - S1 = 1 - 1 + 1 - 1 + 1 - 1 + …
Does that right side look familiar? It’s S1 again!
1 - S1 = S1
So S1 = 1/2
We know this series never actually gets to 1/2 (it just bounces between 0 and 1), but infinite sums do weird things.
Ok, so let’s add another weird series:
S2 = 1 - 2 + 3 - 4 + 5 - 6 + …
S1 - S2 = (1 - 1 + 1 -1 + …) - (1 -2 + 3 - 4 + 5 - 6 + …)
Regrouping the right side:
S1 - S2 = (1 - 1) + (-1 + 2) + (1 - 3) + (-1 + 4) + …
S1 - S2 = 0 + 1 - 2 + 3 - 4 + 5 - 6 + …
The right side is just S2 again!
S1 - S2 = S2
And since we know S1 = 1/2, that means S2 = 1/4:
S1 - S2 = S2
(1/2) - S2 = S2
S2 = 1/4
Ok, so now to the main show with our original series:
A = 1 + 2 + 3 + 4 + …
S2 - A = (1 - 2 + 3 - 4 + …) - (1 + 2 + 3 + 4+ …)
Again, regrouping terms:
S2 - A = (1 - 1) - (2 + 2) + (3 - 3) - (4 + 4) + …
S2 - A = 0 - 4 + 0 - 8 + 0 - 12 + …
Eliminating the 0’s:
S2 - A = -4 - 8 - 12 - 16 - …
S2 - A = -4*(1 + 2 + 3 + 4 + 5 + …)
S2 - A = -4*A
Since S2 = 1/4:
S2 - A = -4A
S2 = -3A
1/4 = -3*A
A = -1/12
Nifty, eh? If you treat the entire series as a single “thing”, you can do some funky things because of the infinities floating around. But arithmetic involving an infinite number of terms is not as straightforward as all that, hence partial sums and so forth. Even the idea of “pairing up” like terms in infinite series is questionable but the above derivation relies on it.
Ramanujan did have a formal education in mathematics after Hardy got him to England. And even in his informal days, he had a good grounding of the concepts and was ahead of many if not most of the experts of the day.
He did not literally believe he had a summation. He was playing with the concept of divergent series and what you could do with them.