A Is it possible to locate prime numbers through addition only

AI Thread Summary
The discussion focuses on the challenges of generating prime numbers through addition and the limitations of traditional methods like the sieve of Eratosthenes. A user has developed a code that locates primes up to 4.9 billion using a unique approach that involves a bi-linear advancement and linear tables for efficiency. The conversation highlights the difficulty of finding a reliable algorithm for generating all primes, as many methods tend to miss certain primes. Additionally, it mentions that while computers can quickly factor large numbers, the quest for a perfect prime-generating formula remains elusive. The thread concludes with references to a historical polynomial that claims to find all primes, emphasizing ongoing interest in prime number generation techniques.
Carl A Bohn
Messages
3
Reaction score
0
I was reading an old thread about multiplying successive prime numbers adding 1 to obtain another prime number.
I have worked with prime numbers for several years now and have developed what I best call a bi-linear advancement. It is an open-ended sieve of Eratosthenes. After many, many hours across the years, I have finally developed a piece of code that locates prime numbers. I built it on a small laptop in QB6, and so far it is locating primes out in the 4.9 billion range. (Time elapsed: 18 hours.)
Actually, I am locating all the prime-subs. From there, I am able to extract all the intervening prime numbers.
The one key issue I had to deal with is the prime numbers 2,3, and 5. I found a way to extract those multiples from the process, then discovered a rather unique way of grouping prime numbers. The rest of it is just plain math. But, I took it a step further a developed a system of linear tables that reduces the whole process down to a lookup table. I also have a very unique way to store prime numbers in a very condensed form.
 
Mathematics news on Phys.org
Folks have been trying to come up with a magic prime number generator for centuries and all have failed.

The Eratosthenes method is perhaps the only one. It was used to prove that primes are infinite ie that having found all primes to a certain point it’s possible to make a composite number as the product of all these primes plus one to be a new prime.

If you use it as a generator it misses primes.

We start with 2 as the first prime, so then 2+1=3 the next prime.

Next we say 2*3+1 = 7 which is prime but we have skipped 5 and the process breaks as a generator of primes.

I’m sure we could somehow fix the algorithm but then some higher prime will be missed and so it goes. The primes are just impossible to work with they appear to have no known pattern for generation for all primes although we might find an algorithm that works some of the time.
 
These sieves work well for small numbers, but finding primes for small numbers is a trivial task for computers anyway. Computers can factorize 40-digit primes numbers in less than a second, and check 100-digit numbers for primality in the same time.

Here is a web tool if you want to try it yourself. A random 47-digit number which is hard to factorize is 28701392776125735524335735103358699296374619111.
 
Last edited:
  • Like
Likes Rada Demorn
Sorry about off-topic, but yesterday I was thinking about prime numbers and wondered whether for any finite set of integers ##A = \{a_1 ,a_2 , \dots ,a_n \}## it is possible to find a base number ##b \in \mathbb{R}## such that ##\log_b a## is rational for all ##a \in A##. This is probably not possible, but if it were, then the logarithm of any integer that is a product of integers belonging in ##A## would also be rational.
 
mfb said:
Computers can factorize 40-digit primes in less than a second
Humans can factorize primes in O(1).
 
  • Like
Likes DrClaude
mfb said:
Here is a web tool if you want to try it yourself. A random 47-digit number which is hard to factorize is 28701392776125735524335735103358699296374619111.
Nice program @mfb ! I tested it on :
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567891

Took about 1:45 hours on my computer to factorize. Now I am testing it on the latest version of Mathematica. See which one is faster.

EDIT--- Mathematica rocks! 30 mins with FactorInteger.
 
Last edited:
@Carl A Bohn Do not waste your time. Regarding one of your previous threads (now closed) a prime-generating polynomial has been found by James Jones, Daihachiro Sato, Hideo Wada and Douglas Wiens in 1977. Yes, it finds all primes!
 
Back
Top