

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author LH
 */
public class PrimeFrac
{
    public static void main(String[] args)
    {
        Rational[] prg = 
            {new Rational(3,11),new Rational(847,45),new Rational(143,6),
            
            
            new Rational(7,3),new Rational(10,91),new Rational(3,7),
            
            
            new Rational(36,325),new Rational(1,2),new Rational(36,5)
            };
        Rational b = new Rational(10,1);
        System.out.println(0+"|"+b);
        for (int i = 1; i < 10017; i++)
        {
            for (Rational r : prg)
            {
                Rational tmp = r.multiply(b);
                if(tmp.isInteger())
                {
                    
                    b=tmp;
                    break; //ARSCHLOCH; hab dich vergessen und es hat nicht gefunzt...
                }
            }
            System.out.println(i+"|"+b);
            
            
            //Resultat= 105206017600756801139532489776611328125
        }
    
        
    }
}
