Реферат: Антипростые числа
rewrite(output);
m:=3;
a[1]:=2;
a[2]:=3;
for i:=4 to 2000000 do begin
t:=1;
k:=sqrt(i);
b:=trunc(k);
for j:=2 to b do
if(i mod j)=0 then
t:=t+1;
if t=1 then begin
a[m]:=i;
m:=m+1;
end;
end;
n:=1;
for i:=1 to 2000000 do begin
t:=1;
for j:=1 to m-1 do
if(i mod a[j])=0 then begin
b:=i div a[j];
if (b mod a[j])=0 then
t:=t+1
else
begin
t:=1;
break;
end;