f(n) = .5n(n-1) + 1

Got it through a quadratic regression, not logic