Super-d numbers: Difference between revisions

Added Quackery.
(Added Quackery.)
Line 1,493:
First 10 super-6: [27257,272570,302693,323576,364509,502785,513675,537771,676657,678146]</pre>
 
=={{header|Quackery}}==
 
<code>from</code>, <code>index</code> and <code>end</code> are defined at [[Loops/Increment loop index within loop body#Quackery]].
 
<syntaxhighlight lang="Quackery"> [ over findseq swap found ] is hasseq ( [ x --> b )
 
[ [] swap
[ 10 /mod
rot join swap
dup 0 = until ]
drop ] is digits ( n --> [ )
 
[ over ** over * digits
swap dup of hasseq ] is superd ( n --> b )
 
[] 5 times
[ [] 1 from
[ i^ 2 + index
superd if [ index join ]
dup size 10 = if end ]
nested join ]
witheach
[ i^ 2 + echo say " -> " echo cr ]</syntaxhighlight>
 
{{out}}
 
<pre>2 -> [ 19 31 69 81 105 106 107 119 127 131 ]
3 -> [ 261 462 471 481 558 753 1036 1046 1471 1645 ]
4 -> [ 1168 4972 7423 7752 8431 10267 11317 11487 11549 11680 ]
5 -> [ 4602 5517 7539 12955 14555 20137 20379 26629 32767 35689 ]
6 -> [ 27257 272570 302693 323576 364509 502785 513675 537771 676657 678146 ]
</pre>
 
=={{header|R}}==
1,467

edits