Project Euler 46: Finding a counterexample to a Goldbach conjecture
Optimization

It seems that you have tried to optimize your code using the sieve of Eratosthenes; however, the sieve of Eratosthenes is only useful if there is a given upper bound in the problem statement. 

An optimal solution can be achieved for this problem via brute-force in the following manner (pseudocode):

n = ... # the smallest odd composite number

loop forever:
    solution_found = False
    for all possible x:
        possible_prime = n - 2 * x ** 2
        if is_prime(possible_prime):
            solution_found = True
            break
    if not solution_found:
        print("Answer: " + n)
        break
    n = n + ... # what to increment by? 


Note that the above is merely pseudocode. For the line for all possible x, it is possible to bound x. Also (and most importantly), the is_prime() method needs to be cleverly thought out, possibly caching values.

Note: I just tested my implementation based on the above pseudocode and got the answer instantaneously. Too bad Goldbach didn't have a computer!