For some reason, a relatively uninteresting observation of Ramanujan has become a bit of an internet celebrity among factoids lately.  Someone who’s out to generate link bait makes a post stating that

Now look.  I appreciate trolling as much as the next jerk, but people who really ought to know better are getting tricked by this.  In the usual sense of convergence, this clearly diverges; if it isn’t obvious to you that the limit of the partial sums of the left hand side does not converge as a sequence, then you have some serious explaining to do. So when people make this claim, they’re referring to something else.

I’ve summarized the typical proof of this result in this pdf.  Throughout, I basically lie to your face and hope you buy it. For example, let’s take a look at one of the preliminaries for the main result in this pdf, that

The gist of the argument is if you call the thing on the left A, then (dubiously)

And so 2A=1, or A=1/2.  But then you could just as easily argue as Leibniz did 400 years ago that

So A is 0, 1, and 1/2, right?

Where people got the idea for this foolery isn’t actually unreasonable (they just present it that way). The original idea comes from one of Ramanujan’s notebooks.  In the middle of writing this, I discovered that a Fields Medal winner wrote about this 4 years ago, and he gives a very good modern explanation for the behavior. But if you don’t have a good analysis background, I guess it isn’t the easiest read, so let’s instead just work from a definition of Ramanujan.  In Chapter 6 of the first book of “Ramanujan’s Notebooks”, he defines a “constant” of a series

(convergent or otherwise) as:

which comes from a fancy pants thing you probably don’t care about.  Here f is a “nice” function that (among other things) satisfies

for each n, and the ’s are the even Bernoulli numbers.  The Bernoulli numbers are fiddley, but we won’t need many of them to replicate the result.  It turns out that , and letting , we have that the constant of the series is

Now get off my lawn, you hooligans.