uva 10014 – Simple Calculations

This solution didn’t accurately done by me but i tried to understand how to solve it from various sources …..

http://math.stackexchange.com/questions/531432/solving-a-recurrence-relation-using-repeated-substitution

http://www.brpreiss.com/books/opus4/html/page41.html

http://www.questtosolve.com/browse.php?pid=10014

http://www.cprogramdevelop.com/2125057/