Back

Solution: 2013 Fall Midterm - 11

Author: Pat Morin

Question

The function $ f: \mathbb{N} \rightarrow \mathbb{N} $ is defined by $ f(0) = 14 $ $ f(n+1) = f(n) + 4n - 5 $ for $ n \geq 0 $ What is $ f(n) $?
(a)
$f(n) = 2n^{2} - 6n + 14$
(b)
$f(n) = 2n^{2} - 7n + 14$
(c)
$f(n) = 2n^{2} + 7n + 14$
(d)
$f(n) = 2n^{2} + 6n + 14$

Solution

Let’s calculate $ f(1) $

$ f(1) = 14 + 4(0) - 5 = 9 $

  • $ f(n) = 2n^{2} + 6n + 14 $
    $ f(1) = 2(1)^2 + 6(1) + 14 = 22 $
  • $ f(n) = 2n^{2} - 6n + 14 $
    $ f(1) = 2(1)^2 - 6(1) + 14 = 10 $
  • $ f(n) = 2n^{2} + 7n + 14 $
    $ f(1) = 2(1)^2 + 7(1) + 14 = 23 $
  • $ f(n) = 2n^{2} - 7n + 14 $
    $ f(1) = 2(1)^2 - 7(1) + 14 = 9 $

Since only d) gives us the same output as the original function, we chilling with it fr fr