> restart;# A satellite worksheet for arXiv:2309.13783 > # Decrease the parameters in the #***-marked lines when > # experiencing with the program or running only a part of the > # program; otherwise it may run for more than a day. > alltime0:=time(): > # PART A: LOWER BOUNDS > # Part A/1: how to choose p in the theorem > fpr0r:=proc(p,r,n) local h,s,i,j; h:=p+floor((n-r)/2): s:=0: > for i from 0 to floor(n/r)-1 do > for j from 0 to i do s:=s+binomial(i,j)*binomial(n-(i+1)*r, h-j*r) > od; > od; s:=s;#Since each procedure returns with the last ":=" > end: #end of procedure fpr0r > findp:=proc(r,n) local p,pmax,s,smax,i; pmax:=-r; smax:=-1; > for p from -r to r do s:=fpr0r(p,r,n); > if s>smax then smax:=s; pmax:=p > fi; > od; > if pmax<> 0 then print(`When r=`,r,` n=`,n,` then pmax=`,pmax); > fi; pmax:=pmax; > end: #end of procedure findp > # Checking what we guess: p=0 is the best choice > time0:=time(): > for r from 3 to 200 do #*** > for n from r to 300 do #n from r to 100 > pfound:=findp(r,n); if pfound<>0 then print(pfound); > fi; > od; > od; time1:=time(): > print(`Checking that p=0 is the best took `, time1-time0,` seconds.`); > # As p=0 proved to be the best, now we can let > fr0r:=proc(r,n); fpr0r(0,r,n) > end: #end of procedure fr0r > > # PART B: UPPER BOUNDS > # Part B/1: an easy (but not the best) upper bound > gr:=proc(r,n) local s; s:=floor(binomial(n+2-r,floor((n+2-r)/2))/2); > end:#end of procedure gr > # Part B/2/a: where does f33 takes its minimum? > f33:=proc(n,t,x,y);(t+x)!*(n-t-x)! + (t+y)!*(n-t-y)! > + 2*(t+x+y)!*(n-t-x-y)! -2*(t+x)!*y!*(n-t-x-y)! > -2*(t+y)!*x!*(n-t-x-y)! > end: #end of procedure f33 > time0:=time(): > for n from 3 to 300 do #*** s0:=f33(n,0,1,1);t0:=floor((n-2)/2);x0:=1;y0:=1; for t from 0 to n-3 do for x from 1 to n-t-2 do for y from x to n-t-x-1 do # x<=y by symmetry! s:=f33(n,t,x,y); if s1 or y0<>1 or t0<>floor((n-2)/2) then print(`FAILURE, FAILURE, FAILURE, FAILURE for n=`,n); fi; od: time1:=time(): > print(`Checking where f33 takes its minimum took `, time1-time0,` seconds.`); > # Part B/2/b: computing g3asterix > # We compute g3asterix(n) only for those n for which we know that it is > # the same as g3doubleasterix(n). I.e., only for n<=300. > g3asterix:=proc(n) local s0,s,t0,t,x,x0,y,y0,Mn,result; > s0:=f33(n,0,1,1);t0:=floor((n-2)/2);x0:=1;y0:=1; > for t from 0 to n-3 do > for x from 1 to n-t-2 do > for y from x to n-t-x-1 do # x<=y by symmetry! > s:=f33(n,t,x,y); if s fi > od #for t > od #for y > od; if t0+1 fi > fi; > if x0<>1 or y0<>1 or t0<>floor((n-2)/2) then > print(`FAILURE, FAILURE, FAILURE, FAILURE for n=`,n); > else #the conjecture holds for n > Mn:=3*floor(n/2)!*ceil(n/2)! + 3*floor((n+2)/2)!*ceil((n-2)/2)! > -6*floor(n/2)!*ceil((n-2)/2)!; result:=floor(n!/Mn); > fi; > end: #End of procedure g3asterix > # Part B/2/c: computing g3doubleasterix(n), > # that is, computing g3asterix(n) for n<= 300 FAST. > g3doubleasterix:=proc(n); > if n>300 then print(`n is too large at present`) > else > floor(n! / (3*floor(n/2)!*ceil(n/2)! > + 3*floor((n+2)/2)!*ceil((n-2)/2)! -6*floor(n/2)!*ceil((n-2)/2)!)) > fi; > end: #end of procedure g3doubleasterix > # PART C: CHECKING SEPARATION > # Part C/1: checking that (f303,g3) is separating > time0:=time(): Print(`Checking that (f303,g3) is separating`); > for n from 3 to 300 do #*** > big:=fr0r(3,n+1):small:=gr(3,n); :quoti:=-1; > if small>0 then quoti:=evalf(big /small); > fi: print(`Hopefully nonnegative=`, big-small, > ` quotient=`,quoti, ` n=`,n ); od: time1:=time(): scn:=time1-time0; > print(`Checking (f303,g3) is separating took `, scn,` seconds.`); > # Part C/2: checking that (fr0r,gr) is separating > # for some values of r and n > time0:=time(): > for r from 3 to 100 do #*** > #print(` `); > #print(`Checking that (fr0r,gr) is separating for r=`,r);#optional > for n from r to 300 do big:=fr0r(r,n+1):small:=gr(r,n);#*** > quoti:=-1; if small>0 then quoti:=evalf(big /small); > fi: > # print(`Hopefully nonnegative=`, big-small, > # ` quotient=`, quoti, ` r=`,r,` n=`,n ); > if big for j from 1 to 100 do > print(`!!! Non-separating for r=`,r,` n=`,n) > od; #One can search for "!!! Non-separating" in the output. > fi; > od; #for n > od: time1:=time(): scn:=time1-time0: > print(`Checking (fr0r,gr) is separating took `,scn,` seconds.`); > > # Part D: computing some small values > time0:=time(): > for r from 3 to 1 do #to 22 > print(` `); print(`r=`,r); > for n from r to 30 do frn:=fr0r(r,n); grn:=gr(r,n); if r=3 then ggood:=g3doubleasterix(n); print(`r=`,r, ` n=`,n,` f303=`,frn,` ggood=`,ggood, ` g3=`,grn); else print(`r=`,r,` n=`,n,` fr0r=`,frn,` grn`,grn); fi od; #for n od: time1:=time(): scn:=time1-time0: > print(`Computing some small values took `,scn,` seconds.`); > > # Part E: computing some large values > time0:=time(): print(` `); print(`r=`,3); > for n from 298 to 300 do print(` `); #*** > frn:=fr0r(3,n): ggood:=g3doubleasterix(n): grn:=gr(3,n): > quoti:=-1; if frn>0 then :quoti:=QUOT*evalf(ggood/frn): > fi: > print(`r=`,3,` n=`,n, ` log[10](frn)=`,evalf(log[10](frn)), > ` log[10](ggood)=`,evalf(log[10](ggood)), > ` log[10](grn)=`,evalf(log[10](grn)),quoti): > od; time1:=time(): scn:=time1-time0: > print(`Computing some large values took `,scn,` seconds.`): > > # Part F: computing some larger values > time0:=time():r:=20: print(` `): print(`r=`,r): > for n from 5999 to 6000 do print(` `);#*** > frn:=fr0r(r,n); grn:=gr(r,n); > print(`r=`,r,` n=`,n,` frn=`,frn,` grn=`, grn,` log[10](frn)=`, > evalf(log[10](frn)), ` log[10](grn)=`,evalf(log[10](grn))): > od: > time1:=time(): scn:=time1-time0: > print(`Computing some larger values took `,scn,` seconds.`): > alltime1:=time(): ascn:=alltime1-alltime0: > print(`The whole program ran `,ascn,` seconds, i.e. `, > evalf(ascn/3600),` hours.`):