RE: elementary number theory problem