reserve X for set;
reserve a,b,c,k,m,n for Nat;
reserve i,j for Integer;
reserve r for Real;
reserve p,p1,p2 for Prime;

theorem
  n satisfies_Sierpinski_problem_89 & n <= 201 implies n in {33,85,93,141,201}
  proof
    assume that
A1: n satisfies_Sierpinski_problem_89 and
A2: n <= 201 and
A3: not n in {33,85,93,141,201};
    4 < 6 <= n by A1,Th65;
    then 
A4: 4 < n by XXREAL_0:2;
    set a = n div 4, b = n mod 4;
A5: n = a * 4 + b by INT_1:59;
A6: b = 1
    proof
      b < 3+1 by NAT_D:1;
      then b <= 3 by NAT_1:13;
      then b = 0 or ... or b = 3;
      then per cases;
      suppose b = 0;
        then n = 4*a by A5;
        then 4 <> n & 4 divides n by A4;
        hence thesis by A1,Th63,XPRIMES0:4;
      end;
      suppose b = 1;
        hence thesis;
      end;
      suppose b = 2;
        then n+2 = 4*(a+1) by A5;
        then 4 <> n+2 & 4 divides n+2 by A4;
        hence thesis by A1,Th63,XPRIMES0:4;
      end;
      suppose b = 3;
        then n+1 = 4*(a+1) by A5;
        then 4 <> n+1 & 4 divides n+1 by A4,NAT_1:11;
        hence thesis by A1,Th63,XPRIMES0:4;
      end;
    end;
A7: a <> 0 by A4,A5,A6;
    a*4+1 <= 50*4+1 by A2,A5,A6;
    then a*4 <= 50*4 by XREAL_1:6;
    then 1 <= a <= 50 by XREAL_1:68,A7,NAT_1:14;
    then n = 1*4+1 or ... or n = 50*4+1 by A5,A6;
    then per cases by A3,ENUMSET1:def 3;
    suppose n = 5;
      hence thesis by A1,Th61,XPRIMES1:5;
    end;
    suppose n = 9;
      hence thesis by A1,Th61,XPRIMES1:11;
    end;
    suppose n = 13;
      hence thesis by A1,Th61,XPRIMES1:13;
    end;
    suppose n = 17;
      hence thesis by A1,Th61,XPRIMES1:17;
    end;
    suppose n = 21;
      hence thesis by A1,Th61,XPRIMES1:23;
    end;
    suppose A: n = 25;
      25 = 5*5;
      hence thesis by A1,A,Th64,XPRIMES1:5;
    end;
    suppose n = 29;
      hence thesis by A1,Th61,XPRIMES1:29;
    end;
    suppose n = 37;
      hence thesis by A1,Th61,XPRIMES1:37;
    end;
    suppose n = 41;
      hence thesis by A1,Th61,XPRIMES1:41;
    end;
    suppose n = 45;
      hence thesis by A1,Th61,XPRIMES1:47;
    end;
    suppose A: n = 49;
      49 = 7*7;
      hence thesis by A1,A,Th64,XPRIMES1:7;
    end;
    suppose n = 53;
      hence thesis by A1,Th61,XPRIMES1:53;
    end;
    suppose n = 57;
      hence thesis by A1,Th61,XPRIMES1:59;
    end;
    suppose n = 61;
      hence thesis by A1,Th61,XPRIMES1:61;
    end;
    suppose n = 65;
      hence thesis by A1,Th61,XPRIMES1:67;
    end;
    suppose n = 69;
      hence thesis by A1,Th61,XPRIMES1:71;
    end;
    suppose n = 73;
      hence thesis by A1,Th61,XPRIMES1:73;
    end;
    suppose n = 77;
      hence thesis by A1,Th61,XPRIMES1:79;
    end;
    suppose n = 81;
      hence thesis by A1,Th61,XPRIMES1:83;
    end;
    suppose n = 89;
      hence thesis by A1,Th61,XPRIMES1:89;
    end;
    suppose n = 97;
      hence thesis by A1,Th61,XPRIMES1:97;
    end;
    suppose n = 101;
      hence thesis by A1,Th61,XPRIMES1:101;
    end;
    suppose n = 105;
      hence thesis by A1,Th61,XPRIMES1:107;
    end;
    suppose n = 109;
      hence thesis by A1,Th61,XPRIMES1:109;
    end;
    suppose n = 113;
      hence thesis by A1,Th61,XPRIMES1:113;
    end;
    suppose A: n = 117;
      9 divides 9*13;
      hence thesis by A1,A,Th63,XPRIMES0:9;
    end;
    suppose A: n = 121;
      121 = 11*11;
      hence thesis by A1,A,Th64,XPRIMES1:11;
    end;
    suppose n = 125;
      hence thesis by A1,Th61,XPRIMES1:127;
    end;
    suppose n = 129;
      hence thesis by A1,Th61,XPRIMES1:131;
    end;
    suppose A: n = 133;
      9 divides 9*15;
      hence thesis by A1,A,Th63,XPRIMES0:9;
    end;
    suppose n = 137;
      hence thesis by A1,Th61,XPRIMES1:137;
    end;
    suppose A: n = 145;
      21 divides 21*7;
      hence thesis by A1,A,Th63,XPRIMES0:21;
    end;
    suppose n = 149;
      hence thesis by A1,Th61,XPRIMES1:149;
    end;
    suppose A: n = 153;
      14 divides 14*11;
      hence thesis by A1,A,Th63,XPRIMES0:14;
    end;
    suppose n = 157;
      hence thesis by A1,Th61,XPRIMES1:157;
    end;
    suppose n = 161;
      hence thesis by A1,Th61,XPRIMES1:163;
    end;
    suppose n = 165;
      hence thesis by A1,Th61,XPRIMES1:167;
    end;
    suppose A: n = 169;
      169 = 13*13;
      hence thesis by A1,A,Th64,XPRIMES1:13;
    end;
    suppose n = 173;
      hence thesis by A1,Th61,XPRIMES1:173;
    end;
    suppose n = 177;
      hence thesis by A1,Th61,XPRIMES1:179;
    end;
    suppose n = 181;
      hence thesis by A1,Th61,XPRIMES1:181;
    end;
    suppose A: n = 185;
      6 divides 6*31;
      hence thesis by A1,A,Th63,XPRIMES0:6;
    end;
    suppose n = 189;
      hence thesis by A1,Th61,XPRIMES1:191;
    end;
    suppose n = 193;
      hence thesis by A1,Th61,XPRIMES1:193;
    end;
    suppose n = 197;
      hence thesis by A1,Th61,XPRIMES1:197;
    end;
  end;
