We consider a Diophantine equation arising from a generalization of the classical Lucas problem of the square pyramid: when is the sum of the first m-gonal numbers n-gonal? We use the theory of ...