The generalized Pillai equation ±rax±sby=c