read `Hardin.txt`: read `FindRec.txt`: read `SMAZ.txt`: K:=40: L:=SeqB(2,K): print(`The first`, K, `terms starting at n=1 of the sequence enumerating 6 by 2*n balanced 0-1 matrices, i.e. where every row and every column has the same number 0s and 1s are`): print(`In other words OEIS sequence A2896 :`): print(``): lprint(L): print(``): ope:=Findrec(L,n,N,10): print(` The sequence, let's call it a(n), enumerating 4 by 2*n balanced 0-1 natrices probably satisfies the empirically derived linear recurrence`): print(``): print(add(coeff(ope,N,i)*a(n+i),i=0..degree(ope,N))=0): print(``): print(`and in Maple notation`): print(``): lprint(add(coeff(ope,N,i)*a(n+i),i=0..degree(ope,N))=0): print(``): print(`This took`, time(), `seconds `): print(``): t0:=time(): print(``): print(`Just for fun here is a(1000)`): print(``): lprint(SeqFromRec(ope,n,N,[op(1..degree(ope,N),L)],1000)[1000]): print(``): print(`This took`, time()-t0, ` additional seconds`): print(``): print(`--------------------`): print(``): t0:=time(): print(`Now let's do it fully rigorously, using the multivariable Almkvist-Zeilberger algorithm`): H:=x[1]*x[2]+x[1]*x[3]+x[1]*x[4]+ x[2]*x[3]+x[2]*x[4]+x[3]*x[4]: H:=H^2/mul(x[i],i=1..4): ope1:=MAZ(1,1/mul(x[i],i=1..4),H,[seq(x[i],i=1..4)],n,N,{},[y[1],y[2],y[3]],z1)[1]: lprint(`The empirically derived operator annihilating the sequence is`, ope): print(``): lprint(`The rigorously derived operator annihilating the sequence is`, ope1): print(``): if ope=ope1 then print(`They are indeed the same!`): else print(`Too bad, they are not the same`): fi: print(`This took`, time()-t0, `seconds. `): print(``):