Class PE0047

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.ArrayList<java.lang.Integer> primes
      Storage for all primes that can occur less than one million.
    • Constructor Summary

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

      Modifier and Type Method Description
      void prepare()
      It initializes the list of primes with values less than 1.000.000 using the Sieve class.
      java.lang.String solve()
      This method solves the given problem by checking every number to have four distinct prime factors.
      • Methods inherited from class java.lang.Object

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

      • primes

        private java.util.ArrayList<java.lang.Integer> primes
        Storage for all primes that can occur less than one million.
    • Constructor Detail

      • PE0047

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

      • solve

        public java.lang.String solve()
        This method solves the given problem by checking every number to have four distinct prime factors. If four of these numbers are found consecutive the first of them is returned.
        Returns:
        the first of four consecutive numbers with four distinct prime factors
        See Also:
        Mathe.getPrimeFactors(long)