Numbers whose count of divisors is prime: Difference between revisions
Numbers whose count of divisors is prime (view source)
Revision as of 20:49, 13 October 2022
, 1 year ago→{{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]].▼
<syntaxhighlight lang="Quackery"> [ []▼
100000 times▼
[ 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
|