Deceptive numbers: Difference between revisions

Content added Content deleted
(→‎J: simplify, much faster)
(added RPL)
Line 1,257: Line 1,257:
{{out}}
{{out}}
<pre>91 259 451 481 703 1729 2821 2981 3367 4141 4187 5461 6533 6541 6601 7471 7777 8149 8401 8911 10001 11111 12403 13981 14701</pre>
<pre>91 259 451 481 703 1729 2821 2981 3367 4141 4187 5461 6533 6541 6601 7471 7777 8149 8401 8911 10001 11111 12403 13981 14701</pre>

=={{header|RPL}}==
Based on the hints given on the Talk page.
{{works with|HP|49}}
« { } 49
'''WHILE''' OVER SIZE 10 < '''REPEAT'''
'''IF''' DUP 3 MOD OVER 5 MOD AND '''THEN'''
'''IF''' DUP ISPRIME? NOT '''THEN'''
DUP MODSTO 10 OVER 1 - POWMOD
'''IF''' 1 == '''THEN''' SWAP OVER + SWAP '''END'''
'''END END'''
2 +
'''END''' DROP
» » '<span style="color:blue">TASK</span>' STO
{{out}}
<pre>
1: { 91 259 451 481 703 1729 2821 2981 3367 4141 }
</pre>
Runs in 4 minutes on a HP-50g.


=={{header|Ruby}}==
=={{header|Ruby}}==