Back

Solution: 2014 Winter Midterm - 10

Author: Michiel Smid

Question

The function $f : \mathbb{N} \rightarrow \mathbb{N}$ is defined by $$ \begin{align} f(0) &= 2 \\ f(n + 1) &= f(n) + 6n - 2\; \ \mathrm{for}\ n \geq 0 \end{align} $$ What is $f(n)$?
(a)
$f(n) = 2n^{2} - 5n + 2$
(b)
$f(n) = 3n^{2} - 5n + 2$
(c)
$f(n) = 2n^{2} + 5n + 2$
(d)
$f(n) = 3n^{2} + 5n + 2$

Solution

First, we can calculate values of f$(1)$, $f(2)$, and $f(3)$ to see if we can find a pattern.

$f(1) = f(0) + 6(0) - 2 = 2 - 2 = 0$

$f(2) = f(1) + 6(1) - 2 = 0 + 6 - 2 = 4$

Now, we test

  • $f(n) = 3n^{2} - 5n + 2$
    $f(1) = 3{(1)}^{2} - 5(1) + 2 = 3 - 5 + 2 = 0$
  • $f(n) = 3n^{2} + 5n + 2$
    $f(1) = 3{(1)}^{2} + 5(1) + 2 = 3 + 5 + 2 = 10$
  • $f(n) = 2n^{2} - 5n + 2$
    $f(1) = 2{(1)}^{2} - 5(1) + 2 = 2 - 5 + 2 = -1$
  • $f(n) = 2n^{2} + 5n + 2$
    $f(1) = 2{(1)}^{2} + 5(1) + 2 = 2 + 5 + 2 = 9$

Therefore, we know that $f(n) = 3n^{2} - 5n + 2$ is the correct answer since it fits the pattern