I also think repunits are, in general, easier to factor because ones that do not have a prime number of digits have obvious divisors.
Certainly, rep units of up to 50 digits are factored easily (Google a bignum factorization program online, and try for yourself)
Even disregarding that, the original code computed a square root about sqrt(n) times (that's why its running time went up by a factor of 10 for every two digits added). Even without using advanced factoring algorithms, you can factor that number using, at the very most, sqrt(n) trial divisions.
I also think repunits are, in general, easier to factor because ones that do not have a prime number of digits have obvious divisors.
Certainly, rep units of up to 50 digits are factored easily (Google a bignum factorization program online, and try for yourself)
Even disregarding that, the original code computed a square root about sqrt(n) times (that's why its running time went up by a factor of 10 for every two digits added). Even without using advanced factoring algorithms, you can factor that number using, at the very most, sqrt(n) trial divisions.