List of primes
You can enter in math mode, ie. (4+2*3)/3
Primenumber list algorithm with javascript.
index start from number 2 and goes upto the number the user inserted, and list is empty from start.
It checks the indexnumber from the list and see if any can evenDivide
the indexnumber, if none can then the index is a prime and is added to the list
Not all the numbers in the list has to be checked.
I have decided to test until a value size of square-root_of_the_number is reached in the list.
A simple algorithm best suited for finding the first primes (the first 10,000).