You'll have to convert everything to a BigInteger, then use the compareTo method.



for(BigInteger i = new BigInteger("2"); i.compareTo(input) < 0; i = i.add(BigInteger.ONE))


However, I...