How did Ramanujan come up with the Ramanujan summation and is it possible to extend it to higher sets (Everything circled in red is what I'm interested in (+ the Cauchy integral to make it Dedekind completed) )

![](https://i.sstatic.net/eQGYB.jpg)