Data update

This commit is contained in:
Ingy döt Net 2024-07-13 15:19:22 -07:00
parent 29a5eea0d4
commit 5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions

View file

@ -0,0 +1,31 @@
PROGRAM "Möbius function"
VERSION "0.0000"
IMPORT "xma"
DECLARE FUNCTION Entry ()
DECLARE FUNCTION mobius (n)
FUNCTION Entry ()
outstr$ = " . "
FOR i = 1 TO 200
IF mobius(i) >= 0 THEN outstr$ = outstr$
outstr$ = outstr$ + STR$(mobius(i)) + " "
IF i MOD 10 = 9 THEN
PRINT outstr$
outstr$ = ""
END IF
NEXT i
END FUNCTION
FUNCTION mobius (n)
IF n = 1 THEN RETURN 1
FOR d = 2 TO INT(SQRT(n))
IF n MOD d = 0 THEN
IF n MOD (d*d) = 0 THEN RETURN 0
RETURN -mobius(n/d)
END IF
NEXT d
RETURN -1
END FUNCTION
END PROGRAM