optimize goldbach.py code