4 ms·
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 fi
by tlaundal 6y 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.
- qsort 6y agoBecause 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 https://blog.antfeedr.com/posts/fizzbuzz.html.
- prionassembly 6y ago> 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.
- anthk 6y agohttps://medium.com/hackernoon/algorithms-explained-diffie-hellman-1034210d5100 https://medium.com/hackernoon/algorithms-explained-diffie-he...