Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Problem 656. Calculate euler's phi function

Created by Freddy

Compute the euler's phi function of a large integer.

For more information about this topic please visit: https://en.wikipedia.org/wiki/Euler%27s_totient_function

With these constraints:

  • n is a nonnegative integer greater than 0.
  • "large integer" means 32bit integer
  • vectorized Input

Examples:

  1. eulerphi(4) = 2
  2. eulerphi(11) = 10

Problem Group

Solution Statistics

20 correct solutions 39 incorrect solutions
Last solution submitted on Aug 20, 2013

Problem Comments