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,27 @@
ispernicious := proc(n::posint)
return evalb(isprime(rhs(Statistics:-Tally(StringTools:-Explode(convert(convert(n, binary), string)))[-1])));
end proc;
print_pernicious := proc(n::posint)
local k, count, list_num;
count := 0;
list_num := [];
for k while count < n do
if ispernicious(k) then
count := count + 1;
list_num := [op(list_num), k];
end if;
end do;
return list_num;
end proc:
range_pernicious := proc(n::posint, m::posint)
local k, list_num;
list_num := [];
for k from n to m do
if ispernicious(k) then
list_num := [op(list_num), k];
end if;
end do;
return list_num;
end proc: