Wrote a function that returns all of the prime numbers
from 2 to the given number.