Results 1 to 4 of 4

Thread: Help me with prime numbers

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Posts
    2

    Help me with prime numbers

    I need an idea for an algorithm which will find prime numbers from a given array(sieve of Arothestenes is too slow,I`m thinking about sieve of Atkin,but I can`t find any examples,so...if any idea I`ll be grateful:-)

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Help me with prime numbers

    Welcome to the forums!

    That was one of the contests, to find all primes less than 10000. You can find source code to all the entries.

    http://www.vbforums.com/forumdisplay.php?f=67

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Posts
    2

    Re: Help me with prime numbers

    Thanks but I`ve got an array from 1 to 1 000 000 000 then I`ve got x,y which x-y<=100000 and x<=y<= 1000 000 000and I`ve got to find prime numbers which are in array made by x,y

  4. #4
    Fanatic Member
    Join Date
    Oct 2004
    Posts
    751

    Re: Help me with prime numbers

    This might be a little out of your league, but research the quadritic sieve.
    My Projects: [ Instant Messagener Client/Server ] [ VBPictochat ]

    My Sites:
    [ Datanethost ]
    [ Helpdesk ]

    Remember if my post was helpful then Rate This Post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width