On a class of combinatorial diophantine equations