Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,23 @@
func Mobius(N);
int N, Cnt, F, K;
[Cnt:= 0;
F:= 2; K:= 0;
repeat if rem(N/F) = 0 then
[Cnt:= Cnt+1;
N:= N/F;
K:= K+1;
if K >= 2 then return 0;
]
else [F:= F+1; K:= 0];
until F > N;
return if Cnt&1 then -1 else 1;
];
int N;
[Format(3, 0);
Text(0, " ");
for N:= 1 to 199 do
[RlOut(0, float(Mobius(N)));
if rem(N/20) = 19 then CrLf(0);
];
]