recursive function

Hi everyone, i need your input on this. We can express a function recursivly like this

A(n) = (2                                n = 0
          5                                 n = 1
          A(n  1) + A(n  2) % 47 n > 1

How would i go about constructing a recursive function for this? for instance lets say i wanted to solve for A(20). And what do you think i should do to make an iterative function? Thanks.

Everyone treats such problems as homework, therefore does not give solution...
Try to submit your attempts and then we will know you want to learn.

Regards