HP Prime for All

English  Русский 

Syntax

euler(x);

Description

Euler’s phi (or totient) function. Takes a positive integer x and returns the number of positive integers less than or equal to x that are coprime to x.

Example

euler(6) returns 2

euler — Discussion