Data update

This commit is contained in:
Ingy döt Net 2025-08-11 18:05:26 -07:00
parent 4d5544505c
commit 4924dd0264
3073 changed files with 55820 additions and 4408 deletions

View file

@ -0,0 +1,12 @@
local int = require "int"
require "rat"
local one <const> = rat.of(1)
print("The following numbers (less than 2^19) are perfect:")
for i = 2, (1 << 19) - 1 do
local sum = rat.of(1, i)
local divs = int.divisors(i, true)
divs:remove(1)
for divs as j do sum += rat.of(1, j) end
if sum == one then print($" {i}") end
end