2 players 'A' and 'B' are playing a game. A piles of Stone has n stones.Player can remove either one stone or stone equal to power of some prime number. The player who can not make a move in his turn loses.
'A' plays first. Both 'A' and 'B' play optimally, who will win the game?
I am new to such kind of problems, I tried making all possible situations, but i am unable to solve this problem. Any help will be appreciated.