# How to Solve a Sequence in Mathematica [duplicate]

Given the input and the output, how do you interpolate a function in Mathematica?

For example if you know that

$f(1)=\frac{1}{2}$, $f(2)=\frac{1}{3}$, $f(3)=\frac{1}{4}$,... how would you solve for $f(n)$

I guess what I am really asking is how would one solve a sequence in Mathematica?

-

## marked as duplicate by Mr.Wizard♦Aug 1 '14 at 0:56

FindSequenceFunction[{1/2, 1/3, 1/4, 1/5, 1/6}, n]

1/(1 + n)