Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!nntp.club.cc.cmu.edu!goldenapple.srv.cs.cmu.edu!das-news2.harvard.edu!oitnews.harvard.edu!news.dfci.harvard.edu!camelot.ccs.neu.edu!news.mathworks.com!news-peer.gsl.net!ix.netcom.com!hbaker
From: hbaker@netcom.com (Henry Baker)
Subject: Re: Ask about some questions.
Content-Type: text/plain; charset=ISO-8859-1
Message-ID: <hbaker-0804971557510001@10.0.2.1>
Sender: hbaker@netcom16.netcom.com
Content-Transfer-Encoding: 8bit
Organization: nil
X-Newsreader: Yet Another NewsWatcher 2.2.0
References: <01bc42a6$2b6e8940$7ca9708c@hntp1.ntu.edu.tw> <33495275.171@wrq.com>
Mime-Version: 1.0
Date: Tue, 8 Apr 1997 23:57:51 GMT
Lines: 14

In article <33495275.171@wrq.com>, marisal <marisal@wrq.com> wrote:
> CSSuen wrote:
> > Dear all:
> > I am teaching myself about lisp language. I want to write a recursive
> > function called next-prime, which will return the next prime number for a
> > positive integer input from user,

I'll give you a big hint: do a web search on 'pseudo-prime', 'Jacobi symbol',
etc.  Then you can speed up your program by quickly rejecting non-pseudoprimes
before laboriously checking for primality.

The source code for PARI/GP is available on the web, and it implements such
a next-prime function, although it doesn't _prove_ that the 'prime' it finds
is really prime.
