English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

12 answers

Pi(x) = # of prime numbers <= x

There are probably tables, like on the internet, and 100 is a "common" value. I will runa program and get back to you in a sec.........

Pi(x) is approximated by x/log(x), see the "prime number theorem"

I get pi(1000)=168

2007-01-06 04:26:13 · answer #1 · answered by a_math_guy 5 · 1 1

Well that's an age old question, isn't it? It hasn't been fully solved yet, either.

One of the cleverest ways (IMO) is the sieve of Eristophanes. Write all the numbers from 1-1000

1 2 3 4 5
6 7 8 9 10 etc

Starting with 2, cross any number that is a multiple of it (all the even numbers)

Then go to the first number not crossed out (3) and cross out all the multiples of it. Some of them will already be crossed out. The next number not crossed out is 5, so it is prime. Cross out all it's multiples. Keep going in this fashion until you have found all the prime numbers up to 1000.

Of course this is a little labor intensive, especially for large numbers, but it's still a nice system just in its simplicity.

2007-01-06 04:29:39 · answer #2 · answered by hunneebee22 4 · 2 1

By number theory, you have 168 prime numbers under 1000.

2007-01-06 04:31:46 · answer #3 · answered by sahsjing 7 · 0 1

One manual method
Write down 1 to 1000
1, 2, 3 >> prime numbers
Cross out all even numbers
Repeat counting 1 to 3 and cross out all numbers on count 3
Example: 6, 9, 12, .....
Repeat counting 1 to 5 and cross out all numbers on count 5
Example 10, 15, .....

Repeat this process with 7, 11, 13, .......
until you reach PrimeInteger[sqrt(1000) + 1] = 31

Remaining umbers, which are not crossed out, are your prime numbers up to 1000

2007-01-06 04:45:01 · answer #4 · answered by Sheen 4 · 2 1

count them ... (168)

or approximate the number by 'The Prme Number Theorem'
stating that the number of prime numbers less than 'x' is approximately

x/ln(x)

1000 / 6.9077 = 144.7 ... ooops, well, the approx gets better as x increases.

However, a 'closer' approximation is found using

x / ( ln(x) - 1 )
1000 / (6.9077 -1) = 1000 / (5.9077) = 169.3

2007-01-06 04:25:52 · answer #5 · answered by atheistforthebirthofjesus 6 · 2 0

Prime Numbers

All prime numbers has two factors 1 and itself.

All other numbers that has other factors including 1 and itseld, are called composite .

Click on the URL below for additional informating concerning Prime numbers

primes.utm.edu

- - - - - - - - - - -s-

2007-01-06 05:33:22 · answer #6 · answered by SAMUEL D 7 · 0 1

The Sieve of Erasthathenes is a good tool to do this.

2007-01-06 05:41:23 · answer #7 · answered by JasonM 7 · 1 0

divide by the factor, but confirm your answer by doing it a second time

2007-01-06 04:26:40 · answer #8 · answered by Anonymous · 1 1

100*10
25*4*2*5
5*5*2*2*2*5
2^3*5^3

2007-01-06 04:57:10 · answer #9 · answered by Anonymous · 0 2

the same way you do any other #.

2007-01-06 05:27:55 · answer #10 · answered by Darkstar 2 · 0 1

fedest.com, questions and answers