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


10 DEFINT A-Z
20 N=3
30 S=N: T=0
40 X=S: S=0
50 FOR I=1 TO X-1
60 A=X: B=I
70 IF B>0 THEN C=A: A=B: B=C MOD B: GOTO 70
80 IF A=1 THEN S=S+1
90 NEXT
100 T=T+S
110 IF S>1 GOTO 40
120 IF T=N THEN PRINT N,: Z=Z+1
130 N=N+2
140 IF Z<20 GOTO 30