Дикая комбинаторика
rem |ax+b)|-|cx+d|=fx+k
n=15
for a=1 to n
for b=a+1 to n+1
for c=b+1 to n+2
for d=c+1 to n+3
for f=d+1 to n+4
for k=f+1 to n+5
x1=(-b-d-k)/(a+c+f)
x2=(-b+d-k)/(a-c+f)
x3=(-b-d+k)/(a+c-f)
x4=(-b+d+k)/(a-c-f)
if x1=int(x1) then
if x2=int(x2) then
if x3=int(x3) then
if x4=int(x4) then
if x3<100 then
N=N+1
print N using "###",x1 using "###";
print x2 using "###",x3 using "###";
print x4 using "###",a using "###";
print b using "###",c using "###";
print d using "###",f using "###";
print k using "###"
fi:fi:fi:fi:fi
next k
next f
next d
next c
next b
next a
Результаты в виде таблицы - в иллюстрации.
13 марта 2024 г.
Свидетельство о публикации №224031302036