PrimePro version 5.8 - The Prime Reference Tool and Automatic Prime number generator thru 15 digits.
Author: Elden Taylor, email to altaylor@ix.netcom.com
v5.8 10/05/98 - added resolution independence. Program resizes as needed to compensate for different screen resolutions. Smaller program size. No functional changes.
v5.7 6/27/98 - Maximum time reduced from 12 to 2.5 minutes for Find Nth and Count Primes options.
PrimePro is a self contained library on Prime numbers, a free 32 bit Windows 95/98/NT utility under constant
development.
Briefly, PrimePro's main feature is to allow you to enter any number and quickly see a display of primes.
You may view page by page, scrolling up\down in the list or jump to any specified range simply by entering a new number.
Additionally, PrimePro supports 'Counting of Primes', 'Find the Nth prime', 'and deluxe Printouts'.
Other Enhancments:
The keyboard ENTER key may be used after typing in numbers.
The keyboard Up/Down Arrow keys may be used to scroll the display.
Hopefully the program can be easily used without furthur instruction but if you want to know more, read on.
One early warning! - Dont be too quick to click on the Print options, as any generated range of primes can easily consume a couple hundred pages of paper.
Mode: Scan each digit:- and related buttons -
The program defaults to the Scan mode which simply means that as you type in a number, each digit is automatically scanned and the Display screen updates itself to show a list of the nearest primes.
You may type in any number below 16 digits, and a convienient "digit counter" above your entry shows how many digits have been typed in.
You may use the Backspace key to change or erase digits, and of particular interest you may use the left or right keyboard Arrow keys to position the cursor over a digit you wish to change and then simply typing in a new digit. Again the display auto updates itself for any changes made to an entry.
The fastest way to clear your entry and start over is to click on the ReStart Button, but you may just simply Backspace until the Entry is blank.
Primepro generates primes in approximate 500,000 units or what i call a Range, such as 1 to 511,517.
Whatever number you type in, PrimePro determines and generates the appropriate Range which contains primes nearest to your Entry.
Information box's display the current Generation Range and the Number of Primes in each Range.
This 'Auto Range:', and 'Primes Found:', are what is currently printable.
It is important to note that if your Entry is indeed a prime number, the very first prime displayed at the Top-left should also show the same prime. If your Entered number is not prime, then the first number displayed on the page will be the nearest prime PrimePro found.
After Entering a number, You may click on the Factor Button to confirm if its prime, or display a list of factors up to the square root of the entered number. This is sufficient to determine all factors for a composite (divisible) number.
At any time, you may scroll up or down in the list of primes by clicking either the Up/Down control in the program, or use the keyboard Up/Down Arrow keys. The Slider on the right side of the Display screen will move as the Display "pages". The Sliders position tells you where its at in the current 500k generation range.
Should the Slider reach the extreme Top or extreme Bottom, it triggers a new Generation Range, so one can scroll or "page" forever (within the 15 digit limits of PrimePro).
Alternatively, one can 'drag' the Sliders indicator using the mouse, for super fast scrolling, or clicking in the "white areas" above or below the Sliders indicator will slow scroll.
After Scrolling or paging for a while, it may be desirable to return to the beginning of the Current Range, --- just click the ReSet Range Button and the display is returned to the Start of the Current Generation Range, ready to scroll over again.
Alternativly, it may be desirable to jump to the start of the next Generation Range, - just click on the Advance Range button.
Mode: Use Process button:-
The only difference between the Process mode and the Scan mode is that each digit is not scanned as you type in your Search number.
The Process mode requires you to specifically press the ENTER key to begin processing of a new Generation Range, or by clicking on the Process button. This is often faster when typing in numbers greater than 11 digits, compared to the Scan mode.
All other buttons, controls and keyboard keys work the same as in Scan mode.
Mode: List Nth Prime:-
This allows you to type in a number, such as 5000 and the display will jump to the 5,000th prime.
This is known as Finding the Nth prime.
PrimePro currently supports Finding Nth up to 4,118,284,172 which covers primes to 100,000,000,000.
Information box's display the Nth number and the Nth prime found.
PrimePro starts out in a modified Scan mode, automatically displaying the Nth primes as you type in your entry. When your entry exceeds 116,375 the scan is deactivated and you are required to press the Enter key or click on the Process button to begin processing.
Currently, it can take as long as 2.5 minutes to find the larger Nth entries, but this is small fraction of the time it normally would take a computer to count all primes to find the Nth entry.
Counting Primes to 11 digits normally takes about 18 hours on a 200mhz Pentium processor.
So how am I able to supply precise counts within a maximum of 2.5 minutes?
I have exploited PrimePro's unique ability to 'jump' to any range of numbers and begin producing primes.
First i created a built in database of around 650 Entry Points, spread thoughout the range of 50,000 to 100,000,000,000. Each Entry Point contains a 'precount' of all the primes up to that entry.
When you type in your Search number, PrimePro compares it to the entrys in the database and takes the 'pre count' nearest but less than your Search number. PrimePro then proceeds to count only the primes after the pre-count up to your Search number.
For example, if your Search number is 980,000,000, PrimePro finds a database precount at 900,000,000 and needs only count primes in the remaining 80,000,000 to produce a precise total count to your entry.
This method shaves off 95% of the "real" calculation time, yet produces the same result, a precise count.
Even at 5%, I know there will be grumblings about taking 2.5 minutes to produce results.
This is a maximum time, and generally processing takes much less time, depending on how close your entry is to a data precount.
Mode: Count Primes to Entry:-
This allows PrimePro to count all the Primes up to your entered Search number, max of 100,008,909,001.
As in List Nth Prime, the pre-count database is used to save count time.
Information box's display the Entry number and the number of primes counted.
PrimePro's display also jumps to the nearest prime to your entry.
Counts include your Entry number if its prime.
As in Nth Prime, an Auto scan mode is active for smaller numbers, then deactivated for larger entries, requiring you to press the keyboard ENTER key or click the Process button to begin processing.
Prime Table:-
This shows a count of primes to various powers of 10. Clicking this option toggles the Table display off or on.
The Process Timer:-
Displays the processing time it took for whatever mode you happen to be in.
The Print button:-
Brings up the Print Menu which may be selected and left on screen during any mode of operation.
A font button is available to select font sizes, style , etc.
The Current Generation Range is displayed, which is the only printable information at any point in time.
The Total number of primes for the current range is displayed, which tells you how many primes will be printed for the default current Generation Range.
You may change either the low "from" number or/and the high "to" numbers to restrict the printouts to an even smaller range, but the "from" and "to" numbers must still fall within the range of the default Current Generation Range.
Changing either the "from" or "to" ranges results in the "Primes Count" to be adjusted for the new entered range. The "Primes Count" always tells you exactly how many primes will be printed once you click on the actual 'PRINT' button.
One does NOT have to print out the primes. I often call up the Print menu to change the "from" or "to" numbers just to simply tell me how many primes are between two given numbers in the current range.
Then I click the CANCEL button to exit the Print menu.
After making changes to the "from" or "to" numbers, often it is desirable to start over at the default Generation Range. This is accomplished by clicking on the Restore Default button.
It is also possible to have the Print menu displayed, and click on the main programs "enter Search number" box and typing in new numbers causes the Print menu to change its numbers for each Generation range created.
One may also use the Advance Range and Reset buttons, etc during Print menu display.
Printing of any default Generation Range can take over over a hundred sheets of paper at a time, so be cautious before finally clicking on the final PRINT button.
The default font is set at size 8 for very small print and conservation of paper.
Summery:
PrimePro was created for several reasons. First, I saw that all current DOS prime number programs lacked the features i would like to see in a utility. Next was the problem that while i would like to have a printout of all possible primes to 15 digits, such a library would take millions of phone book size volumes and a warehouse to store them. I calculated to make text files of all primes thru 15 digits would require 200,000 (1-gig) hard drives to store the files, - not in my current budget.
Then the problem of speed in computing larger primes and displaying not one, but many primes at one time and paging to any range desired.
Lastly, call me a mad-man, but some 30 years ago, before the dawn of computers, at 16 I became interested in primes and spent 2 years of research concluding in a formula that produced primes and proved primes DO NOT form randomly!!! A Michigan State mathematics professor agreed with my findings and encouraged me to send it in to a Math Discovery magazine. Unfortunately before then, i recieved my Draft notice and entered the service for several years. My notebooks and research were long trashed before returning home.
I would like to set the record straight -"Primes are not random occurances" and PrimePro is simply my development tool to supply information i need to recreate the original formula's.
While PrimePro is not yet a pure generator, it incorporates some of the rediscovered methods that led to the final formula. The grand finale, as i see it, is when I'm able to produce world record primes on a humble home computer consistantly, beating the Cray Super Computers shere brute speed methods simply because I know how primes form. Am I Mad? Time will tell........, Enjoy, Al Taylor