Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!sdd.hp.com!spool.mu.edu!munnari.oz.au!uniwa!cc.curtin.edu.au!nlewispn From: nlewispn@cc.curtin.edu.au (Peter N Lewis) Newsgroups: comp.sys.mac.programmer Subject: Re: Prime numbers, Help Message-ID: <1991Apr19.102652.7840@cc.curtin.edu.au> Date: 19 Apr 91 02:26:52 GMT References: <1991Apr4.164338.329@asacsg.mh.nl> <1991Apr17.164107.28457@ni.umd.edu> Organization: NCRPDA, Curtin University Lines: 41 In article <1991Apr17.164107.28457@ni.umd.edu>, zben@ni.umd.edu (Ben Cranston) writes: > > I seem to remember a theorum that if p1, p2, etc are sequential prime numbers > starting at 2 then numbers of the form > > p1 * p2 * p3 ... - 1 > > are prime, the proof concerns the fact that if p1 or p2 or any of the pn are > a factor of the big number then there is a second unique factorization, and > since prime factorizations are unique it must be prime. Or something. Or > maybe it was + rather than - -- any mathematicians out there? > Ummm, well except for the fact the 2*3*5*7-1=209=11*19.... Actually, 2*3*5*...*pn-1 does not have a factor of 2,3,5,...,pn in it. BUT it can have a factor of pn+1,pn+2,...,sqrt(2*3*5*...*pn-1). +'s wont work either since 2+3-1=4, 2+3+5-1=9, 2+3+5+7-1=16 (see a trend here?) 2+3+5+7+11-1=27, 2+3+5+7+11+13-1=40 (ooops, there goes that nice trend). > Anyway, if you use the table to get the p1, p2, etc you could generate some > incredibly big primes. The main failure is that they will not be particularly > dense, in fact, the ones at the end of the list will be about 16,000 times > each other. I don't know *how close* the original requirement was. It isnt that easy :-(. There are lots of fancy algorithms for finding really huge primes, but they mostly take huge amounts of processing time as well. I don't know much about them so if you are interested go to a maths library and look them up. Have fun, Peter. PS: Now what on earth does all this have to do with mac programming? :-) -- Disclaimer:Curtin & I have an agreement:Neither of us listen to either of us. *-------+---------+---------+---------+---------+---------+---------+-------* Internet: Lewis_P@cc.curtin.edu.au I Peter Lewis Bitnet: Lewis_P%cc.curtin.edu.au@cunyvm.bitnet I NCRPDA, Curtin University UUCP: uunet!munnari.oz!cc.curtin.edu.au!Lewis_P I GPO Box U1987 PSImail: psi%050529452300070::Lewis_P I Perth, WA, 6001, AUSTRALIA Has anyone ever found someone who used a Mac and then Changed To a PC?