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 + 8$
(b)
$f(n) = 2n^{2} - 5n + 7$
(c)
$f(n) = 3n^{2} - 5n + 8$
(d)
$f(n) = 4n^{2} - 5n + 8$
Solution
For a question like this, let’s first calculate $f(1)$.