Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,25 +0,0 @@
|
|||
let isqrt = (v) => {
|
||||
Belt.Float.toInt(
|
||||
sqrt(Belt.Int.toFloat(v)))
|
||||
}
|
||||
|
||||
let sum_divs = (n) => {
|
||||
let sum = ref(1)
|
||||
for d in 2 to isqrt(n) {
|
||||
if mod(n, d) == 0 {
|
||||
sum.contents = sum.contents + (n / d + d)
|
||||
}
|
||||
}
|
||||
sum.contents
|
||||
}
|
||||
|
||||
{
|
||||
for n in 2 to 20000 {
|
||||
let m = sum_divs(n)
|
||||
if (m > n) {
|
||||
if sum_divs(m) == n {
|
||||
Printf.printf("%d %d\n", n, m)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue