Problem 3 and prime number tester

Added solution 3 and a function to check if a number is prime or not by
returning the same number if it is a prime.