2070.82 – Mystery Function


First of all, f(1)=2f(1) = 2. Then, further values of ff are given by f(n)=f(n1)+n.f(n) = f(n-1) + n.

Under these circumstances, which of these formulas gives f(n)f(n)?

  1. n+1n+1

  2. (n+1)2(n+1)^2

  3. n2+n+22\dfrac{n^2 +n + 2}{2}

  4. (n+1)22\dfrac{(n+1)^2}{2}

  5. (3n1)22\dfrac{(3n-1)^2}{2}.


Solution

Of course we can just plug the first few integers into the five given formulas and see which works, but here is a more subtle way.

We start by calculating some values:

f(1)=2,f(2)=2+2=4,f(3)=4+3=7,f(4)=7+4=11,f(5)=11+5=16.\begin{aligned}f(1) &= 2, && \\f(2) &= 2 + 2 &&= 4, \\f(3) &= 4 + 3 &&= 7, \\f(4) &= 7 + 4 &&= 11, \\f(5) &= 11 + 5 &&= 16.\end{aligned}

With each step we are adding one more number so ff should be something like f(n)1+2+3+nf(n) \approx 1 + 2 +3 \ldots + n. Let's calculate this sum:

1,1+2=3,1+2+3=6,1+2+3+4=10,1+2+3+4+5=15.\begin{aligned}1, & \\1 + 2 &= 3, \\1 + 2 + 3 &= 6, \\1 + 2 + 3 + 4 &= 10, \\1 + 2 + 3 + 4 + 5 &= 15. \\\end{aligned}

So, we see that

f(n)=(1+2++n)+1=n(n+1)2+1=n2+n+22.f(n) = (1 + 2 + \ldots + n) + 1 = \dfrac{n(n+1)}{2} + 1 = \dfrac{n^2 + n + 2}{2}.

The correct answer is (c). (That formula for the sum of the first n whole numbers is a handy one to know.)

For inquiring minds: what if f(1)f(1) isn't 22? What if f(1)f(1) is, say, 33? or f(1)=nf(1) = n?