Sum(x**k%2C(k%2C0%2Coo))
Want to compute something more complicated? Try a full Python/SymPy console at SymPy Live.