first attempt at generating largest prime factor.
This issue here is that when the number gets sufficiently large, the isPrime method creates a list that is too long for scala to handle.
correct name of function