Calculating Euler phi function

AI Thread Summary
To compute the Euler phi function for a large integer, knowing its prime factorization is essential. For a product of two primes, N = p * q, the function can be calculated using the formula phi(N) = (p-1)(q-1). Implementing this in Matlab requires understanding how to factor N into its prime components. The discussion highlights the challenge of prime factorization, especially for large numbers, which is a key aspect in RSA encryption. Overall, the calculation simplifies significantly when the prime factors are known.
paton51
Messages
8
Reaction score
0
How do i comput the euler phi function of a large interger?
i know that if p is prime then phi(p)=p-1 and I've found a formula for computing non primes but i don't know how to implement in something like Matlab.
Does anyone know how?
 
Mathematics news on Phys.org
AFAIK, computing the Euler phi function requires you to know the prime factorization of the input. Unless you can find it, there's not much you can do.
 
Yes i know the factorisation problem is hard. I am workin with RSA encryption so we know two large primes, the product of which is N this is what i want to do euler phi on.
Since N is the product of two primes (p and q) is phi(N) simply (p-1)(q-1)?
 
Seemingly by some mathematical coincidence, a hexagon of sides 2,2,7,7, 11, and 11 can be inscribed in a circle of radius 7. The other day I saw a math problem on line, which they said came from a Polish Olympiad, where you compute the length x of the 3rd side which is the same as the radius, so that the sides of length 2,x, and 11 are inscribed on the arc of a semi-circle. The law of cosines applied twice gives the answer for x of exactly 7, but the arithmetic is so complex that the...
Back
Top