Count in factors: Difference between revisions

Content added Content deleted
(Explicitly including the factor function)
(Allow 1 in result)
Line 132: Line 132:
(link D)
(link D)
(setq M (sqrt (setq N (/ N D)))) ) )
(setq M (sqrt (setq N (/ N D)))) ) )
(or (= 1 N) (link N)) ) ) )
(link N) ) ) )


(for N 20
(for N 20
(prinl N ": " (or (glue " * " (factor N)) 1)) )</lang>
(prinl N ": " (glue " * " (factor N))) )</lang>
Output:
Output:
<pre>1: 1
<pre>1: 1