Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,18 @@
|
|||
aliquot(x) =
|
||||
{
|
||||
my (L = List(x), M = Map(Mat([x,1])), k, m = "non-term.", n = x);
|
||||
|
||||
for (i = 2, 16, n = vecsum(divisors(n)) - n;
|
||||
if (n > 2^47, break,
|
||||
n == 0, m = "terminates"; break,
|
||||
mapisdefined(M, n, &k),
|
||||
m = if (k == 1,
|
||||
if (i == 2, "perfect",
|
||||
i == 3, "amicable",
|
||||
i > 3, concat("sociable-",i-1)),
|
||||
k < i-1, concat("cyclic-",i-k),
|
||||
"aspiring"); break,
|
||||
mapput(M, n, i); listput(L, n));
|
||||
);
|
||||
printf("%16d: %10s, %s\n", x, m, Vec(L));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue