Posted: May 22nd, 2023
In this case n = 618240007109027021
Therefore from the above calculations, we obtain the following;
p = 250387201
Therefore the small prime factors of p-1 are
(2)8Â (3)5Â (5)2Â (23) (7)
2)Â We first select a bound for the factorial.
b = ln (n)
is the acceptable limit.
in this case 43.
Exponent is 43! = 6.0415263063373835637355132068514e+52 (factorial of 43)
then we choose some number to raise to that exponential value.
A number ‘a’ from 2 to n-1 can be used.
In this case, I chose 2
Then that’s a factor of n
If not, raise the bound limit.
P = 250387201
//The function to find the prime factors of n is;
public static BigInteger primefactor(BigInteger n) // n is the integer to factorize
public static BigInteger primefactor(BigInteger n) // n is the integer to factorize
return y.subtract(BigInteger.ONE).gcd(n);}
static void execA()
static void factor(BigInteger n)
public static void main(String[] args) //Main method
}
To factor in a larger value of n, you insert the following method in the code;
execB(); // then call execB() function in main
Factoring n = 642401 using the information;
5161072 ≡ 7 (mod n)
And that
1877222 ≡ 22 ∙ 7 (mod n)
n = 642401
Therefore factor1 := igcd (516107*187722-2*7, n); // n = 642401
factor1 := 1129
and we obtain factor2 by dividing n by factor1
factor2 := n/factor1;
factor2 := 569
Thus 642401= 1129 * 569 which are indeed primes
given that 2(n−1) ≡ k2 _≡ 1 (mod n)
Then we can deduce from “Fermat’s Little theorem†that n is not indeed a prime
number.
Because 2(n−1)/2 _≡ ±1 (mod n) and 2(n−1) ≡ 1 (mod n)
then From the “basic factoring principleâ€; k2 ≡ 12 (mod n)
and k _≡ ±1 (mod n)
Therefore we can find a nontrivial factor of n using the formula gcd(k-1, n) or gcd(k+1, n)
Place an order in 3 easy steps. Takes less than 5 mins.