public static String Primes(int n)
    {
        String result = "";
        for (int i = 0; i <= n; i++)
            if (IsPrime(i))
                result += i + " ";
        
        return result;
    }