function theorem7

% theorem7 exact values for enumbers
% theorem7 uses theorem 7 from "Theoretical 
% and computational aspects of Rasmey Theory"
% to calculate exact values of e(3,i+1,n).

global ETABLE
global RTABLE

ymax=size(ETABLE,2);
nmax=size(ETABLE,3);

for i=2:ymax-1
   for n=1:nmax
      if n<RTABLE(3,i+1).ub-1 
         if n<=i & not(ETABLE(3,i+1,n).exact)
            ETABLE(3,i+1,n).elb=0;
            ETABLE(3,i+1,n).eub=0;
            ETABLE(3,i+1,n).exact=1;
            ETABLE(3,i+1,n).info=[ETABLE(3,i+1,n).info,'0:theorem7(a) '];
        end
         if (i<=n)& (n<=2*i) & not(ETABLE(3,i+1,n).exact) & ETABLE(3,i+1,n).elb<=n-i
            ETABLE(3,i+1,n).elb=n-i;
            ETABLE(3,i+1,n).eub=n-i;
            ETABLE(3,i+1,n).exact=1;
            ETABLE(3,i+1,n).info=[ETABLE(3,i+1,n).info,num2str(n-i),':theorem7(b) '];
        end
         if (2*i<=n) & (n<=2.5*i) & not(ETABLE(3,i+1,n).exact) & ETABLE(3,i+1,n).elb<=3*n-5*i
            ETABLE(3,i+1,n).elb=3*n-5*i;
            ETABLE(3,i+1,n).eub=3*n-5*i;
            ETABLE(3,i+1,n).exact=1;
            ETABLE(3,i+1,n).info=[ETABLE(3,i+1,n).info,num2str(3*n-5*i),':theorem7(c) '];
        end
         if (2.5*i<=n) & (n<=3*i) & not(ETABLE(3,i+1,n).exact) & ETABLE(3,i+1,n).elb<=5*n-10*i
            ETABLE(3,i+1,n).elb=5*n-10*i;
            ETABLE(3,i+1,n).eub=5*n-10*i;
            ETABLE(3,i+1,n).exact=1;
            ETABLE(3,i+1,n).info=[ETABLE(3,i+1,n).info,num2str(5*n-10*i),':theorem7(d) '];
        end
         if 3*i<n & ETABLE(3,i+1,n).elb < (5*n-10*i) 
            ETABLE(3,i+1,n).elb=5*n-10*i;
            ETABLE(3,i+1,n).info=[ETABLE(3,i+1,n).info,num2str(5*n-10*i),':theorem7(e) '];
        end
      end
   end
end

      
