The function $f (n) = 5n + 2, n = 1, 2, 3, \ldots $
Im sure its a simple problem, but im really confused...how did they get the answer ? could someone explain
$f (n) = f (n - 1) + 5, f (1) = 7$
thank you
The function $f (n) = 5n + 2, n = 1, 2, 3, \ldots $
Im sure its a simple problem, but im really confused...how did they get the answer ? could someone explain
$f (n) = f (n - 1) + 5, f (1) = 7$
thank you
Since it's recursive, it makes sense for $f(n)$ to be somehow related to $f(n-1)$. Of course, you need to start somewhere, so you might as well define $f(1)$.
Note that the original function satisfies $f(1) = 7$, and that when $n$ increases by $1$, we add $5$ to the function.
That is: $f(n+1) = 5(n+1) + 2 = 5n + 5 + 2 = (5n + 2) + 5 = f(n) + 5$.
Now replace $n+1$ above with $n$.