# Qbasicnews.com

## QbasicNews.Com => Challenges => Topic started by: Meg on May 16, 2003, 04:19:02 AM

 Title: Challenge Post by: Meg on May 16, 2003, 04:19:02 AM prove or disprove this statement, mathematically:"Every even whole number can be expressed as the sum of two prime numbers."e.g. 2 = 1 + 1, 4 = 3 + 1, 6 = 3 + 3, 8 = 5 + 3, 10 = 5 + 5, 12 = 7 + 5, etc...*peace*Meg. Title: haha, very funny. Post by: Agamemnus on May 16, 2003, 12:43:50 PM Every even whole number can be expressed as the sum of two prime numbers.For that you'd have to somehow take the set of all prime numbers P and the set of all even numbers E, then somehow combine the set of all prime numbers P into themselves, where P^2 = P1+P2 for all numbers in the sets P1 and P2. (forming a matrix).After that, you'd somehow compare P^2 and E and you'd have to prove that all E is in the set of P^2.This is made a little more difficult by the fact that the set of all prime numbers P and all even numbers E is infinite!EDIT:One way to approach this would be to form two equations of two prime number sequences and prove that slope of the area formed by adding the total areas of these equations on an (X, Y) grid is 2 (2, 4, 6) and that the equation formed is also a continuous equation. (IE: no gaps!)EDIT, Again:So, to get the two equations would probably be equivalent to finding an equation for prime numbers.Backing up to what I said somewhere else in this forum about reducible sequences, if the equation for prime numbers is infinite in length (IE it is the sequence itself, and there is no smaller sequence to it) then in fact this can all be proved very easily; it would just take infinite time to do so.EDIT, Once more:The definition of a prime number is a number n such thatm = all #s {m < n, m mod n = 0} is equal to {1, n}.The only 100% reliable way to find a prime number is to go through all m's (or all prime numbers < n, for obvious reasons) for a certain n and then find m mod n = 0 for all these m's (except 1).There are other ways that will give you an answer very quickly as to whether approximately a number is prime--99.9 percent or higher odds.But there is simply no way out of it. No way to get anything faster than checking all factors less than n. I don't think anyone has proved this, though. But it is obvious enough.To get such a method would mean that one could get an equation that is smaller than the entire sequence of primes to solve for primes. (besides the definition itself, wherein could lie the answer??)So, the question of this thread restated is (I think),"Is there a method that will find out if a number is prime for 100% certainty, (short of a lookup!!!) faster than computing m mod n for all factors m < n?" Title: Challenge Post by: whitetiger0990 on May 17, 2003, 02:42:07 PM Code:CLSprm = 3INPUT nDIM prime(n)FOR ii = 1 TO 3prime(ii) = iiNEXT iiFOR i = 1 TO na = i * 6 - 1b = i * 6 + 1IF a <= n THEN z = 1 DO  z = z + 1  IF z = a THEN prm = prm + 1: prime(prm) = a: EXIT DO  IF a / z = INT(a / z) THEN EXIT DO LOOPEND IFIF b <= n THEN z = 1 DO  z = z + 1  IF z = b THEN prm = prm + 1: prime(prm) = b: EXIT DO  IF b / z = INT(b / z) THEN EXIT DO LOOPEND IFNEXTFOR i = 1 TO prmp1 = n - prime(i) z = 1 d = 0 DO  z = z + 1  IF z >= p1 THEN d = 1: EXIT DO  IF p1 / z = INT(p1 / z) THEN EXIT DO LOOPIF d = 1 THEN PRINT PRINT p1; "+"; prime(i); "="; nEND IFNEXT i Title: Challenge Post by: Agamemnus on May 17, 2003, 09:50:41 PM 222 Title: Challenge Post by: whitetiger0990 on May 17, 2003, 10:00:52 PM What?  :???: Title: Challenge Post by: DrV on May 17, 2003, 10:07:16 PM I believe agamenus means that that is a disproof of the above statement. Title: . Post by: Meg on May 17, 2003, 10:23:10 PM 222 = 11 + 211 Title: Challenge Post by: whitetiger0990 on May 17, 2003, 10:30:40 PM 149 + 73 = 222And 59 + 163And 179 + 43And  83 + 139Enter 222 into my program and it spits out the answer Title: Challenge Post by: Agamemnus on May 20, 2003, 12:13:36 AM oh, i tried to make your program readable. But I changed something.Sorry. Title: Challenge Post by: Agamemnus on May 20, 2003, 12:16:41 AM I actually discovered something similar or the exact same as "6+-1", but it was 6 years ago. I was out prime formula hunting. I think I disproved my own formula for many cases afterwards, though. Title: Challenge Post by: whitetiger0990 on May 20, 2003, 09:15:39 AM In my program you should see that "6+-1" equals the prime numbers. But i haveCode:DO   z = z + 1   IF z = a THEN prm = prm + 1: prime(prm) = a: EXIT DO   IF a / z = INT(a / z) THEN EXIT DO LOOP To check if it's prime.