Re: Direct calculation of Primes - Possible?



In article <QbednQCK65YO_J_bnZ2dnUVZ_oPinZ2d@xxxxxxxxxxx>, dave wrote:
Volker Birk <bumens@xxxxxxxxxxx> wrote:
Chris Mattern <syscjm@xxxxxxxxxxxxxxxxxx> wrote:
Nick, if a method for generating primes directly interests you, I
suggest you get the book from http://calculateprimes.com and verify for
yourself that it works. It's clear that the algorithm generates primes,
but the questions of whether it generates all primes and only primes remain
to be proven AFIK.
*Snerk*. So it throws out primes, but you don't know if it *only*
throws out primes, or if it gets all primes. In other words, it's
worthless.

I've a small algorithm, too, which "generates primes, but perhaps
generates not all primes and maybe not only primes":

for (int i=1; i++; )
printf("maybe a prime: %d\n", i);

Hey, it's even better:

it _provably_ generates _all_ primes!!1!11 (Integer overflow? What do
you mean by that? ;-)

Write the program in Haskell or Calc and the overflow problem goes away.

Until the number becomes too large to be contained in memory.
Granted, that'll take awhile...

--
Christopher Mattern

NOTICE
Thank you for noticing this new notice
Your noticing it has been noted
And will be reported to the authorities
.


Quantcast