addition ergodic ramsey theory factorial gamma function generalized arithmetic progression geometric progression infinite arithmetic series kahun papyrus mathworld mathematics number primes in arithmetic progression problems involving arithmetic progressions rhind mathematical papyrus sequence