[seqfan] Re: Primes of the form kn+1
franktaw at netscape.net
franktaw at netscape.net
Thu Dec 17 22:21:46 CET 2009
Well, it should always terminate. Unfortunately, PARI returns 0 for
isprime(-p), where p is a positive prime (at least in my version), so
there is no guarantee.
Franklin T. Adams-Watters
-----Original Message-----
From: Michael Porter <ic_designer at verizon.net>
Is it true that for every positive integer n, there is a prime of the
form kn+1
with 1<=k<=n?
I submitted the following PARI program for sequence A089727:
A089727(n) = {local(k);k=n;while(!isprime(n*k+1),k--);n*k+1}
and then I started wondering if the while loop would always terminate.
Thanks,
Michael
More information about the SeqFan
mailing list