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,29 @@
ChowlaFunction := n -> NumberTheory:-SumOfDivisors(n) - n - 1;
PrintChowla := proc(n::posint) local i;
printf("Integer : Chowla Number\n");
for i to n do
printf("%d : %d\n", i, ChowlaFunction(i));
end do;
end proc:
countPrimes := n -> nops([ListTools[SearchAll](0, map(ChowlaFunction, [seq(1 .. n)]))]);
findPerfect := proc(n::posint) local to_check, found, k;
to_check := map(ChowlaFunction, [seq(1 .. n)]);
found := [];
for k to n do
if to_check(k) = k - 1 then
found := [found, k];
end if;
end do;
end proc:
PrintChowla(37);
countPrimes(100);
countPrimes(1000);
countPrimes(10000);
countPrimes(100000);
countPrimes(1000000);
countPrimes(10000000);
findPerfect(35000000)