Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,16 @@
import rationals, strutils, sugar
type Fract = Rational[int]
proc corput(n: int; base: Positive): Fract =
result = 0.toRational
var b = 1 // base
var n = n
while n != 0:
result += n mod base * b
n = n div base
b /= base
for base in 2..5:
let list = collect(newSeq, for n in 1..10: corput(n, base))
echo "Base $#: ".format(base), list.join(" ")