Hacker News new | ask | show | jobs
by tlaundal 1927 days ago
This is of course a really neat solution, but the proof doesn't really give me much value as a reader.

I am much more interested in an explanation of how to find this solution, than a theoretical solution of why it is correct. Specifically I don't understand from the article why the trick of raising n to the power of LCM(phi(3), phi(5)) works.

3 comments

Because it doesn't :)

The author is trying to use Euler's theorem (if a, n are coprimes, then a^{\phi(n)} \equiv 1 \mod n), but the map defined by the exponentiation doesn't say anything about what happens when (a, n) are not coprime.

I'd encourage you to read this post, which is linked by the article: https://blog.antfeedr.com/posts/fizzbuzz.html.

> This is of course a really neat solution, but the proof doesn't really give me much value as a reader.

This is because your number theory-fu is poor.

Don't take this in a bad way, I'm probably even less capable. What I mean is that readability is predicated on a reader. Seasoned number theorists might not be as cool with goroutines or walrii operators or virtual DOMs.