Cody Problem 656 deals with the totient function, denoted by
which counts the numbers less than n that are relatively prime to n. The first five values of the totient are 1, 1, 2, 2, and 4.
The totient summatory function
is the sum of the values of
from
to n. Therefore,
.
Write a function to compute the totient summatory function.
Solution Stats
Solution Comments
Show comments
Loading...
Problem Recent Solvers7
Suggested Problems
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
2072 Solvers
-
424 Solvers
-
2280 Solvers
-
Longest run of consecutive numbers
6789 Solvers
-
6028 Solvers
More from this Author329
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!