The impacts of known prime generation patterns
I always believed that prime numbers don't follow any clear pattern, but yesterday I learned from this page [1] that any prime number bigger than 3 can follow the pattern (6*n+1) and/or (6*n -1), where n is any natural number. The authors indicate that they verified this theory by generating 1000000 prime numbers using Matlab. Therefore, it seems that there is no official proof of this theory, but also nothing proves that it is an incorrect theory. Let's suppose that this theory is mathematically proven. Then, two questions can be raised: Question1: Can this theory remove the need to primality tests? Question2: Can this theory allow us to factorize natural numbers efficiently? Before I handle these questions, I want to verify first the prime generation theory. I wrote a Python function that allows finding the count of prime numbers within a range of numbers and comparing this function with another function that follows the brute force method to generate the prime numbers. Here...