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