Back

Solution: 2015 Winter Final - 8

Author: Michiel Smid

Question

Consider the following recursive function:
  • f(0) = $7$,
  • f(n) = $f(n - 1) + 6n - 3\; \ \text{for all}$ $\mathrm{integers}\ n \geq 1$.
Which of the following is true??
(a)
For all $n \geq 0$: $f(n) = 3n^2 + 7$
(b)
None of the above.
(c)
For all $n \geq 0$: $f(n) = 2n^2 + 7$
(d)
For all $n \geq 0$: $f(n) = 4n^2 + 7$

Solution

Calculate $ f(1) $

$ f(1) = f(0) + 6 \cdot 1 - 3 = 7 + 6 - 3 = 10 $

  • $ f(n) = 2n^{2} + 7 $
    $ f(1) = 2 \cdot 1^{2} + 7 = 2 + 7 = 9 $
  • $ f(n) = 3n^{2} + 7 $
    $ f(1) = 3 \cdot 1^{2} + 7 = 3 + 7 = 10 $
  • $ f(n) = 4n^{2} + 7 $
    $ f(1) = 4 \cdot 1^{2} + 7 = 4 + 7 = 11 $
  • None of the above

Since b has the correct answer, it is the answer