Live data from Hacker News

Why do prime numbers make these spirals? (2019)

3blue1brown.com

131–140 of 141 posts

Re: Why do prime numbers make these spirals? (2019)

#140

One of the thrills of studying the primes is the discovery that all primes greater than 3 are of the form 6k+1 or 6k-1. And for primes greater than 2, all primes are of the form 4k+1 or 4k-1. It is something that is commonly rediscovered by students, and that new independent finding was quite exciting for me. The reasoning, which is in the article here, is that you can make any whole number you wish if the number is…

I have discovered the same thing while practicing prime sieve algorithms back in the day. Such properties of primes are quite useful for optimizing both speed and memory of sieve algorithms. More generally, if you take the first n primes p_1, ..., p_n and define P=p_1*...*p_n , then all primes bigger than P be in the form of P*k +- a , such that a and GCD(P, a) = 1 . In case of n=2 ( P=2*3=6 ), there is this nice pro…

https://en.wikipedia.org/wiki/Wheel_factorization
Post reply on HN