Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: Primality sieve challenge Date: Mon, 18 Jan 2016 19:28:52 +0000 Organization: A noiseless patient Spider Lines: 19 Message-ID: <87ziw27kln.fsf@bsb.me.uk> References: <5b608a56-e16b-4467-a0ce-4e30f6796920@googlegroups.com> <37264925.IaaGi9xk8D@PointedEars.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: mx02.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="8997"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18DrMWSNvRDu/D45Lb2p5/asoGpp5zLmZw=" Cancel-Lock: sha1:cwNVWiAdMlyGxCEOC/7KiXCzTxc= sha1:LA/npWhTao/hl0HxzHLFwBfuI7Y= X-BSB-Auth: 1.8a712cb4f412d2fb9bad.20160118192852GMT.87ziw27kln.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:29325 Thomas 'PointedEars' Lahn writes: > Gene Wirchenko wrote: > >> […] All primes >= 5 are of the form 6k +/- 1 where k is a positive >> integer. > > Interesting thesis. Prove it. It's almost trivial. All integers >= 5 can be written in the form 6k+n where n is in {-1, 0, 1, ... 4} and k > 0, but all those that have the form 6k + {0, 2, 3, 4} are clearly composite. This is a specific case of the more general observation that all sufficiently large primes must have the form mk + n with m, n relatively prime. -- Ben.