sum of geometric progression code example Example: geometric progression sum to infinity sum to infintiy = a1/1-r