How do I write a function to take an integer and return the sum of integers from 1 to that number?

Thanks!!