Prime number calculator
Home >
Excel programs >
Prime number calculator
See also - Prime numbers
What is the Prime number calculator?
The Prime number calculator, as its name suggests, is a very basic program which will check whether integers upwards of 2 are prime numbers.
The Prime number calculator, as its name suggests, is a very basic program which will check whether integers upwards of 2 are prime numbers.
| prime_number_calculator.xls |
(Version 1.10, 824 KB)
What does the Prime number calculator do?
It does pretty much what its name suggests, you type in two integers between 2 and 10,000,000,000 and the program will...
Below is a screenshot from the program...
What does the Prime number calculator do?
It does pretty much what its name suggests, you type in two integers between 2 and 10,000,000,000 and the program will...
- check if the numbers are prime,
- spilt the numbers into their prime factors if they are not a prime numbers,
- find the highest common factor (HCF) and least commom multiple (LCM) of the two numbers.
Below is a screenshot from the program...
How does the Prime number calculator work?
In the traditional way - it divides the number you put in by every prime number from 2 upwards until it either gets a whole number answer, or the answer is greater than the number which it divided by. The program has the first 9592 prime number stored in it (i.e. up to 99991). As for calculating the HCF and LCM, the program simply compares the two lists of prime factors that are produced for each number. It's as simple as that.
Where did you get the information to write the Prime number calculator?
I obtained the first 9592 prime numbers by using John Moyer's prime number printer. The rest of the program is all my own work. For more on prime numbers, and how they're calculated, try my prime numbers page.
In the traditional way - it divides the number you put in by every prime number from 2 upwards until it either gets a whole number answer, or the answer is greater than the number which it divided by. The program has the first 9592 prime number stored in it (i.e. up to 99991). As for calculating the HCF and LCM, the program simply compares the two lists of prime factors that are produced for each number. It's as simple as that.
Where did you get the information to write the Prime number calculator?
I obtained the first 9592 prime numbers by using John Moyer's prime number printer. The rest of the program is all my own work. For more on prime numbers, and how they're calculated, try my prime numbers page.
