Combinatorial game with floor function

73 Views Asked by At

Given the number $n$. Two players alternate turns. In each turn player can replace $n$ with $n-1$ or $\lfloor \frac{n}{3} \rfloor$. Player who writes $0$ wins. Decide for which $n$ second player has the winning strategy.

I know Sprague-Grundy function for this game should be periodic but I'm not sure how to determine that period.

Any help would be much appreciated.