paxready.blogg.se

A big list of prime numbers up to 100
A big list of prime numbers up to 100






a big list of prime numbers up to 100

It has been conjectured that there exist an infinite number of Mersenne primes. L. Welsh maintains an extensive bibliography and history of Mersenne numbers. Mersenne primes were first studied because of the remarkable properties that every Mersenne prime corresponds to exactly one perfect number. Which is a binomial number that always has a factor Is true since for composite with factors and. In order for to be prime, must itself be prime. initial_num = input("Please enter a number.That is prime. The program works like I expect it to but not as quickly as I need it to since the numbers I'm going to be dealing with are going to get large quickly, almost doubling at each phase. Ran the program again before submitting this post and it took an hour and a half or so.įunction of the program is to take the User selected number, use it to generate a lower bound, find all primes between the bound and input and append to list, then generate a secound upper bound and find all primes and then append to list, to create a list that extends forwards and backwards from the initial number.

a big list of prime numbers up to 100

I'm new to python and am not that experienced as a programmer. I've tested a few permutations of the range function to see if there was a better way to handle the limits of the list I want to produce but nothing seems to have any effect on the amount of time it takes to do the computation. What I was wondering was whether there was a more efficient way to handle numbers whose scale was larger than 4 or 5 digits. What I'm trying to figure out is when I run this code for smaller numbers it returns the list just fine, but for larger numbers (I would call this small in the context of what I'm working on.) like 29996299, it will run for a long time, I've waited for 45 minutes with no results and had to end up killing the program.








A big list of prime numbers up to 100