Why do prime numbers make these spirals? (2019)
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 of the form 6k+1, 6k-1, 6k+2, 6k-2, 6k+3, or 6k-3. But you cannot make primes with the numbers of the form 6k+2, 6k-2 (they would always have to be divisible by 2), and you cannot makes primes with numbers of the form 6k+3, 6k-3 because they are always divisible by 3. So what are you left with? All primes >3 must of the form 6k+1 or 6k-1. And that factor 6 is just a bit less than 2 pi (a full turn in radians) so you get spirals from the offset. They are also a pixel or two off, but that is imperceptible.The same logic is a nice exercise to apply to the problem of why primes >2 can only be of the form 4k+1 or 4k-1. Apply the same logic as above.