A girl on irc once asked if there is a way to solve FizzBuzz with just one comparison.
Yours is indeed one and it is pretty clever :)
Here is another one <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;giuseppeg&#x2F;5939177" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;giuseppeg&#x2F;5939177</a>