Generate and show here, the first twenty Perfect totient numbers.



Related task

   Totient function


Also see

   the OEIS entry for   perfect totient numbers.
   mrob   list of the first 54


F φ(n)
   R sum((1..n).filter(k -> gcd(@n, k) == 1).map(k -> 1))
 
F perfect_totient(cnt)
   [Int] r
 
   L(n0) 1..
      V parts = 0
      V n = n0
      L n != 1
         n = φ(n)
         parts += n
      I parts == n0
         r [+]= n0
         I r.len == cnt
            R r
 
print(perfect_totient(20))