The Math Forum

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 30
Registered: 12/12/04
Re: A question about prime numbers
Posted: Dec 7, 2000 8:03 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

r3769 wrote in message <3a302e2e$>...
>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

This should be:

50 a=ceil((n+1)//x1)-1

>60 if a-n-1=0 then 80
>70 if ceil(n//(a-n-1))>=x then print x:goto 110:endif
>80 x1=a*x1-n
>90 n=n+1
>100 if n<6*x then 50
>110 next x
>My question is: why?
>R. Burge

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.