Perfect totient numbers: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: updated to the latest version of the program.) |
m (→{{header|REXX}}: changed the limit for the program.) |
||
Line 118:
<lang rexx>/*REXX program calculates and displays the first N perfect totient numbers. */
parse arg N . /*obtain optional argument from the CL.*/
if N=='' | N=="," then N=
p= 0 /*the count of perfect totient numbers.*/
@.=. /*memoization array of totient numbers.*/
Line 143:
end /*m*/
@.z= #; return # /*use memoization. */</lang>
{{out|output|text= when using the default input of : <tt>
<pre>
The first
3 9 15 27 39 81 111 183 243 255 327 363 471 729 2187 2199 3063 4359 4375 5571
</pre>
|