Back

The function $f : \mathbb{N} \rightarrow \mathbb{N}$ is defined by $$ f(0) = 8 $$ $$ f(n) = f(n - 1) + 6n - 8 \ \mathrm{for}\ n \geq 1 $$ What is $f(n)$?

a) $f(n) = 2n^{2} - 5n + 7$

b) $f(n) = 2n^{2} - 5n + 8$

c) $f(n) = 3n^{2} - 5n + 8$

d) $f(n) = 4n^{2} - 5n + 8$

Solution: 2014 Fall Midterm - 10

Author: Michiel Smid

Question

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

Solution

For a question like this, let’s first calculate $f(1)$.

$f(1)=8+6-8=6$

  • a) $f(1)=2-5+7=4$
  • b) $f(1)=2-5+8=5$
  • c) $f(1)=3-5+8=6$
  • d) $f(2)=4-5+8=9$

As we can see, only (c) fits the original