Jump to content
Science Forums

Recommended Posts

Posted

when doing a search for twin prime proof on google, i came across this strange but interesting gem.

http://answers.yahoo.com/question/index?qid=20110228191917AAVrRmA

as far as i can tell, this method does indeed generate all and only twin primes (with the exception of 3,5).

i checked up to 600,000.

here's my coded version of his algorithm.

array = [True]*100001
y = 1
z = 0
value =5*y -1 
while True:
  array[value] = False
  y += 1
  value = 5*y +z*(6*y -1) -1
  if value > 100000:
     y = 1
     z += 1
     value = 5*y +z*(6*y -1) -1
     if value > 100000:
        break
y = 1
z = 0
value = 5*y +1
while True:
  array[value] = False
  y += 1
  value = 5*y +z*(6*y +1) +1
  if value > 100000:
     y = 1
     z += 1
     value = 5*y +z*(6*y +1) +1
     if value > 100000:
        break

y = 1
z = 0
value = 7*y +1
while True:
  array[value] = False
  y += 1
  value = 7*y +z*(6*y +1) +1
  if value > 100000:
     y = 1
     z += 1
     value = 7*y +z*(6*y +1) +1
     if value > 100000:
        break   
  
y = 1
z = 0
value =7*y -1 
while True:
  array[value] = False
  y += 1
  value = 7*y +z*(6*y -1) -1
  if value > 100000:
     y = 1
     z += 1
     value = 7*y +z*(6*y -1) -1
     if value > 100000:
        break

F = open("twins.txt","w")
for i in range(0,len(array)):
  if array[i]:
     F.write(str(6*i-1) +" " +str(6*i+1) +"\n")

while i'm not sure i consider it a proof, none-the-less, very interesting.

Posted

i agree it's no proof. no such proof is known & there is doubt whether one is even possible.

 

the first statement the guy gives is both unclear & highly suspicious to me.

 

As long as there is always a difference of 6 at some point between the two nearest odd non-primes, ...

 

???? :reallyconfused:

 

also, he writes "Then all twin primes can be written as 6x + 5 and 6x + 7.", but i think it should read 6x+5 & 6x+1.

 

hard to imagine anything so simple could have eluded astute mathematicians lo these many centuries. :shrug:

Posted

Quoting phillip 1882,

 

Quote:

As far as i can tell, this method does indeed generate all and only twin primes

(with the exception of 3,5). I checked up to 600,000.

 

If the above continues to hold, then we might be looking at

an absolutely major breakthrough, to say the least!

 

However, I find Kyles explanation somewhat hard to follow.

 

If possible, can you explain his idea/method in a way that would allow

someone like me, (a dinosaur who does not use a computer to do math)

to generate twin primes using only your easy to follow

step by step instructions, a pencil, and some paper?

 

Don.

Posted

sure.

start with the set of natural numbers.

strike out four, add 5, strike out 9, add 5, and so on.

then strike out 6, add 5, strike out 11, and so on.

then strike out 6, add 7, strike out 13, and so on.

then strike out 8, add 7, and so on.

these are the four primary equations that the rest are built on.

add 6 to 5, 11 will be your new increment. 11 +/- 2 will be your new starting point.

add 6 to 7, 13 will be your new increment, 13 +/-2 will be your new starting point.

add 6 to 11, 17 +/- 3 will be your new starting point and 17 will be the increment.

add 6 to 13, 19 +/- 3 will be your new starting point and 19 will be the increment.

and so on.

after you are done with the strike throughs, the numbers you have left are closely related to the twin primes. in particular, if you multiply each number by 6, then subtract 1 you get the lower twin prime, and adding 1 you get the higher.

Posted

here would be a brief example.

1 2 3 4 5 6 7 9 10 11 12 13 14 15

16 17 18 19 20 21 22 23 24 25

after 5n -1,

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

16 17 18 19 20 21 22 23 24 25

after 5n +1,

1 2 3 4 5 6 7 8 9 10 11 12 1314 15

16 17 18 19 20 21 22 23 24 25

after 7n -1,

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

16 17 18 19 20 21 22 23 24 25

after 7n +1,

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

11n -2 doesn't have any new strike throughs for this small of a sequence,

neither does 11n +2, 13n -2, 13n +2, 17n -3, 17n +3, 19n -3, 19n +3.

so we have...

1 2 3 5 7 10 12 17 18 23 25.

translated to the twin primes, (*6 +/- 1). this becomes..

