Perfect totient numbers: Difference between revisions

m
(Added Easylang)
 
(2 intermediate revisions by 2 users not shown)
Line 1,189:
.
</syntaxhighlight>
 
{{out}}
<pre>
3 9 15 27 39 81 111 183 243 255 327 363 471 729 2187 2199 3063 4359 4375 5571
</pre>
 
=={{header|Factor}}==
Line 2,728 ⟶ 2,733:
The first 20 perfect totient numbers are:
[3,9,15,27,39,81,111,183,243,255,327,363,471,729,2187,2199,3063,4359,4375,5571]
</pre>
 
=={{header|RPL}}==
{{works with|HP|49}}
« 0 OVER
'''WHILE''' DUP 1 ≠ '''REPEAT'''
EULER SWAP OVER + SWAP
'''END''' DROP ==
» '<span style="color:blue">PTOT?</span>' STO
« → n
« { } 1
'''WHILE''' n '''REPEAT'''
'''IF''' DUP <span style="color:blue">PTOT?</span> '''THEN'''
SWAP OVER + SWAP
'n' 1 STO-
'''END'''
2 + <span style="color:grey">@ Perfect totient numbers are odd</span>
'''END''' DROP
» » '<span style="color:blue">TASK</span>' STO
 
20 <span style="color:blue">TASK</span>
{{out}}
<pre>
1: { 3 9 15 27 39 81 111 183 243 255 327 363 471 729 2187 2199 3063 4359 4375 5571 }
</pre>
 
Line 2,755 ⟶ 2,785:
<pre>3, 9, 15, 27, 39, 81, 111, 183, 243, 255, 327, 363, 471, 729, 2187, 2199, 3063, 4359, 4375, 5571
</pre>
 
 
=={{header|Rust}}==
1,150

edits