inverse of f(n) = 50*(n^2-n+2)