Finds prime numbers up to a specified max.

Iterates through a range from 2 to a specified integer value and outputs any prime numbers found in that range as elements of an array.