summaryrefslogtreecommitdiff
path: root/progs/a334.py
blob: b481a67390793073079d6d6e43a27e55b7b1d2a4 (plain)
1
2
3
4
def series_sum(number):
 total = 0
 total = (number * (number + 1) * (2 * number + 1)) / 6
 return total