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,13 @@
go ?=>
member(N,1..11),
Farey = farey(N),
println(N=Farey),
fail,
nl.
go => true.
farey(N) = M =>
M1 = [0=$(0/1)] ++
[I2/J2=$(I2/J2) : I in 1..N, J in I..N,
GCD=gcd(I,J),I2 =I//GCD,J2=J//GCD].sort_remove_dups(),
M = [ E: _=E in M1]. % extract the rational representation

View file

@ -0,0 +1,6 @@
go2 =>
foreach(N in 100..100..1000)
F = farey(N),
println(N=F.length)
end,
nl.