There was a paper a few years ago in the American Mathematical Monthly ( sorry... can't remember the author, I think it was a Russian mathematician ) that gave some interesting heuristics for why this form is natural to consider, where the 1/30 comes from ( and considerations of a couple of alternatives to the "30" ), and the kind of intuition/thinking that Ramanujan may have used. When you only see the final form of the equation like this, it looks very mysterious and impossible that someone could find it ( and to be fair, there are other results from Ramanujan that are definitely in that class! ). Probably a google search could find the paper, it was delightful to read.