Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


Math Forum
»
Discussions
»
sci.math.*
»
sci.math
Notice: We are no longer accepting new posts, but the forums will continue to be readable.
Topic:
A question about prime numbers
Replies:
3
Last Post:
Dec 10, 2000 1:35 AM



r3769
Posts:
30
Registered:
12/12/04


A question about prime numbers
Posted:
Dec 7, 2000 7:52 PM


The following ubasic program displays all the primes between 5 and 1000:
10 point 250 20 for x=5 to 1000 30 x1=1//x 40 n=1 50 a=ceil((n+1//x1)1 60 if an1=0 then 80 70 if ceil(n//(an1))>=x then print x:goto 110:endif 80 x1=a*x1n 90 n=n+1 100 if n<6*x then 50 110 next x
My question is: why?
Regards,
R. Burge



