Ashley has 100 books that she wants to give away at the rate of n books per week. Write a recursive function that represents the number of books Ashley has at any time. The recursive function that gives the number of books Ashley has at any time is
X: represents how many weeks
N: represents books per week
B: represents books she has at anytime
So the recursive formula would be: 100 - XN = B
Answer: \(100-wn\) , where w is the number of weeks (natural number) .
Step-by-step explanation:
Given: Ashley has 100 books that she wants to give away at the rate of n books per week.
Let 'w' be the number of weeks .
Then after first week w=1,
The number of books Ashley has after first week = \(100-n\)
[Since she wants to give away at the rate of n books per week.]
Then after second week w=2,
The number of books Ashley has after second week = \(100-n-n=100-2n\)
Then after third week w=3,
The number of books Ashley has after third week = \(100-2n-n=100-3n\)
Similarly for w weeks, the number of books Ashley has after w weeks =\(100-wn\)
Hence, the recursive function that gives the number of books Ashley has at any time is \(100-wn\), where w is the number of weeks.