 |
| Java Applet for Factorisation by Andrew Hodges |
|
 |
 |
Factorisation Applet
The applet allows you to enter a run of up to 100 consecutive integers for factorisation into prime factors.
You can put in any numbers up to the Mersenne prime
261 - 1 = 2305843009213693951 (about 2.3 x 1018).
A typical output appears as:
56565656565656 = 2.2.2.7.239.4649.909091
56565656565657 = 3.193.97695434483
56565656565658 = 2.41.83.8311145543
56565656565659 is prime
56565656565660 = 2.2.3.3.5.11.23.47.26427857
56565656565661 is prime
56565656565662 = 2.17.696737.2387839
56565656565663 = 3.7.2693602693603
56565656565664 = 2.2.2.2.2.43.16811.2445349
56565656565665 = 5.13.870240870241 |
|
|
 |
 |
|
To operate the applet, click your mouse in the first text field, and enter your starting value. Leave the 1 in the next box if you want to factorise just one number, otherwise enter your run length (up to 100). Then click on RUN. The results will appear in the scrolled window. They can be selected and copied from the window.
|
|
 |
 |
|
The program just does trial divisions in the elementary way. It gives a vivid test of computer speed.
Using a 2004 Power Macintosh G5, I find that for numbers less than 1014 the factorisation time is negligible compared with the time taken for visual display. Around 1015
you will notice a hesitation over the primes. Above that you can expect to wait:
- at 1016, 10 seconds for 100 numbers
- at 1017, 40 seconds for 100 numbers
- at 1018, 3 minutes for 100 numbers
- at the top of the allowed range, it should show the primality of 2305843009213693951 in about half a minute.
Try out this applet on some famous examples:
The first Mersenne numbers M(p) = 2p – 1
- M(5): 31 is prime
- M(7): 127 is prime
- M(11): 2047 = 23.89 [known 1536]
- M(13): 8191 is prime [known 1496]
- M(17): 131071 is prime [known 1588]
- M(19): 524287 is prime [known 1588]
- M(23): 8388607 = 47.178481 [Fermat 1640]
- M(29): 536870911 = 233.1103.2089 [Euler 1738]
- M(31): 2147483647 is prime [Euler 1772]
- M(37): 137438953471 = 223.616318177 [Fermat 1640]
- M(41): 2199023255551 = 13367.164511353
- M(43): 8796093022207 = 431.9719.2099863
- M(47): 140737488355327 = 2351.4513.13264529
- M(53): 9007199254740991 = 6361.69431.20394401
- M(59): 576460752303423487 = 179951.3203431780337
- M(61): 2305843009213693951 is prime [Pervouchine 1883]
Mersenne's guesses were almost all wrong; he thought M(61) was composite and M(67) prime. In fact M(67), outside the range of this Java, is composite.
The historical information is from this Mersenne Prime site.
|
|
|
 |
 | Alan Turing Internet Scrapbook: Manchester and Mersenne in 1949 | | Cool Maths |
|
|