15.1k views
0 votes
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.

User Qeek
by
8.5k points

1 Answer

5 votes

She gives away n books per week, so If
w
=week number , then she has (
100-nw) books left at any time.

this will be the explicit formula.

so we need to write in terms of recrusive.

to be recrusive each term must be expressed in terms of previous term.

in this represent
a_{w[tex] +1} [/tex] in terms of
a_(w)


a_(w) =100-n(w-1)


a_(w+1) =100-n(w+1-1)

replace w+1 in place of w .


a_(W+1) =100-nw
a_(w) =a_(w+1) +n.


a_(w) -n=a_(w+1). this will be the recrusive expression for number of books she left.

User Umair Abid
by
8.6k points

No related questions found