12 lines
273 B
Text
12 lines
273 B
Text
mobius: function [n][
|
|
if n=0 -> return ""
|
|
if n=1 -> return 1
|
|
f: factors.prime n
|
|
|
|
if f <> unique f -> return 0
|
|
if? odd? size f -> return neg 1
|
|
else -> return 1
|
|
]
|
|
|
|
loop split.every:20 map 0..199 => mobius 'a ->
|
|
print map a => [pad to :string & 3]
|