reserve n for Nat,
        i,j,i1,i2,i3,i4,i5,i6 for Element of n,
        p,q,r for n-element XFinSequence of NAT;
reserve i,j,n,n1,n2,m,k,l,u,e,p,t for Nat,
        a,b for non trivial Nat,
        x,y for Integer,
        r,q for Real;

theorem Th6:
  2 <= e & 0 <t implies
    ex n,i st t divides n+1 & e^2 *(e *(e+2))*(n+1)^2 +1 = i^2
proof
  set a=e+1, A=a^2-'1;
A1:a^2=a*a by SQUARE_1:def 1;
  assume
A2: 2 <= e & 0 < t;
  a*a>=0+1 by INT_1:7;
  then
A3: A = a*a-1 by A1,XREAL_1:233
     .= (a-1) *(a+1);
  reconsider e2=e-2 as Nat by A2,NAT_1:21;
A4: (a-1)^2 =(a-1)*(a-1) & t^2=t*t by SQUARE_1:def 1;
  then reconsider D=(a^2-'1) * (a-1)^2 *t^2 as non square Nat by A2;
  consider x,y be Nat such that
A5: x^2 -D *y^2 =1 & y <>0 by PELLS_EQ:14;
A6: D*y^2 +1 = x^2 by A5;
  reconsider n=t*y-1 as Nat by A2,A5;
  take n,x;
  y^2=y*y & e^2=e*e & (n+1)^2 = (n+1)*(n+1) by SQUARE_1:def 1;
  hence thesis by A6,A3,INT_1:def 3,A4;
end;
