Class PE0058

    • Constructor Summary

      Constructors 
      Constructor Description
      PE0058()
      A simple constructor to set number and title.
    • Method Summary

      Modifier and Type Method Description
      java.lang.String solve()
      It is only one loop needed that steps over all elements of the spiral.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PE0058

        public PE0058()
        A simple constructor to set number and title.
    • Method Detail

      • solve

        public java.lang.String solve()
        It is only one loop needed that steps over all elements of the spiral. Every element is checked to be a prime. The loop run while the number of found primes is more than ten times the number of all elements of the spiral.
        Returns:
        the side length of the spiral when the number of primes falls below one of ten of all elements
        See Also:
        Mathe.isPrime(int)