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,16 @@
isSmith := proc(n::posint)
local factors, sumofDigits, sumofFactorDigits, x;
if isprime(n) then
return false;
else
sumofDigits := add(x, x = convert(n, base, 10));
sumofFactorDigits := add(map(x -> op(convert(x, base, 10)), [op(NumberTheory:-PrimeFactors(n))]));
return evalb(sumofDigits = sumofFactorDigits);
end if;
end proc:
findSmith := proc(n::posint)
return select(isSmith, [seq(1 .. n - 1)]);
end proc:
findSmith(10000);