Möbius function: Difference between revisions

Content deleted Content added
Alice (talk | contribs)
Added a Nim implementation to the task
Alice (talk | contribs)
Adds crediting
Line 1,148: Line 1,148:


=={{header|Nim}}==
=={{header|Nim}}==
Uses the prime decomposition method from https://rosettacode.org/wiki/Prime_decomposition#Nim

<lang Nim>import std/[math, sequtils, strformat]
<lang Nim>import std/[math, sequtils, strformat]


Line 1,214: Line 1,216:
1 0 -1 0 -1 1 -1 0 0 -1 0 0 -1 -1 0 0 1 1 -1 0
1 0 -1 0 -1 1 -1 0 0 -1 0 0 -1 -1 0 0 1 1 -1 0
-1 -1 1 0 1 -1 1 0 0 -1 -1 0 -1 1 -1 0 -1 0 -1 0</pre>
-1 -1 1 0 1 -1 1 0 0 -1 -1 0 -1 1 -1 0 -1 0 -1 0</pre>



=={{header|Pascal}}==
=={{header|Pascal}}==