Equations in prime powers