Perfect totient numbers: Difference between revisions

Content added Content deleted
m (added am OEIS URL for ;Also see:)
m (→‎{{header|REXX}}: updated to the latest version of the program.)
Line 122: Line 122:
@.=. /*memoization array of totient numbers.*/
@.=. /*memoization array of totient numbers.*/
$= /*list of the perfect totient numbers. */
$= /*list of the perfect totient numbers. */
do j=3 by 3 until p==N; s= phi(j) /*obtain totient number for a number. */
do j=3 until p==N; s= phi(j) /*obtain totient number for a number. */
a= s /* [↓] search for a perfect totient #.*/
a= s /* [↓] search for a perfect totient #.*/
do until a==1; a= phi(a); s= s + a
do until a==1; a= phi(a); s= s + a