Data update
This commit is contained in:
parent
35bcdeebf8
commit
74c69a0df6
2427 changed files with 31826 additions and 3468 deletions
19
Task/Mertens-function/SETL/mertens-function.setl
Normal file
19
Task/Mertens-function/SETL/mertens-function.setl
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
program mertens;
|
||||
m := [1] * 1000;
|
||||
loop for n in [1..#m] do
|
||||
m(n) -:= 0 +/[m(n div k) : k in [2..n]];
|
||||
end loop;
|
||||
|
||||
print("The first 99 Mertens numbers:");
|
||||
putchar(" ");
|
||||
loop for n in [1..99] do
|
||||
putchar(lpad(str m(n), 3));
|
||||
if n mod 10=9 then print; end if;
|
||||
end loop;
|
||||
|
||||
zero := #[n : n in [1..#m] | m(n) = 0];
|
||||
cross := #[n : n in [1..#m] | m(n) = 0 and m(n-1) /= 0];
|
||||
|
||||
print("M(N) is zero " + str zero + " times.");
|
||||
print("M(N) crosses zero " + str cross + " times.");
|
||||
end program;
|
||||
Loading…
Add table
Add a link
Reference in a new issue