Petryk programmed calculator in such a way that if there is number on the screen and then the button «=>» is pressed, number appears on the screen. Petryk pressed the button «=>» 2014 times, and then 2016 appeared on the screen. What number was on the screen at the beginning? The screen can show not only integer numbers.
Solution
Let us look how the number changes after the button «=>» is pressed. Let the first number be . Then after the first pressing we have .
After the second we have
After the third we have
After the fourth we have
Thus, after every fourth pressing the number that was at the beginning appears on the screen. Therefore, after 2012 pressings we have . After 2 more pressings we obtain , thus .
Want a route through all this instead of an archive? The track
puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.