Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
12
Task/Mertens-function/Sidef/mertens-function-3.sidef
Normal file
12
Task/Mertens-function/Sidef/mertens-function-3.sidef
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
with (200) {|n|
|
||||
say "Mertens function in the range 1..#{n}:"
|
||||
(1..n).map { mertens(_) }.slices(20).each {|line|
|
||||
say line.map{ "%2s" % _ }.join(' ')
|
||||
}
|
||||
}
|
||||
|
||||
with (1000) {|n|
|
||||
say "\nIn the range 1..#{n}, there are:"
|
||||
say (1..n->count_by { mertens(_)==0 }, " zeros")
|
||||
say (1..n->count_by { mertens(_)==0 && mertens(_-1)!=0 }, " zero crossings")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue