Numbers whose count of divisors is prime: Difference between revisions

Content added Content deleted
(Added Quackery.)
(→‎{{header|Quackery}}: improved efficiency)
Line 1,237: Line 1,237:
=={{header|Quackery}}==
=={{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> and <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
dup 2 = iff drop done
factors size 2 = while
factors size 2 = while
i^ join ] ]
i^ dup * join ] ]


[ dup [] != while
[ dup [] != while