Numbers whose count of divisors is prime: Difference between revisions

→‎{{header|Quackery}}: improved efficiency
(Added Quackery.)
(→‎{{header|Quackery}}: improved efficiency)
Line 1,237:
=={{header|Quackery}}==
 
Noting that only perfect squares can fit the criteria (see discussion).
<code>factors</code> is defined at [[Factors of an integer#Quackery]].
 
<code>factors</code> isand <code>isqrt</code> are defined at [[Factors of an integer#Quackery]].
<syntaxhighlight lang="Quackery"> [ []
 
100000 times
<syntaxhighlight lang="Quackery"> [ []dip number$
[ i^ factors size
over size -
space swap of
swap join echo$ ] is recho ( n n --> )
 
[ []
100000 isqrt drop times
[ i^ dup * factors size
dup 2 = iff drop done
factors size 2 = while
i^ dup * join ] ]
 
[ dup [] != while
1,462

edits