Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
27
Task/M-bius-function/Quackery/m-bius-function.quackery
Normal file
27
Task/M-bius-function/Quackery/m-bius-function.quackery
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
[ false swap
|
||||
behead swap
|
||||
[ witheach
|
||||
[ tuck != if
|
||||
done
|
||||
dip not
|
||||
conclude ] ]
|
||||
drop ] is square ( [ --> b )
|
||||
|
||||
[ 1 & ] is odd ( n --> b )
|
||||
|
||||
[ dup 1 = if done
|
||||
primefactors
|
||||
dup square iff
|
||||
[ drop 0 ] done
|
||||
size odd iff
|
||||
-1 else 1 ] is mobius ( n --> n )
|
||||
|
||||
say "First 199 terms:" cr
|
||||
say " "
|
||||
199 times
|
||||
[ i^ 1+ mobius
|
||||
dup -1 > if sp
|
||||
echo
|
||||
i^ 1+ 20 mod
|
||||
19 = iff cr
|
||||
else [ sp sp ] ]
|
||||
Loading…
Add table
Add a link
Reference in a new issue