Problem 656. Calculate Euler's phi function
Compute the Euler's phi function of a large integer.
For more information about this topic please visit: Euler's totient function.
With these constraints:
- n is a nonnegative integer greater than 0.
- "large integer" means 32bit integer
- vectorized Input
Examples:
- eulerphi(4) = 2
- eulerphi(11) = 10
Solution Stats
Problem Comments
-
2 Comments
Ben Ausdenmoore
on 4 May 2012
I'm pretty sure eulerphi(1) is 1. Mind checking that please! I'm just going off the table given through your link there.
Freddy
on 4 May 2012
It is corrected. Thanks for your help!
Solution Comments
Show commentsProblem Recent Solvers93
Suggested Problems
-
Back to basics 3 - Temp Directory
373 Solvers
-
Flip the main diagonal of a matrix
858 Solvers
-
Compute a dot product of two vectors x and y
1016 Solvers
-
How long is the longest prime diagonal?
401 Solvers
-
There are 10 types of people in the world
1209 Solvers
More from this Author1
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!