Ну вот, наконец-то объединил программы.
вариантов.
Код:
kvar=0;kvold=0;
kv=[0,0,0,0,0];
pro =[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1, 1,1,1, 1,1,1,1,1];
v2 =[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,1,4,1,2,1,32,1,2, 1,4,1,2,1];
vst3 =[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,1,1,3,1, 1,9,1, 1,3,1,1,3, 1,1, 9,1,1,3, 1,1,3,1,1,0];
vst5 =[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,1,1,1,1,5,1, 1,1,1, 5,1,1,1,1,25,1, 1,1,1,5, 1,1,1,1,5,1,1,1,1,5,1, 1,1];
vst7 =[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,7,1,1,1, 1,1,1, 7,1,1,1,1, 1,1,49,1,1,1, 1,1,1,7,1,1,1,1,1,1,7, 1,1,1,1];
vstp7 =[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,7,1,1,1, 1,1,1, 16807,1,1,1,1, 1,1, 7,1,1,1, 1,1,1,7,1,1,1,1,1,1,7, 1,1,1,1];
vst11 =[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1, 1,1,1, 11,1,1,1,1, 1,1, 1,1,1,1,121,1,1,1,1,1,1,1,1,1,1,11,1,1,1,1,1,1,1];
vstp11=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1, 1,1,1,161051,1,1,1,1, 1,1, 1,1,1,1, 11,1,1,1,1,1,1,1,1,1,1,11,1,1,1,1,1,1,1];
v3=vector(51);
v5=vector(58);
v7=vector(60);
v11=vector(64);
{for(l=25,29,
for(i=1,51,v3[i]=vst3[i]);
for(i3=1,9,
for(i=1,58,v5[i]=vst5[i]);
for(i5=1,16,
for(i=1,60,v7[i]=vst7[i]);
for(i7=1,29,
if(i7==19,for(i=1,60,v7[i]=vstp7[i]));
for(i=1,64,v11[i]=vst11[i]);
for(i11=1,33,
if(i11==23,for(i=1,64,v11[i]=vstp11[i]));
zap=0;k4=0;r=l+10;
for(i=l,r,pro[i]=v2[i]*v3[i]*v5[i]*v7[i]*v11[i];
if(numdiv(pro[i]) >6 || numdiv(pro[i]) == 4,zap=zap+1));
if(zap == 0,
kvar=kvar+1;print();print1(kvar);
print1( " ");for(i=l,r,print1(i, " ",));print();print();
print1(" ");for(i=l,31,print1(" ",v2[i]));
print1(" ");for(i=32,r,print1(v2[i]," ",));print();print();
print1(" ");for(i=l,r,print1(" ",v3[i]));print();print();
print1(" ");for(i=l,r,print1(" ",v5[i]));print();print();
print1(" ");for(i=l,r,print1(" ",v7[i]));print();print();
print1(" ");for(i=l,r,print1(" ",v11[i]));print();print();
print1(" ");for(i=l,r,print1(" ",pro[i]));print();print();
shag=lcm(pro[l..l+10]);
print(" ",shag," ",zap);
);
for(i=l,l+34,v11[i]=v11[i+1]));
for(i=l,l+30,v7[i]=v7[i+1]));
for(i=l,l+28,v5[i]=v5[i+1]));
for(i=l,l+21,v3[i]=v3[i+1]));
print();print();
kv[l-24]=kvar-kvold;kvold=kvar;
forstep(i=51,l,-1,vst3[i]=vst3[i-1]);
forstep(i=58,l,-1,vst5[i]=vst5[i-1]);
forstep(i=60,l,-1,vst7[i]=vst7[i-1];vstp7[i]=vstp7[i-1]);
forstep(i=64,l,-1,vst11[i]=vst11[i-1];vstp11[i]=vstp11[i-1]);
);
print();print();
print(kv[1]," ", kv[2]," ", kv[3]," ", kv[4]," ",kv[5]);
print();}
quit;