Changed Kasiski method from GCD to Factorization of integers