Question #65512

2 Answers
Apr 25, 2017

The answer depends on what you mean by "formula".


There are procedures for finding primes -- the Sieve of Eratosthenes is one.

The are functions for generating primes, but none are easy to compute.

I recall being told in graduate school that that there is a function of 26 variables for generating the primes in order. (That was a few years ago, perhaps there is a better one now.)

Apr 27, 2017

No, but there is a way of finding out if a number is "prime"
(Where it's only factors are 1 and itself)


  1. Find the #sqrt# of the number = #x#
  2. Find all the numbers up to the #sqrt#
  3. Furthermore, find all the prime numbers in that set
  4. If any of the prime numbers up to #x# are divisors of #x^2# then it is a prime number
  5. However, if no primes up to #x# are divisors of #x^2# then it is not classified as a prime number.