In a previous exam, this question was asked:
We want to approximate Pi using this formula

Write a function that calculates the right hand side of this equation truncated at the nth term.
For example f[3] stops at 2 + 5^2/2
I can't solve this, because I don't know how to write one fraction in another like this in Mathematica? What is the easy way to do it? Thanks!