5,7; 11,13; 17,19; 29,31; 41,43; 59,61; 71,73; 101,103; 107,109; 137,139; 149,151.

Posted (edited)

when doing a search for twin prime proof on google, i came across this strange but interesting gem.

http://answers.yahoo.com/question/index?qid=20110228191917AAVrRmA

A very cool find, Phillip – a gem indeed! :thumbs_up

 

as far as i can tell, this method does indeed generate all and only twin primes (with the exception of 3,5).

i checked up to 600,000.

here's my coded version of his algorithm. ...

I got the same result, checking for the same range with the following MUMPS xecute code to generate the algorithm’s list of twin primes

s M=100000 k ^I f X=1:1:M s ^I(1,X)=""
k FY f Y=1:1 q:$g(FY)  s FY=1,FZ=0 f Z=0:1 q:$g(FZ)  s FZ=1 f X=Z*6+5*Y-Z-1,Z*6+5*Y+Z+1,Z*6+7*Y-Z-1,Z*6+7*Y+Z+1 i X<M k ^I(1,X),FY,FZ
k ^I(4) s X=0 f C=1:1 s X=$o(^I(1,X)) q:X=""  s ^I(4,X*6-1)=C
s X=0 f C=2:1 s X=$o(^I(1,X)) q:X=""  w C,"  ",X,"  ",X*6-1," ",X*6+1,! ;outputs the twin primes

and the following to find (via the good ‘ole sieve) the primes and twin primes less than 600000 and compare them to the algorithm’s list

k ^I(2) f X=2:1:6*M s ^I(2,X)=""
s P=1 f  s P=$o(^I(2,P)) q:'P  f X=P+P:P:6*M k ^I(2,X)
k ^I(3) s (X,C)=0 f  s X=$o(^I(2,X)) q:X=""  s:$d(^(X+2)) (C,^I(3,X))=C+1
s (C,X)=0 f  s X=$o(^I(3,X)) q:X=""  i '$d(^I(4,X)) s C=C+1 w C,"  ",^I(3,X),"  ",X," ",X+2,!
s (C,X)=0 f  s X=$o(^I(4,X)) q:X=""  i '$d(^I(3,X)) s C=C+1 w C,"  ",^I(4,X),"  ",X," ",X+2,!

All this outputs:

2  1  5 7
3  2  11 13
4  3  17 19
...
5330  99950  599699 599701
5331  99990  599939 599941
5332  100000  599999 600001

and

1  1  3 5
1  5331  599999 600001

The last pair my coding of the Kyle’s algorithm generates is wrong, but that’s just a relic of limiting the calculation to X not greater than 100000.

 

the first statement the guy gives is both unclear & highly suspicious to me.

 

As long as there is always a difference of 6 at some point between the two nearest odd non-primes' date=' ...

[/quote']

 

???? :reallyconfused:

Though Kyle’s yahoo post is more hint than lengthy explanation, this statement makes sense to me. He’s just observing that, for some odd non-prime N, N+6 is also an odd non-prime. A terse & trivial proof of this is:

If N is divisible by 3, then N=3Q, and N+6=3(Q+2), so N+6 is also non-prime

i agree it's no proof. no such proof is known & there is doubt whether one is even possible.

Kyle’s hint at a proof comes at the very end of his yahoo post:

Now I would use Hilbert's paradox of the Grand Hotel, which, in this case, tells us that these functions cannot take up every number in the number system, and leave an infinite number of numbers which cannot be defined as a value of any of these functions, thus leaving us with infinitely many numbers which have a prime number two and four ahead of it, and therefore infinitely many twin primes

This is clever, but I think, but can’t immediately prove, wrong, and a overgeneralizing misreading of Hilbert's paradox of the Grand Hotel. The GH paradox illustrates that integer-value functions such as f(x)=nx amd f(x)=nx for integers n and x can’t take up all the integers. It doesn’t state that functions like f(x,y)=ax +by, or like Kyle’s 4 functions, can’t take up all the integers above some values of of a and b. For example, f(x,y)=3x +5y appears to me, after a bit of computing, to take up all the integers greater than 7.

 

To disprove Kyle’s proof, I (or the gentle hypographer ;)) needs to prove that all integers over some value can be produced by one of Kyle’s fuctions. I suspect this is true for the general case of functions of the form f(x,y)= axpyq +bxrys, where a and b, p or r, and q or s are non-zero.

 

But I could think wrongly, so a proof’s needed :)

Edited by CraigD
Fixed incorrect number

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...