>2 and 3 are the only results of hpp 1e8 so pseudo induction seems to be very >consistent here. Are there any other primes of the form 5%~p+q where p and q >are paired primes? Maybe there is logic to say it is so. Or maybe a better >algorithm can extend well beyond 1e8...
greg ~krsnadas.org -- from: Roger Hui <[email protected]> to: Programming forum <[email protected]> date: 12 May 2013 22:16 subject: Re: [Jprogramming] Testing consecutive pairs of primes >My point was that "induction" in the sense of "it works for a few (or a few >billion) cases" is an unreliable guide to what is true. >The e-mail system made a mess of my last message. The statement I used to make >my point was true for n < 10^316, and it is proved that there are >counterexamples. -- from: Bo Jacoby <[email protected]> to: "[email protected]" <[email protected]> date: 12 May 2013 21:55 subject: Re: [Jprogramming] Testing consecutive pairs of primes >3 and 7 are primes, and (3+7)%2 is 5 which is a prime too. But 3 and 7 are not >consecutive primes, because there is a prime between 3 and 7, namely 5. So if >p < q and p is prime and q is prime and r= (p+q)%2 is prime too, then p < r >and r < q, and so p and q are not consecutive primes. QED. There is no need >for induction. -- from: Roger Hui <[email protected]> to: Programming forum <[email protected]> date: 12 May 2013 19:06 subject: Re: [Jprogramming] Testing consecutive pairs of primes >Henry has already argued that if p and q are consecutive primes then (p+q)%2 >can not be prime. I just want to say that reasoning of the sort: >While it might be possible for the larger primes, I'm thinking not - just by >induction. >is unreliable, at best. That is, it is unreliable to come a conclusion by >trying a few cases, or a few billion cases, and think that a property is true >in general. http://en.wikipedia.org/wiki/Prime_number_theorem tells of one >such instance: >This suggests that Li(*x*) should usually be larger than p(*x*) by roughly >Li(*x*1/2)/2, and in particular should usually be larger than p(*x*). However, >in 1914, J. E. Littlewood proved that this is not always the case. The first >value of *x* where p(*x*) exceeds Li(*x*) is probably around *x* = 10316; see >the article on Skewes' number for more details. -- from: greg heil <[email protected]> to: Programming forum <[email protected]> date: 12 May 2013 14:36 subject: Re: [Jprogramming] Testing consecutive pairs of primes Alan >when i first read your note i reinterpreted it as the prime ness of half of >the midpoint of prime pairs (ie off by two from each other)... i suppose this >is a made up question which i am guilty of providing exploratory functions for: ps=: p:@i. NB. primes pp=: ((2&+) = (1&|.)) NB. prime pair? pq=:1&p: NB. prime? ek=: </. NB. enclose key dl=: >@{: NB. disclose last pip=:(>@{:) @(pp </. ])@ps hi=: -:@>: NB. halve inc hpp=: >@}:@(pq ek ]) @ (-:@>:@pip) NB. half primes of pairs NB. this works responsively on my machine for up to hpp 1e7 2 3 NB. hpp 1e8 gives the same slowly ,and hpp 1e9 gives out of memory NB. Except for the first two pairs, it appears that none work... greg ~krsnadas.org ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
