AN EXACT FORMULA TO CALCULATE
THE NUMBER OF PRIMES LESS THAN OR EQUAL TO X
Formula:
If x is an integer >= 4, then
x
_____ ---- | S(k) |
| | \ | ____ |
| | (x) = -1 + / | k |
| | ---- -- --
k=2
where S(k) is the Smarandache Function: the smallest integer such that S(k)!
is divisible by k, and | |
| a |
| |
-- --
means the interior integer part of a (the smallest integer greater than or
equal to a).
Proof:
Knowing the Smarandache Function has the property that if p > 4 then
S(p) = p if only if p is prime,
and S(k) <= k for any k,
and S(4) = 4 (the only exception from the first rule),
we easily find an exact formula for the number of primes
less than or equal to x.
Reference:
Seagull, L., "The smarandache Function and the number of primes up to x",
, University of Shielfield, Vol. 28, No. 3, 1995/6,
p. 53.