![]() |
|
|
#1 | |
|
Random Account
Aug 2009
32·7·31 Posts |
Quote:
|
|
|
|
|
|
|
#2 |
|
Account Deleted
"Tim Sorbera"
Aug 2006
San Antonio, TX USA
17·251 Posts |
Should retain the original spaces to be clearer:
Code:
A) Start with all the natural numbers except '1' which is not a prime.
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35...
^
B) The leftmost number is prime. Multiply each number in the list by this prime and discard the products.
2 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35...
^
C) The number after the previous prime is also a prime. Multiply each number in the list starting from
the latest prime by the latest prime and discard the products.
2 3 5 7 11 13 17 19 23 25 29 31 35...
^
Repeat C) indefinitely. On each repetition a new prime is identified (marked ^) until all the primes in
the starting list have been found.
First, copy the line of numbers at B to C. We'll be reading off of the B line, and eliminating them from the C line. The prime we're working on is 3, so first we eliminate 3*3=9. The next number on the list is 3*5=15, eliminate that too, next is 3*7=21, then 3*9=27 (even though 9 is eliminated for next time, it's still in line B, so it needs to be eliminated too), and so on. Once we reach the end of the list, restart it with copying C to D, reading from C (starting at 5*5=25), and crossing off from D. Repeat until either: 1. you reach the final number/prime on the list, or 2. (will save some work) until the first number you try to eliminate in that sequence is higher than the largest prime. (i.e. [prime you're eliminating] > sqrt([max number on list]), in this case 7, so stop when you find 7*7>35) (same result either way) Last fiddled with by Mini-Geek on 2009-08-25 at 00:45 |
|
|
|
|
|
#3 |
|
Random Account
Aug 2009
111101000012 Posts |
In order to create a computer algorithm, one must be able to maintain the list indefinitely. After a while, the list would grow so large that the advantages of using the list would become nil.
|
|
|
|
|
|
#4 |
|
"Kyle"
Feb 2005
Somewhere near M52..
3·5·61 Posts |
Which is precisely why we can't just automatically find the "next" Mersenne Prime.
|
|
|
|
|
|
#5 |
|
Random Account
Aug 2009
32·7·31 Posts |
As computer technology continues to evolve, perhaps some of this limitation can be overcome. Take the hardware advances and add new ways to to write applications. Who is to say what will be available in the years to come.
|
|
|
|
|
|
#6 | ||
|
"Richard B. Woods"
Aug 2002
Wisconsin USA
11110000011002 Posts |
Quote:
For instance (as explained here: http://mersennewiki.org/index.php/Lu...le_Explanation) Quote:
|
||
|
|
|
|
|
#7 |
|
Aug 2006
597910 Posts |
Of course with quantum methods the limit becomes a number with that many bits (adding another level to the power tower).
|
|
|
|
|
|
#8 | |
|
Bamboozled!
"πΊππ·π·π"
May 2003
Down not across
2A0016 Posts |
Quote:
![]() Paul |
|
|
|
|
|
|
#9 |
|
Random Account
Aug 2009
195310 Posts |
It may be that, some day, CPU's will be able to do "BigNum" math without any special software considerations. The ALU in the CPU will be able to handle it all. That may be in the future a ways though; probably not high on Intel's and AMD's to-do list.
Last fiddled with by storm5510 on 2009-09-24 at 08:04 |
|
|
|
|
|
#10 |
|
Aug 2006
175B16 Posts |
|
|
|
|
|
|
#11 |
|
Cranksta Rap Ayatollah
Jul 2003
641 Posts |
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Project Euler | jhs | Puzzles | 32 | 2021-01-19 04:05 |
| Project Euler 486 | lavalamp | Puzzles | 8 | 2015-02-04 14:28 |
| Project Euler #372 | lavalamp | Puzzles | 165 | 2012-05-24 16:40 |
| Euler (6,2,5) details. | Death | Math | 10 | 2011-08-03 13:49 |
| Project Euler | Mini-Geek | Lounge | 2 | 2009-10-23 17:19 |