B=PRn-Q(Rn-1)/R-1
Mod note: This thread is closed. @Rodo, this appears to be homework that is misplaced, with no effort shown. You are welcome to repost in the Homework & Coursework section, but you need to use the homework template and show what you have tried.