A Perfect totient number is an integer that is equal to the sum of its iterated totients. Perfect totient number is denoted by .
, Now, , and 9 == 6 + 2 + 1, Therefore, 9 is a perfect totient number.
Check if N is a Perfect totient number
Given an integer N, the task is to check N is a Perfect totient number.
Input: N = 9
Input: N = 10
Approach: The idea is to find the Euler Totient Value of the given number, suppose we get the Euler Totient Value of N as V, then we will again find the Euler Totient Value of V until the new Euler Totient Value V becomes 1. We will also keep the sum of all the Euler Totient Value values V we got till now and check if the sum is equal to N or not. If equal then the given number is a perfect Euler Totient number.
Below is the implementation of the above approach:
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Check if Euler Totient Function is same for a given number and twice of that number
- Find smallest perfect square number A such that N + A is also a perfect square number
- Highly Totient Number
- Check if a number is a perfect square having all its digits as a perfect square
- Optimized Euler Totient Function for Multiple Evaluations
- Count integers in a range which are divisible by their euler totient value
- Count of elements having Euler's Totient value one less than itself
- Probability of Euler's Totient Function in a range [L, R] to be divisible by M
- Euler's Totient Function
- Euler's Totient function for all numbers smaller than or equal to n
- Count numbers upto N which are both perfect square and perfect cube
- Find minimum number to be divided to make a number a perfect square
- Number of times the largest perfect square number can be subtracted from N
- Minimum divisor of a number to make the number perfect cube
- Previous perfect square and cube number smaller than number N
- Number of perfect squares between two given numbers
- Count all perfect divisors of a number
- Perfect Number
- Program to check Plus Perfect Number
- Check if given number is perfect square
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.