All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
A false claim (Posted on 2013-02-05) Difficulty: 3 of 5
A German mathematician Christian Goldbach (1690-1764) stated that every odd composite number can be written as a sum of a prime and twice a square.

Some examples:
9 = 7 + 2*12
21 = 3 + 2*32
25 = 7 + 2*32
33 = 31 +2*12


Now we know that his conjecture is false.

What is the smallest odd composite number not complying with C.G.'s conjecture?

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 3

First I used UBASIC to save a list of prime numbers through 10,007. The following prigram reads that list and produces a file of all the formable numbers by using squares up to 71^2, assuring that each term up to at least 10,000 will be included, so as to make sure all formable numbers up to that value will be represented on the output list, which is then sorted so that any gaps can be found by the second phase. The odd primes themselves are included as the conjecture applies only to composite numbers not being missing.

OPEN "primelst.txt" FOR INPUT AS #1
OPEN "goldnums.txt" FOR OUTPUT AS #2

CLS

' looking up to 10,000

DO
  INPUT #1, prm
  FOR b = 0 TO 71  ' the zero puts the primes on the list
    g = prm + 2 * b * b
    IF g MOD 2 = 1 THEN
      PRINT #2, USING "#####"; prm + 2 * b * b
    END IF
  NEXT b
LOOP UNTIL EOF(1)
CLOSE
     
SHELL "sort < goldnums.txt > gnums.txt"
'sorted list of odd formable numbers, including primes, as squares can be zero

OPEN "gnums.txt" FOR INPUT AS #1
DO
 prevn = n
 INPUT #1, n
 IF prevn > 0 AND prevn + 2 < n THEN
    PRINT prevn + 2
 END IF
LOOP UNTIL EOF(1) OR n > 10000
CLOSE

The program finds two missing odd numbers under 10,000:

 5777
 5993


  Posted by Charlie on 2013-02-05 15:47:15
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (24)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information