多項式(x^5+x^4+x^3+x^2+ x+1)*x^26+x^6+x^5+x^4+x^3+x^2+x+1
Ver.1.000 2012.10.14

更新履歴
2012.10.14 Ver.1.000 新規作成

多項式を変える。

(%i1) factor((x^5+x^4+x^3+x^2+x+1)*x^26+x^6+x^5+x^4+x^3+x^2+x+1);
       31    30    29    28    27    26    6    5    4    3    2
(%o1) x   + x   + x   + x   + x   + x   + x  + x  + x  + x  + x  + x + 1

より、

e16.batを作った。以下に示す。
for x:2 while x<20 do(
y:factor((x^5+x^4+x^3+x^2+x+1)*x^26+x^6+x^5+x^4+x^3+x^2+x+1),
print("        x=",x),
print("factor(x)=",y)
);

e16.batをmaximaで実行した。

(%i2) batch("e16.bat");

read and interpret file: e16.bat
(%i3) for x from 2 while x < 20 do (y :
                2    3    4    5    6             2    3    4    5   26
factor(1 + x + x  + x  + x  + x  + x  + (1 + x + x  + x  + x  + x ) x  ),
print(        x=, x), print(factor(x)=, y))
        x= 2
factor(x)= 389 10868531
        x= 3
素数ですね。
factor(x)= 925239161512849
        x= 4
factor(x)= 142357 2258819 19117547
        x= 5
factor(x)= 11 1155778703 457809688057
        x= 6
素数ですね。
factor(x)= 1591698105643644261292723
        x= 7
factor(x)= 110573 3014839 552165313470467
        x= 8
factor(x)= 67 71 601332050051 3956693266807
        x= 9
factor(x)= 46266193 9276961039377670586557
        x= 10
factor(x)= 17882603 621335719414002536431637
        x= 11
factor(x)= 3809503 48312182993 1147204121010527
        x= 12
factor(x)= 71 111863 335656726187 1165646536338839
        x= 13
factor(x)= 29 1809957211 11722840379 59966234734249
        x= 14
factor(x)= 13 37 109 269 37357 2230549 310488927265984307
        x= 15
factor(x)= 37 79 908941797338437 1159918101110076391
        x= 16
factor(x)= 11 37 313 2081954111807 85533897182663355889
        x= 17
factor(x)= 613 1051 229711264718348837734091692304683
        x= 18
factor(x)= 62129 16792746857 831486350739196882471783
        x= 19
factor(x)= 10061 459411187823355611627755333079107541
(%o3)                                done
(%o3)                               e16.bat
(%i4)

これより、b.txtは、以下のようになった。

389,2
11,5
67,8
71,8
71,12
29,13
13,14
37,14
109,14
269,14
37,15
79,15
11,16
37,16
313,16
613,17

Autohajiku.cを編集して

#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>

#define max 1 /* この数から+100まで生成する */

FILE *fp;
FILE *rp;

struct b_{
int n;
int p;
};

struct b_ b_txt[1000];

int n=1;
int Flag=0;
int max_i,i;

int main (void)
{

    /* 保存はカレントディレクトリーのhajiku-6.cというファイル名で上書きする */
    if((fp=fopen("hajiku-6.c","w"))== NULL){
        printf("cannot open hajiku-6.c\n");
        exit(1);
    }
    /* はじくしきを読み込む */
    if((rp=fopen("b.txt","r"))== NULL){
        printf("cannot open b.txt\n");
        exit(1);
    }
   i=0;
     while(EOF!=fscanf(rp,"%d,%d\n",&b_txt[i].n,&b_txt[i].p)){
     printf("%dn+%d\n",b_txt[i].n,b_txt[i].p);
     i++;
     }
   fclose(rp);
   printf("b.txt read!  %d 個 \n",i);
   max_i=i; 
const char c='%';
const char slash=0x5c;
const char dash=0x22;
 fprintf(fp,"#include <stddef.h>\n");
 fprintf(fp,"#include <stdlib.h>\n");
 fprintf(fp,"#include <stdio.h>\n");
 fprintf(fp,"\n");
 fprintf(fp,"FILE *fp; \n");
 fprintf(fp,"\n");
 fprintf(fp,"int n=1;\n");
 fprintf(fp,"int Flag=0;\n");
 fprintf(fp,"\n");
 fprintf(fp,"int main (void)\n");
 fprintf(fp,"\n");
 fprintf(fp,"{ \n");
 fprintf(fp,"  /* 保存はカレントディレクトリーのa.batというファイル名で上書きする */\n");
 fprintf(fp,"  if((fp=fopen(%ca.bat%c,%cw%c))== NULL){\n",dash,dash,dash,dash);
 fprintf(fp,"     printf(%ccannot open a.bat%cn%c);\n",dash,slash,dash);
 fprintf(fp,"     exit(1);\n");
 fprintf(fp,"  }\n");
 fprintf(fp,"\n");
 fprintf(fp,"  for(n=%d;n<%d;n++){\n",max,max+100);
 fprintf(fp,"   Flag=0;\n");
 for(i=0;i<max_i;i++){
 fprintf(fp,"   if((n>%d) && (((n-%d) %c %d)==0)){",b_txt[i].p-1,b_txt[i].p,c,b_txt[i].n);
 fprintf(fp,"     /* %dx+%d */ \n",b_txt[i].n,b_txt[i].p);
 fprintf(fp,"     printf(%c%cd=%dx%cd+%cd %cn%c,n,(n-%d)/%d,%d);\n",dash,c,b_txt[i].n,c,c,slash,dash,b_txt[i].p,b_txt[i].n,b_txt[i].p);
 fprintf(fp,"     Flag++;\n");
 fprintf(fp,"   };\n");
  }
 fprintf(fp,"   if(Flag==0){            /* どれでもないとき */ \n");
 fprintf(fp,"     printf(%c!!! %cd !!! %cn%c,n);\n",dash,c,slash,dash);
 fprintf(fp,"     fprintf(fp,%cfactor((%cd^5+%cd^4+%cd^3+%cd^2+%cd+1)*%cd^26+%cd^6+%cd^5+%cd^4+%cd^3+%cd^2+%cd+1);%cn%c,n,n,n,n,n,n,n,n,n,n,n,n);\n",dash,c,c,c,c,c,c,c,c,c,c,c,c,slash,dash);
 fprintf(fp,"   };\n");
 fprintf(fp,"  };\n");
 fprintf(fp," fclose(fp);\n");
 fprintf(fp," return(0);\n");
 fprintf(fp,"}\n");

  fclose(fp);
   return(0);
}

これより、
$gcc -Wall Autohajiku.c -o Autohajiku
$./Autohajiku
389n+2
11n+5
67n+8
71n+8
71n+12
29n+13
13n+14
37n+14
109n+14
269n+14
37n+15
79n+15
11n+16
37n+16
313n+16
613n+17
b.txt read!  16 個 
$gcc -Wall hajiku-6.c -o hajiku-6
$./hajiku-6
!!! 1 !!!
2=389x0+2
!!! 3 !!!
!!! 4 !!!
5=11x0+5
!!! 6 !!!
!!! 7 !!!
8=67x0+8
8=71x0+8
!!! 9 !!!
!!! 10 !!!
!!! 11 !!!
12=71x0+12
13=29x0+13
14=13x0+14
14=37x0+14
14=109x0+14
14=269x0+14
15=37x0+15
15=79x0+15
16=11x1+5
16=11x0+16
16=37x0+16
16=313x0+16
17=613x0+17
!!! 18 !!!
!!! 19 !!!
!!! 20 !!!
!!! 21 !!!
!!! 22 !!!
!!! 23 !!!
!!! 24 !!!
!!! 25 !!!
!!! 26 !!!
27=11x2+5
27=13x1+14
27=11x1+16
!!! 28 !!!
!!! 29 !!!
!!! 30 !!!
!!! 31 !!!
!!! 32 !!!
!!! 33 !!!
!!! 34 !!!
!!! 35 !!!
!!! 36 !!!
!!! 37 !!!
38=11x3+5
38=11x2+16
!!! 39 !!!
40=13x2+14
!!! 41 !!!
42=29x1+13
!!! 43 !!!
!!! 44 !!!
!!! 45 !!!
!!! 46 !!!
!!! 47 !!!
!!! 48 !!!
49=11x4+5
49=11x3+16
!!! 50 !!!
51=37x1+14
52=37x1+15
53=13x3+14
53=37x1+16
!!! 54 !!!
!!! 55 !!!
!!! 56 !!!
!!! 57 !!!
!!! 58 !!!
!!! 59 !!!
60=11x5+5
60=11x4+16
!!! 61 !!!
!!! 62 !!!
!!! 63 !!!
!!! 64 !!!
!!! 65 !!!
66=13x4+14
!!! 67 !!!
!!! 68 !!!
!!! 69 !!!
!!! 70 !!!
71=11x6+5
71=29x2+13
71=11x5+16
!!! 72 !!!
!!! 73 !!!
!!! 74 !!!
75=67x1+8
!!! 76 !!!
!!! 77 !!!
!!! 78 !!!
79=71x1+8
79=13x5+14
!!! 80 !!!
!!! 81 !!!
82=11x7+5
82=11x6+16
83=71x1+12
!!! 84 !!!
!!! 85 !!!
!!! 86 !!!
!!! 87 !!!
88=37x2+14
89=37x2+15
90=37x2+16
!!! 91 !!!
92=13x6+14
93=11x8+5
93=11x7+16
94=79x1+15
!!! 95 !!!
!!! 96 !!!
!!! 97 !!!
!!! 98 !!!
!!! 99 !!!
100=29x3+13

生成されたa.batは、
factor((1^5+1^4+1^3+1^2+1+1)*1^26+1^6+1^5+1^4+1^3+1^2+1+1);
factor((3^5+3^4+3^3+3^2+3+1)*3^26+3^6+3^5+3^4+3^3+3^2+3+1);
factor((4^5+4^4+4^3+4^2+4+1)*4^26+4^6+4^5+4^4+4^3+4^2+4+1);
factor((6^5+6^4+6^3+6^2+6+1)*6^26+6^6+6^5+6^4+6^3+6^2+6+1);
factor((7^5+7^4+7^3+7^2+7+1)*7^26+7^6+7^5+7^4+7^3+7^2+7+1);
factor((9^5+9^4+9^3+9^2+9+1)*9^26+9^6+9^5+9^4+9^3+9^2+9+1);
factor((10^5+10^4+10^3+10^2+10+1)*10^26+10^6+10^5+10^4+10^3+10^2+10+1);
factor((11^5+11^4+11^3+11^2+11+1)*11^26+11^6+11^5+11^4+11^3+11^2+11+1);
factor((18^5+18^4+18^3+18^2+18+1)*18^26+18^6+18^5+18^4+18^3+18^2+18+1);
factor((19^5+19^4+19^3+19^2+19+1)*19^26+19^6+19^5+19^4+19^3+19^2+19+1);
factor((20^5+20^4+20^3+20^2+20+1)*20^26+20^6+20^5+20^4+20^3+20^2+20+1);
factor((21^5+21^4+21^3+21^2+21+1)*21^26+21^6+21^5+21^4+21^3+21^2+21+1);
factor((22^5+22^4+22^3+22^2+22+1)*22^26+22^6+22^5+22^4+22^3+22^2+22+1);
factor((23^5+23^4+23^3+23^2+23+1)*23^26+23^6+23^5+23^4+23^3+23^2+23+1);
factor((24^5+24^4+24^3+24^2+24+1)*24^26+24^6+24^5+24^4+24^3+24^2+24+1);
factor((25^5+25^4+25^3+25^2+25+1)*25^26+25^6+25^5+25^4+25^3+25^2+25+1);
factor((26^5+26^4+26^3+26^2+26+1)*26^26+26^6+26^5+26^4+26^3+26^2+26+1);
factor((28^5+28^4+28^3+28^2+28+1)*28^26+28^6+28^5+28^4+28^3+28^2+28+1);
factor((29^5+29^4+29^3+29^2+29+1)*29^26+29^6+29^5+29^4+29^3+29^2+29+1);
factor((30^5+30^4+30^3+30^2+30+1)*30^26+30^6+30^5+30^4+30^3+30^2+30+1);
factor((31^5+31^4+31^3+31^2+31+1)*31^26+31^6+31^5+31^4+31^3+31^2+31+1);
factor((32^5+32^4+32^3+32^2+32+1)*32^26+32^6+32^5+32^4+32^3+32^2+32+1);
factor((33^5+33^4+33^3+33^2+33+1)*33^26+33^6+33^5+33^4+33^3+33^2+33+1);
factor((34^5+34^4+34^3+34^2+34+1)*34^26+34^6+34^5+34^4+34^3+34^2+34+1);
factor((35^5+35^4+35^3+35^2+35+1)*35^26+35^6+35^5+35^4+35^3+35^2+35+1);
factor((36^5+36^4+36^3+36^2+36+1)*36^26+36^6+36^5+36^4+36^3+36^2+36+1);
factor((37^5+37^4+37^3+37^2+37+1)*37^26+37^6+37^5+37^4+37^3+37^2+37+1);
factor((39^5+39^4+39^3+39^2+39+1)*39^26+39^6+39^5+39^4+39^3+39^2+39+1);
factor((41^5+41^4+41^3+41^2+41+1)*41^26+41^6+41^5+41^4+41^3+41^2+41+1);
factor((43^5+43^4+43^3+43^2+43+1)*43^26+43^6+43^5+43^4+43^3+43^2+43+1);
factor((44^5+44^4+44^3+44^2+44+1)*44^26+44^6+44^5+44^4+44^3+44^2+44+1);
factor((45^5+45^4+45^3+45^2+45+1)*45^26+45^6+45^5+45^4+45^3+45^2+45+1);
factor((46^5+46^4+46^3+46^2+46+1)*46^26+46^6+46^5+46^4+46^3+46^2+46+1);
factor((47^5+47^4+47^3+47^2+47+1)*47^26+47^6+47^5+47^4+47^3+47^2+47+1);
factor((48^5+48^4+48^3+48^2+48+1)*48^26+48^6+48^5+48^4+48^3+48^2+48+1);
factor((50^5+50^4+50^3+50^2+50+1)*50^26+50^6+50^5+50^4+50^3+50^2+50+1);
factor((54^5+54^4+54^3+54^2+54+1)*54^26+54^6+54^5+54^4+54^3+54^2+54+1);
factor((55^5+55^4+55^3+55^2+55+1)*55^26+55^6+55^5+55^4+55^3+55^2+55+1);
factor((56^5+56^4+56^3+56^2+56+1)*56^26+56^6+56^5+56^4+56^3+56^2+56+1);
factor((57^5+57^4+57^3+57^2+57+1)*57^26+57^6+57^5+57^4+57^3+57^2+57+1);
factor((58^5+58^4+58^3+58^2+58+1)*58^26+58^6+58^5+58^4+58^3+58^2+58+1);
factor((59^5+59^4+59^3+59^2+59+1)*59^26+59^6+59^5+59^4+59^3+59^2+59+1);
factor((61^5+61^4+61^3+61^2+61+1)*61^26+61^6+61^5+61^4+61^3+61^2+61+1);
factor((62^5+62^4+62^3+62^2+62+1)*62^26+62^6+62^5+62^4+62^3+62^2+62+1);
factor((63^5+63^4+63^3+63^2+63+1)*63^26+63^6+63^5+63^4+63^3+63^2+63+1);
factor((64^5+64^4+64^3+64^2+64+1)*64^26+64^6+64^5+64^4+64^3+64^2+64+1);
factor((65^5+65^4+65^3+65^2+65+1)*65^26+65^6+65^5+65^4+65^3+65^2+65+1);
factor((67^5+67^4+67^3+67^2+67+1)*67^26+67^6+67^5+67^4+67^3+67^2+67+1);
factor((68^5+68^4+68^3+68^2+68+1)*68^26+68^6+68^5+68^4+68^3+68^2+68+1);
factor((69^5+69^4+69^3+69^2+69+1)*69^26+69^6+69^5+69^4+69^3+69^2+69+1);
factor((70^5+70^4+70^3+70^2+70+1)*70^26+70^6+70^5+70^4+70^3+70^2+70+1);
factor((72^5+72^4+72^3+72^2+72+1)*72^26+72^6+72^5+72^4+72^3+72^2+72+1);
factor((73^5+73^4+73^3+73^2+73+1)*73^26+73^6+73^5+73^4+73^3+73^2+73+1);
factor((74^5+74^4+74^3+74^2+74+1)*74^26+74^6+74^5+74^4+74^3+74^2+74+1);
factor((76^5+76^4+76^3+76^2+76+1)*76^26+76^6+76^5+76^4+76^3+76^2+76+1);
factor((77^5+77^4+77^3+77^2+77+1)*77^26+77^6+77^5+77^4+77^3+77^2+77+1);
factor((78^5+78^4+78^3+78^2+78+1)*78^26+78^6+78^5+78^4+78^3+78^2+78+1);
factor((80^5+80^4+80^3+80^2+80+1)*80^26+80^6+80^5+80^4+80^3+80^2+80+1);
factor((81^5+81^4+81^3+81^2+81+1)*81^26+81^6+81^5+81^4+81^3+81^2+81+1);
factor((84^5+84^4+84^3+84^2+84+1)*84^26+84^6+84^5+84^4+84^3+84^2+84+1);
factor((85^5+85^4+85^3+85^2+85+1)*85^26+85^6+85^5+85^4+85^3+85^2+85+1);
factor((86^5+86^4+86^3+86^2+86+1)*86^26+86^6+86^5+86^4+86^3+86^2+86+1);
factor((87^5+87^4+87^3+87^2+87+1)*87^26+87^6+87^5+87^4+87^3+87^2+87+1);
factor((91^5+91^4+91^3+91^2+91+1)*91^26+91^6+91^5+91^4+91^3+91^2+91+1);
factor((95^5+95^4+95^3+95^2+95+1)*95^26+95^6+95^5+95^4+95^3+95^2+95+1);
factor((96^5+96^4+96^3+96^2+96+1)*96^26+96^6+96^5+96^4+96^3+96^2+96+1);
factor((97^5+97^4+97^3+97^2+97+1)*97^26+97^6+97^5+97^4+97^3+97^2+97+1);
factor((98^5+98^4+98^3+98^2+98+1)*98^26+98^6+98^5+98^4+98^3+98^2+98+1);
factor((99^5+99^4+99^3+99^2+99+1)*99^26+99^6+99^5+99^4+99^3+99^2+99+1);

実行結果を示す。

(%i4) batch("a.bat");

read and interpret file: a.bat
                      2    3    4    5    6             2    3    4    5   26
(%i5) factor(1 + 1 + 1  + 1  + 1  + 1  + 1  + (1 + 1 + 1  + 1  + 1  + 1 ) 1  )
(%o5)                                 13
                      2    3    4    5    6             2    3    4    5   26
(%i6) factor(1 + 3 + 3  + 3  + 3  + 3  + 3  + (1 + 3 + 3  + 3  + 3  + 3 ) 3  )
素数ですね。
(%o6)                           925239161512849
                      2    3    4    5    6             2    3    4    5   26
(%i7) factor(1 + 4 + 4  + 4  + 4  + 4  + 4  + (1 + 4 + 4  + 4  + 4  + 4 ) 4  )
(%o7)                       142357 2258819 19117547
                      2    3    4    5    6             2    3    4    5   26
(%i8) factor(1 + 6 + 6  + 6  + 6  + 6  + 6  + (1 + 6 + 6  + 6  + 6  + 6 ) 6  )
素数ですね。
(%o8)                      1591698105643644261292723
                      2    3    4    5    6             2    3    4    5   26
(%i9) factor(1 + 7 + 7  + 7  + 7  + 7  + 7  + (1 + 7 + 7  + 7  + 7  + 7 ) 7  )
(%o9)                   110573 3014839 552165313470467
                       2    3    4    5    6             2    3    4    5   26
(%i10) factor(1 + 9 + 9  + 9  + 9  + 9  + 9  + (1 + 9 + 9  + 9  + 9  + 9 ) 9  )
(%o10)                  46266193 9276961039377670586557
                         2     3     4     5     6
(%i11) factor(1 + 10 + 10  + 10  + 10  + 10  + 10
                                                     2     3     4     5    26
                                       + (1 + 10 + 10  + 10  + 10  + 10 ) 10  )
(%o11)                 17882603 621335719414002536431637
                         2     3     4     5     6
(%i12) factor(1 + 11 + 11  + 11  + 11  + 11  + 11
                                                     2     3     4     5    26
                                       + (1 + 11 + 11  + 11  + 11  + 11 ) 11  )
(%o12)               3809503 48312182993 1147204121010527
                         2     3     4     5     6
(%i13) factor(1 + 18 + 18  + 18  + 18  + 18  + 18
                                                     2     3     4     5    26
                                       + (1 + 18 + 18  + 18  + 18  + 18 ) 18  )
(%o13)            62129 16792746857 831486350739196882471783
                         2     3     4     5     6
(%i14) factor(1 + 19 + 19  + 19  + 19  + 19  + 19
                                                     2     3     4     5    26
                                       + (1 + 19 + 19  + 19  + 19  + 19 ) 19  )
(%o14)            10061 459411187823355611627755333079107541
                         2     3     4     5     6
(%i15) factor(1 + 20 + 20  + 20  + 20  + 20  + 20
                                                     2     3     4     5    26
                                       + (1 + 20 + 20  + 20  + 20  + 20 ) 20  )
(%o15)            49205612878450804463 459400652811990773867
                         2     3     4     5     6
(%i16) factor(1 + 21 + 21  + 21  + 21  + 21  + 21
                                                     2     3     4     5    26
                                       + (1 + 21 + 21  + 21  + 21  + 21 ) 21  )
(%o16)           555827 649921 283261285309476181243390804559
                         2     3     4     5     6
(%i17) factor(1 + 22 + 22  + 22  + 22  + 22  + 22
                                                     2     3     4     5    26
                                       + (1 + 22 + 22  + 22  + 22  + 22 ) 22  )
(%o17)          41 47 675151 331912690578738688332361523611147
                         2     3     4     5     6
(%i18) factor(1 + 23 + 23  + 23  + 23  + 23  + 23
                                                     2     3     4     5    26
                                       + (1 + 23 + 23  + 23  + 23  + 23 ) 23  )
(%o18)           7417 910897359978173 253029027561094900064189
                         2     3     4     5     6
(%i19) factor(1 + 24 + 24  + 24  + 24  + 24  + 24
                                                     2     3     4     5    26
                                       + (1 + 24 + 24  + 24  + 24  + 24 ) 24  )
(%o19)         31 61 589779727 598441665764963 9563760778070111
                         2     3     4     5     6
(%i20) factor(1 + 25 + 25  + 25  + 25  + 25  + 25
                                                     2     3     4     5    26
                                       + (1 + 25 + 25  + 25  + 25  + 25 ) 25  )
(%o20)         37 769 6343 20411 6131715215253563580714993446429
                         2     3     4     5     6
(%i21) factor(1 + 26 + 26  + 26  + 26  + 26  + 26
                                                     2     3     4     5    26
                                       + (1 + 26 + 26  + 26  + 26  + 26 ) 26  )
(%o21)          33927774718003 2242083327797225684186513011021
                         2     3     4     5     6
(%i22) factor(1 + 28 + 28  + 28  + 28  + 28  + 28
                                                     2     3     4     5    26
                                       + (1 + 28 + 28  + 28  + 28  + 28 ) 28  )
(%o22)         139 28775141 188651810395093840719681361777596251
                         2     3     4     5     6
(%i23) factor(1 + 29 + 29  + 29  + 29  + 29  + 29
                                                     2     3     4     5    26
                                       + (1 + 29 + 29  + 29  + 29  + 29 ) 29  )
(%o23)       1543 4013 485857763 596876930231 1245514750658570363
                         2     3     4     5     6
(%i24) factor(1 + 30 + 30  + 30  + 30  + 30  + 30
                                                     2     3     4     5    26
                                       + (1 + 30 + 30  + 30  + 30  + 30 ) 30  )
(%o24)         88347851 517686451 139707385017321301654328187131
                         2     3     4     5     6
(%i25) factor(1 + 31 + 31  + 31  + 31  + 31  + 31
                                                     2     3     4     5    26
                                       + (1 + 31 + 31  + 31  + 31  + 31 ) 31  )
(%o25)        2379989 34746961 213285421173517389802655774998637
                         2     3     4     5     6
(%i26) factor(1 + 32 + 32  + 32  + 32  + 32  + 32
                                                     2     3     4     5    26
                                       + (1 + 32 + 32  + 32  + 32  + 32 ) 32  )
(%o26)         89 7570846378928839 69968597937245408728133926319
                         2     3     4     5     6
(%i27) factor(1 + 33 + 33  + 33  + 33  + 33  + 33
                                                     2     3     4     5    26
                                       + (1 + 33 + 33  + 33  + 33  + 33 ) 33  )
(%o27)        4236461 56454091987 511207784087290484087807494907
                         2     3     4     5     6
(%i28) factor(1 + 34 + 34  + 34  + 34  + 34  + 34
                                                     2     3     4     5    26
                                       + (1 + 34 + 34  + 34  + 34  + 34 ) 34  )
(%o28)        572969 1132746954855243589 474840087538249496811611
                         2     3     4     5     6
(%i29) factor(1 + 35 + 35  + 35  + 35  + 35  + 35
                                                     2     3     4     5    26
                                       + (1 + 35 + 35  + 35  + 35  + 35 ) 35  )
(%o29)        47 201631319589120167491 79807306132145941321815893
                         2     3     4     5     6
(%i30) factor(1 + 36 + 36  + 36  + 36  + 36  + 36
                                                     2     3     4     5    26
                                       + (1 + 36 + 36  + 36  + 36  + 36 ) 36  )
(%o30)      79 33893 6003418631603 115505282849107 974707707867559
                         2     3     4     5     6
(%i31) factor(1 + 37 + 37  + 37  + 37  + 37  + 37
                                                     2     3     4     5    26
                                       + (1 + 37 + 37  + 37  + 37  + 37 ) 37  )
(%o31)     163 2339 115781 1026427 93318871699551346757874564278371
                         2     3     4     5     6
(%i32) factor(1 + 39 + 39  + 39  + 39  + 39  + 39
                                                     2     3     4     5    26
                                       + (1 + 39 + 39  + 39  + 39  + 39 ) 39  )
素数ですね。
(%o32)        21591550388164911955677554522849046613194503880001
                         2     3     4     5     6
(%i33) factor(1 + 41 + 41  + 41  + 41  + 41  + 41
                                                     2     3     4     5    26
                                       + (1 + 41 + 41  + 41  + 41  + 41 ) 41  )
(%o33)     293 1283 83341 12661469928464618047 256204239458023499761
                         2     3     4     5     6
(%i34) factor(1 + 43 + 43  + 43  + 43  + 43  + 43
                                                     2     3     4     5    26
                                       + (1 + 43 + 43  + 43  + 43  + 43 ) 43  )
(%o34)       11161 39814217071811953761667270152562438542565082809
                         2     3     4     5     6
(%i35) factor(1 + 44 + 44  + 44  + 44  + 44  + 44
                                                     2     3     4     5    26
                                       + (1 + 44 + 44  + 44  + 44  + 44 ) 44  )
(%o35)       7489 120946515663992166395081494240780930998890350909
                         2     3     4     5     6
(%i36) factor(1 + 45 + 45  + 45  + 45  + 45  + 45
                                                     2     3     4     5    26
                                       + (1 + 45 + 45  + 45  + 45  + 45 ) 45  )
素数ですね。
(%o36)       1816970031559786528469223147125521302223214058893821
                         2     3     4     5     6
(%i37) factor(1 + 46 + 46  + 46  + 46  + 46  + 46
                                                     2     3     4     5    26
                                       + (1 + 46 + 46  + 46  + 46  + 46 ) 46  )
(%o37)      298521990986621 12024354470872704897879628666550706743
                         2     3     4     5     6
(%i38) factor(1 + 47 + 47  + 47  + 47  + 47  + 47
                                                     2     3     4     5    26
                                       + (1 + 47 + 47  + 47  + 47  + 47 ) 47  )
(%o38)      3251 44514023741875017509 48290288457593998537403458591
                         2     3     4     5     6
(%i39) factor(1 + 48 + 48  + 48  + 48  + 48  + 48
                                                     2     3     4     5    26
                                       + (1 + 48 + 48  + 48  + 48  + 48 ) 48  )
(%o39)      8914567 302865973930260659 4969022923180731867857920733
                         2     3     4     5     6
(%i40) factor(1 + 50 + 50  + 50  + 50  + 50  + 50
                                                     2     3     4     5    26
                                       + (1 + 50 + 50  + 50  + 50  + 50 ) 50  )
(%o40)     5193043 164303998197783732193 55689588425567057334584149
                         2     3     4     5     6
(%i41) factor(1 + 54 + 54  + 54  + 54  + 54  + 54
                                                     2     3     4     5    26
                                       + (1 + 54 + 54  + 54  + 54  + 54 ) 54  )
(%o41)   67 521 3548891 65108027 1440387288911 44381854256575113449359
                         2     3     4     5     6
(%i42) factor(1 + 55 + 55  + 55  + 55  + 55  + 55
                                                     2     3     4     5    26
                                       + (1 + 55 + 55  + 55  + 55  + 55 ) 55  )
(%o42)   31 1058556511 1423347379 19490620093636862898700968856296379
                         2     3     4     5     6
(%i43) factor(1 + 56 + 56  + 56  + 56  + 56  + 56
                                                     2     3     4     5    26
                                       + (1 + 56 + 56  + 56  + 56  + 56 ) 56  )
(%o43)     4155121 382886892660061237272895003710758497788329749513
                         2     3     4     5     6
(%i44) factor(1 + 57 + 57  + 57  + 57  + 57  + 57
                                                     2     3     4     5    26
                                       + (1 + 57 + 57  + 57  + 57  + 57 ) 57  )
(%o44)    971 1321 3293776056238721 651615248647259116342087621445359
                         2     3     4     5     6
(%i45) factor(1 + 58 + 58  + 58  + 58  + 58  + 58
                                                     2     3     4     5    26
                                       + (1 + 58 + 58  + 58  + 58  + 58 ) 58  )
(%o45)     1586437 2974391340826356044793903697174319512392105060427
                         2     3     4     5     6
(%i46) factor(1 + 59 + 59  + 59  + 59  + 59  + 59
                                                     2     3     4     5    26
                                       + (1 + 59 + 59  + 59  + 59  + 59 ) 59  )
(%o46)   27397 297629 48385741 20311440627827363795487479011576180997
                         2     3     4     5     6
(%i47) factor(1 + 61 + 61  + 61  + 61  + 61  + 61
                                                     2     3     4     5    26
                                       + (1 + 61 + 61  + 61  + 61  + 61 ) 61  )
(%o47)     26402145943 852637132995304241094851224601271776695685131
                         2     3     4     5     6
(%i48) factor(1 + 62 + 62  + 62  + 62  + 62  + 62
                                                     2     3     4     5    26
                                       + (1 + 62 + 62  + 62  + 62  + 62 ) 62  )
(%o48) 37 503 27733 231607 547817 80683523553989 7051242089606385865583
                         2     3     4     5     6
(%i49) factor(1 + 63 + 63  + 63  + 63  + 63  + 63
                                                     2     3     4     5    26
                                       + (1 + 63 + 63  + 63  + 63  + 63 ) 63  )
(%o49) 41 733 1867 6169019 152624063 1157802879012337058605474894958267
                         2     3     4     5     6
(%i50) factor(1 + 64 + 64  + 64  + 64  + 64  + 64
                                                     2     3     4     5    26
                                       + (1 + 64 + 64  + 64  + 64  + 64 ) 64  )
(%o50) 449 16369 92311 361523 1418513 1750999 163546600824443644797801611
                         2     3     4     5     6
(%i51) factor(1 + 65 + 65  + 65  + 65  + 65  + 65
                                                     2     3     4     5    26
                                       + (1 + 65 + 65  + 65  + 65  + 65 ) 65  )
(%o51)   23059 781295610313 222949882603966307 40103690229200520585389
                         2     3     4     5     6
(%i52) factor(1 + 67 + 67  + 67  + 67  + 67  + 67
                                                     2     3     4     5    26
                                       + (1 + 67 + 67  + 67  + 67  + 67 ) 67  )
(%o52)   349 337583 3496582306513005567225358351303230221312485411787
                         2     3     4     5     6
(%i53) factor(1 + 68 + 68  + 68  + 68  + 68  + 68
                                                     2     3     4     5    26
                                       + (1 + 68 + 68  + 68  + 68  + 68 ) 68  )
(%o53)   619 4726015205829499639 222856158593267147726272699815077689
                         2     3     4     5     6
(%i54) factor(1 + 69 + 69  + 69  + 69  + 69  + 69
                                                     2     3     4     5    26
                                       + (1 + 69 + 69  + 69  + 69  + 69 ) 69  )
(%o54)   47 62477 349014897838190532583800875087212569642489423291679
                         2     3     4     5     6
(%i55) factor(1 + 70 + 70  + 70  + 70  + 70  + 70
                                                     2     3     4     5    26
                                       + (1 + 70 + 70  + 70  + 70  + 70 ) 70  )
(%o55)   22513327 67057693 1060229544295676883163701664041702072689761
                         2     3     4     5     6
(%i56) factor(1 + 72 + 72  + 72  + 72  + 72  + 72
                                                     2     3     4     5    26
                                       + (1 + 72 + 72  + 72  + 72  + 72 ) 72  )
(%o56)  971 5227 3206632229 235429377249681808413678953586920473013533
                         2     3     4     5     6
(%i57) factor(1 + 73 + 73  + 73  + 73  + 73  + 73
                                                     2     3     4     5    26
                                       + (1 + 73 + 73  + 73  + 73  + 73 ) 73  )
(%o57)  35171 1352207 123529627271404861206127020279100996837199241217
                         2     3     4     5     6
(%i58) factor(1 + 74 + 74  + 74  + 74  + 74  + 74
                                                     2     3     4     5    26
                                       + (1 + 74 + 74  + 74  + 74  + 74 ) 74  )
(%o58)   55333 161848229978316659395998891679467464574636887865970747
                         2     3     4     5     6
(%i59) factor(1 + 76 + 76  + 76  + 76  + 76  + 76
                                                     2     3     4     5    26
                                       + (1 + 76 + 76  + 76  + 76  + 76 ) 76  )
(%o59)   220959437 92610693195408385579774070131389021902737696396049
                         2     3     4     5     6
(%i60) factor(1 + 77 + 77  + 77  + 77  + 77  + 77
                                                     2     3     4     5    26
                                       + (1 + 77 + 77  + 77  + 77  + 77 ) 77  )
(%o60)   38182500372473987 803572838128090877482302223066035987451007
                         2     3     4     5     6
(%i61) factor(1 + 78 + 78  + 78  + 78  + 78  + 78
                                                     2     3     4     5    26
                                       + (1 + 78 + 78  + 78  + 78  + 78 ) 78  )
(%o61)   339103361 134959812632413659785367871520868154311400845076859
                         2     3     4     5     6
(%i62) factor(1 + 80 + 80  + 80  + 80  + 80  + 80
                                                     2     3     4     5    26
                                       + (1 + 80 + 80  + 80  + 80  + 80 ) 80  )
(%o62) 25703 42181 816373639 221071446461315053 512542849635621921776801
                         2     3     4     5     6
(%i63) factor(1 + 81 + 81  + 81  + 81  + 81  + 81
                                                     2     3     4     5    26
                                       + (1 + 81 + 81  + 81  + 81  + 81 ) 81  )
(%o63)   43 3427379237702569067541156960348420149467208217793560230311
                         2     3     4     5     6
(%i64) factor(1 + 84 + 84  + 84  + 84  + 84  + 84
                                                     2     3     4     5    26
                                       + (1 + 84 + 84  + 84  + 84  + 84 ) 84  )
(%o64)   643 707372364189715287769322370986088350220510745624549566007
                         2     3     4     5     6
(%i65) factor(1 + 85 + 85  + 85  + 85  + 85  + 85
                                                     2     3     4     5    26
                                       + (1 + 85 + 85  + 85  + 85  + 85 ) 85  )
(%o65) 61 1061 458987 947559271 4963513567 4697698437279074417361915463999
                         2     3     4     5     6
(%i66) factor(1 + 86 + 86  + 86  + 86  + 86  + 86
                                                     2     3     4     5    26
                                       + (1 + 86 + 86  + 86  + 86  + 86 ) 86  )
(%o66) 31 113 30391 389897 22719380894023509335822820809595362706249199843
                         2     3     4     5     6
(%i67) factor(1 + 87 + 87  + 87  + 87  + 87  + 87
                                                     2     3     4     5    26
                                       + (1 + 87 + 87  + 87  + 87  + 87 ) 87  )
(%o67)  341135357 3955404454781089357247304188993070743966265956368277
                         2     3     4     5     6
(%i68) factor(1 + 91 + 91  + 91  + 91  + 91  + 91
                                                     2     3     4     5    26
                                       + (1 + 91 + 91  + 91  + 91  + 91 ) 91  )
(%o68) 90823 11670647983181054620889 5126149075477891361295497390771519
                         2     3     4     5     6
(%i69) factor(1 + 95 + 95  + 95  + 95  + 95  + 95
                                                     2     3     4     5    26
                                       + (1 + 95 + 95  + 95  + 95  + 95 ) 95  )
(%o69) 759308052150163 29587064123465720009 917292066247156073903044163
                         2     3     4     5     6
(%i70) factor(1 + 96 + 96  + 96  + 96  + 96  + 96
                                                     2     3     4     5    26
                                       + (1 + 96 + 96  + 96  + 96  + 96 ) 96  )
(%o70) 14683 507313 248027777 1077517327 11527876499 1242198965768448245389567
                         2     3     4     5     6
(%i71) factor(1 + 97 + 97  + 97  + 97  + 97  + 97
                                                     2     3     4     5    26
                                       + (1 + 97 + 97  + 97  + 97  + 97 ) 97  )
(%o71)  577607306078561678243 68044274129733046900667463792943597655183
                         2     3     4     5     6
(%i72) factor(1 + 98 + 98  + 98  + 98  + 98  + 98
                                                     2     3     4     5    26
                                       + (1 + 98 + 98  + 98  + 98  + 98 ) 98  )
(%o72) 43366208387 24748370509568633 29394213355362677 1711996151702583497
                         2     3     4     5     6
(%i73) factor(1 + 99 + 99  + 99  + 99  + 99  + 99
                                                     2     3     4     5    26
                                       + (1 + 99 + 99  + 99  + 99  + 99 ) 99  )
(%o73) 37 39250244347 16809727893269 3030368055555147367512319592870774411
(%o73)                               a.bat

b.txtに追加されるものは、
41,22
47,22
31,24
61,24
27,25
769,25
139,28
89,32
47,35
79,36
163,37
293,41
67,54
521,54
31,55
971,57
37,62
503,62
41,63
733,63
449,64
349,67
619,68
47,69
971,72
43,81
643,84
61,85
31,86
113,86
37,99

これより、Autohajiku.cの
#define max 1 /* この数から+100まで生成する */

#define max 100 /* この数から+100まで生成する */
になおして、
Autohajiku.cをコンパイル実行する。
$gcc -Wall Autohajiku.c -o Autohajiku
$./Autohajiku
389n+2
11n+5
67n+8
71n+8
71n+12
29n+13
13n+14
37n+14
109n+14
269n+14
37n+15
79n+15
11n+16
37n+16
313n+16
613n+17
41n+22
47n+22
31n+24
61n+24
27n+25
769n+25
139n+28
89n+32
47n+35
79n+36
163n+37
293n+41
67n+54
521n+54
31n+55
971n+57
37n+62
503n+62
41n+63
733n+63
449n+64
349n+67
619n+68
47n+69
971n+72
43n+81
643n+84
61n+85
31n+86
113n+86
37n+99
b.txt read!  47 個 
$gcc -Wall hajiku-6.c -o hajiku-6

$./hajiku-6
100=29x3+13
!!! 101 !!!
!!! 102 !!!
!!! 103 !!!
104=11x9+5
104=11x8+16
104=41x2+22
104=41x1+63
105=13x7+14
106=27x3+25
!!! 107 !!!
!!! 108 !!!
!!! 109 !!!
!!! 110 !!!
!!! 111 !!!
!!! 112 !!!
!!! 113 !!!
!!! 114 !!!
115=11x10+5
115=11x9+16
115=79x1+36
116=47x2+22
116=47x1+69
117=31x3+24
117=31x2+55
117=31x1+86
118=13x8+14
!!! 119 !!!
!!! 120 !!!
121=89x1+32
121=67x1+54
!!! 122 !!!
123=109x1+14
124=43x1+81
125=37x3+14
126=11x11+5
126=37x3+15
126=11x10+16
127=37x3+16
!!! 128 !!!
129=29x4+13
129=47x2+35
!!! 130 !!!
131=13x9+14
!!! 132 !!!
133=27x4+25
!!! 134 !!!
!!! 135 !!!
136=37x2+62
136=37x1+99
137=11x12+5
137=11x11+16
!!! 138 !!!
!!! 139 !!!
!!! 140 !!!
!!! 141 !!!
142=67x2+8
!!! 143 !!!
144=13x10+14
145=41x3+22
145=41x2+63
146=61x2+24
146=61x1+85
!!! 147 !!!
148=11x13+5
148=11x12+16
148=31x4+24
148=31x3+55
148=31x2+86
!!! 149 !!!
150=71x2+8
!!! 151 !!!
!!! 152 !!!
!!! 153 !!!
154=71x2+12
!!! 155 !!!
!!! 156 !!!
157=13x11+14
158=29x5+13
159=11x14+5
159=11x13+16
160=27x5+25
!!! 161 !!!
162=37x4+14
163=37x4+15
163=47x3+22
163=47x2+69
164=37x4+16
!!! 165 !!!
!!! 166 !!!
167=139x1+28
167=43x2+81
!!! 168 !!!
!!! 169 !!!
170=11x15+5
170=13x12+14
170=11x14+16
!!! 171 !!!
!!! 172 !!!
173=79x2+15
173=37x3+62
173=37x2+99
!!! 174 !!!
!!! 175 !!!
176=47x3+35
!!! 177 !!!
!!! 178 !!!
179=31x5+24
179=31x4+55
179=31x3+86
!!! 180 !!!
181=11x16+5
181=11x15+16
!!! 182 !!!
183=13x13+14
!!! 184 !!!
!!! 185 !!!
186=41x4+22
186=41x3+63
187=29x6+13
187=27x6+25
188=67x2+54
!!! 189 !!!
!!! 190 !!!
!!! 191 !!!
192=11x17+5
192=11x16+16
!!! 193 !!!
194=79x2+36
!!! 195 !!!
196=13x14+14
!!! 197 !!!
!!! 198 !!!
199=37x5+14
199=113x1+86

生成されたa.batは、
factor((101^5+101^4+101^3+101^2+101+1)*101^26+101^6+101^5+101^4+101^3+101^2+101+1);
factor((102^5+102^4+102^3+102^2+102+1)*102^26+102^6+102^5+102^4+102^3+102^2+102+1);
factor((103^5+103^4+103^3+103^2+103+1)*103^26+103^6+103^5+103^4+103^3+103^2+103+1);
factor((107^5+107^4+107^3+107^2+107+1)*107^26+107^6+107^5+107^4+107^3+107^2+107+1);
factor((108^5+108^4+108^3+108^2+108+1)*108^26+108^6+108^5+108^4+108^3+108^2+108+1);
factor((109^5+109^4+109^3+109^2+109+1)*109^26+109^6+109^5+109^4+109^3+109^2+109+1);
factor((110^5+110^4+110^3+110^2+110+1)*110^26+110^6+110^5+110^4+110^3+110^2+110+1);
factor((111^5+111^4+111^3+111^2+111+1)*111^26+111^6+111^5+111^4+111^3+111^2+111+1);
factor((112^5+112^4+112^3+112^2+112+1)*112^26+112^6+112^5+112^4+112^3+112^2+112+1);
factor((113^5+113^4+113^3+113^2+113+1)*113^26+113^6+113^5+113^4+113^3+113^2+113+1);
factor((114^5+114^4+114^3+114^2+114+1)*114^26+114^6+114^5+114^4+114^3+114^2+114+1);
factor((119^5+119^4+119^3+119^2+119+1)*119^26+119^6+119^5+119^4+119^3+119^2+119+1);
factor((120^5+120^4+120^3+120^2+120+1)*120^26+120^6+120^5+120^4+120^3+120^2+120+1);
factor((122^5+122^4+122^3+122^2+122+1)*122^26+122^6+122^5+122^4+122^3+122^2+122+1);
factor((128^5+128^4+128^3+128^2+128+1)*128^26+128^6+128^5+128^4+128^3+128^2+128+1);
factor((130^5+130^4+130^3+130^2+130+1)*130^26+130^6+130^5+130^4+130^3+130^2+130+1);
factor((132^5+132^4+132^3+132^2+132+1)*132^26+132^6+132^5+132^4+132^3+132^2+132+1);
factor((134^5+134^4+134^3+134^2+134+1)*134^26+134^6+134^5+134^4+134^3+134^2+134+1);
factor((135^5+135^4+135^3+135^2+135+1)*135^26+135^6+135^5+135^4+135^3+135^2+135+1);
factor((138^5+138^4+138^3+138^2+138+1)*138^26+138^6+138^5+138^4+138^3+138^2+138+1);
factor((139^5+139^4+139^3+139^2+139+1)*139^26+139^6+139^5+139^4+139^3+139^2+139+1);
factor((140^5+140^4+140^3+140^2+140+1)*140^26+140^6+140^5+140^4+140^3+140^2+140+1);
factor((141^5+141^4+141^3+141^2+141+1)*141^26+141^6+141^5+141^4+141^3+141^2+141+1);
factor((143^5+143^4+143^3+143^2+143+1)*143^26+143^6+143^5+143^4+143^3+143^2+143+1);
factor((147^5+147^4+147^3+147^2+147+1)*147^26+147^6+147^5+147^4+147^3+147^2+147+1);
factor((149^5+149^4+149^3+149^2+149+1)*149^26+149^6+149^5+149^4+149^3+149^2+149+1);
factor((151^5+151^4+151^3+151^2+151+1)*151^26+151^6+151^5+151^4+151^3+151^2+151+1);
factor((152^5+152^4+152^3+152^2+152+1)*152^26+152^6+152^5+152^4+152^3+152^2+152+1);
factor((153^5+153^4+153^3+153^2+153+1)*153^26+153^6+153^5+153^4+153^3+153^2+153+1);
factor((155^5+155^4+155^3+155^2+155+1)*155^26+155^6+155^5+155^4+155^3+155^2+155+1);
factor((156^5+156^4+156^3+156^2+156+1)*156^26+156^6+156^5+156^4+156^3+156^2+156+1);
factor((161^5+161^4+161^3+161^2+161+1)*161^26+161^6+161^5+161^4+161^3+161^2+161+1);
factor((165^5+165^4+165^3+165^2+165+1)*165^26+165^6+165^5+165^4+165^3+165^2+165+1);
factor((166^5+166^4+166^3+166^2+166+1)*166^26+166^6+166^5+166^4+166^3+166^2+166+1);
factor((168^5+168^4+168^3+168^2+168+1)*168^26+168^6+168^5+168^4+168^3+168^2+168+1);
factor((169^5+169^4+169^3+169^2+169+1)*169^26+169^6+169^5+169^4+169^3+169^2+169+1);
factor((171^5+171^4+171^3+171^2+171+1)*171^26+171^6+171^5+171^4+171^3+171^2+171+1);
factor((172^5+172^4+172^3+172^2+172+1)*172^26+172^6+172^5+172^4+172^3+172^2+172+1);
factor((174^5+174^4+174^3+174^2+174+1)*174^26+174^6+174^5+174^4+174^3+174^2+174+1);
factor((175^5+175^4+175^3+175^2+175+1)*175^26+175^6+175^5+175^4+175^3+175^2+175+1);
factor((177^5+177^4+177^3+177^2+177+1)*177^26+177^6+177^5+177^4+177^3+177^2+177+1);
factor((178^5+178^4+178^3+178^2+178+1)*178^26+178^6+178^5+178^4+178^3+178^2+178+1);
factor((180^5+180^4+180^3+180^2+180+1)*180^26+180^6+180^5+180^4+180^3+180^2+180+1);
factor((182^5+182^4+182^3+182^2+182+1)*182^26+182^6+182^5+182^4+182^3+182^2+182+1);
factor((184^5+184^4+184^3+184^2+184+1)*184^26+184^6+184^5+184^4+184^3+184^2+184+1);
factor((185^5+185^4+185^3+185^2+185+1)*185^26+185^6+185^5+185^4+185^3+185^2+185+1);
factor((189^5+189^4+189^3+189^2+189+1)*189^26+189^6+189^5+189^4+189^3+189^2+189+1);
factor((190^5+190^4+190^3+190^2+190+1)*190^26+190^6+190^5+190^4+190^3+190^2+190+1);
factor((191^5+191^4+191^3+191^2+191+1)*191^26+191^6+191^5+191^4+191^3+191^2+191+1);
factor((193^5+193^4+193^3+193^2+193+1)*193^26+193^6+193^5+193^4+193^3+193^2+193+1);
factor((195^5+195^4+195^3+195^2+195+1)*195^26+195^6+195^5+195^4+195^3+195^2+195+1);
factor((197^5+197^4+197^3+197^2+197+1)*197^26+197^6+197^5+197^4+197^3+197^2+197+1);
factor((198^5+198^4+198^3+198^2+198+1)*198^26+198^6+198^5+198^4+198^3+198^2+198+1);

(%i74) batch("a.bat");

read and interpret file: a.bat
                           2      3      4      5      6
(%i75) factor(1 + 101 + 101  + 101  + 101  + 101  + 101
                                                 2      3      4      5     26
                                 + (1 + 101 + 101  + 101  + 101  + 101 ) 101  )
(%o75) 86005437866611329981653 1598667145514964578483987614852799376521
                           2      3      4      5      6
(%i76) factor(1 + 102 + 102  + 102  + 102  + 102  + 102
                                                 2      3      4      5     26
                                 + (1 + 102 + 102  + 102  + 102  + 102 ) 102  )
(%o76) 55012369 626134969195461540090539 5416962332786904360485493902249
                           2      3      4      5      6
(%i77) factor(1 + 103 + 103  + 103  + 103  + 103  + 103
                                                 2      3      4      5     26
                                 + (1 + 103 + 103  + 103  + 103  + 103 ) 103  )
(%o77) 6856873 69469343 50336013407 937740654462490993 11228200527254264041
                           2      3      4      5      6
(%i78) factor(1 + 107 + 107  + 107  + 107  + 107  + 107
                                                 2      3      4      5     26
                                 + (1 + 107 + 107  + 107  + 107  + 107 ) 107  )
(%o78) 433 829 30557 458074811341747 163638491821611953734060997546160901283
                           2      3      4      5      6
(%i79) factor(1 + 108 + 108  + 108  + 108  + 108  + 108
                                                 2      3      4      5     26
                                 + (1 + 108 + 108  + 108  + 108  + 108 ) 108  )
(%o79) 1627 175673 8863643 27737816459 15609870539774349783926005487682266087
                           2      3      4      5      6
(%i80) factor(1 + 109 + 109  + 109  + 109  + 109  + 109
                                                 2      3      4      5     26
                                 + (1 + 109 + 109  + 109  + 109  + 109 ) 109  )
(%o80) 953 2843 78311 124671083 32761761493 4011889011451 419807083499452884541
                           2      3      4      5      6
(%i81) factor(1 + 110 + 110  + 110  + 110  + 110  + 110
                                                 2      3      4      5     26
                                 + (1 + 110 + 110  + 110  + 110  + 110 ) 110  )
(%o81) 307 69197 785162009560897 50434376737824029 2302649567976780157963393
                           2      3      4      5      6
(%i82) factor(1 + 111 + 111  + 111  + 111  + 111  + 111
                                                 2      3      4      5     26
                                 + (1 + 111 + 111  + 111  + 111  + 111 ) 111  )
(%o82) 569 1511 74531 44810533322726254091863 892994623633555384942982324579
                           2      3      4      5      6
(%i83) factor(1 + 112 + 112  + 112  + 112  + 112  + 112
                                                 2      3      4      5     26
                                 + (1 + 112 + 112  + 112  + 112  + 112 ) 112  )
(%o83) 1723 167213 38749265712317341 303273842153528127237291079328643875771
                           2      3      4      5      6
(%i84) factor(1 + 113 + 113  + 113  + 113  + 113  + 113
                                                 2      3      4      5     26
                                 + (1 + 113 + 113  + 113  + 113  + 113 ) 113  )
(%o84) 137 32551544643968759638842235136281431625987607611501416005611877
                           2      3      4      5      6
(%i85) factor(1 + 114 + 114  + 114  + 114  + 114  + 114
                                                 2      3      4      5     26
                                 + (1 + 114 + 114  + 114  + 114  + 114 ) 114  )
素数ですね。
(%o85) 5859719123437523198124390048084855404038311887435364309279648751
                           2      3      4      5      6
(%i86) factor(1 + 119 + 119  + 119  + 119  + 119  + 119
                                                 2      3      4      5     26
                                 + (1 + 119 + 119  + 119  + 119  + 119 ) 119  )
(%o86) 193 26106346528351 4398629168552658589806234878678664373100275704607
                           2      3      4      5      6
(%i87) factor(1 + 120 + 120  + 120  + 120  + 120  + 120
                                                 2      3      4      5     26
                                 + (1 + 120 + 120  + 120  + 120  + 120 ) 120  )
素数ですね。
(%o87) 28724528728702020643169372844176336486400000000000003011076302521
                           2      3      4      5      6
(%i88) factor(1 + 122 + 122  + 122  + 122  + 122  + 122
                                                 2      3      4      5     26
                                 + (1 + 122 + 122  + 122  + 122  + 122 ) 122  )
(%o88) 5413 30893 286702249026059336186039518479352278428685011150068356791
                           2      3      4      5      6
(%i89) factor(1 + 128 + 128  + 128  + 128  + 128  + 128
                                                 2      3      4      5     26
                                 + (1 + 128 + 128  + 128  + 128  + 128 ) 128  )
(%o89) 67263910498409 3155972393668760437474315894675740245049303272451161
                           2      3      4      5      6
(%i90) factor(1 + 130 + 130  + 130  + 130  + 130  + 130
                                                 2      3      4      5     26
                                 + (1 + 130 + 130  + 130  + 130  + 130 ) 130  )
(%o90) 331 420997483 3975098220374549 619643939416911794500652069866566356603
                           2      3      4      5      6
(%i91) factor(1 + 132 + 132  + 132  + 132  + 132  + 132
                                                 2      3      4      5     26
                                 + (1 + 132 + 132  + 132  + 132  + 132 ) 132  )
(%o91) 5087 87255449 1241195543666105031838428595942963198902986189129528323
                           2      3      4      5      6
(%i92) factor(1 + 134 + 134  + 134  + 134  + 134  + 134
                                                 2      3      4      5     26
                                 + (1 + 134 + 134  + 134  + 134  + 134 ) 134  )
(%o92) 1723 14543 9338503470644042971 3752194483494024498043255808156521847429
                           2      3      4      5      6
(%i93) factor(1 + 135 + 135  + 135  + 135  + 135  + 135
                                                 2      3      4      5     26
                                 + (1 + 135 + 135  + 135  + 135  + 135 ) 135  )
(%o93) 351229 912467 3449596189368680050078370916933642196217234581943678327
                           2      3      4      5      6
(%i94) factor(1 + 138 + 138  + 138  + 138  + 138  + 138
                                                 2      3      4      5     26
                                 + (1 + 138 + 138  + 138  + 138  + 138 ) 138  )
(%o2) 2391071 2775173 101737154099612963083543 3236294827082466758566788247171
                          2      3      4      5      6
(%i3) factor(1 + 139 + 139  + 139  + 139  + 139  + 139
                                                 2      3      4      5     26
                                 + (1 + 139 + 139  + 139  + 139  + 139 ) 139  )
(%o3) 87281 619187 50565345459596735105908861379487952099440117626123361883
                          2      3      4      5      6
(%i4) factor(1 + 140 + 140  + 140  + 140  + 140  + 140
                                                 2      3      4      5     26
                                 + (1 + 140 + 140  + 140  + 140  + 140 ) 140  )
(%o4) 1201 3429461279 828539905208825003522028940827202926087891173968286579
                          2      3      4      5      6
(%i5) factor(1 + 141 + 141  + 141  + 141  + 141  + 141
                                                 2      3      4      5     26
                                 + (1 + 141 + 141  + 141  + 141  + 141 ) 141  )
(%o5) 211 129603630287 60594559696240775333 2567735664943527653872950881581453
                          2      3      4      5      6
(%i6) factor(1 + 143 + 143  + 143  + 143  + 143  + 143
                                                 2      3      4      5     26
                                 + (1 + 143 + 143  + 143  + 143  + 143 ) 143  )
(%o6) 8918419 5818830510633659767 115210225247909897851 1101159548774854604263
                          2      3      4      5      6
(%i7) factor(1 + 147 + 147  + 147  + 147  + 147  + 147
                                                 2      3      4      5     26
                                 + (1 + 147 + 147  + 147  + 147  + 147 ) 147  )
(%o7) 3729667 21345431 30510973 29488361733757237
                                                 216132544739601777083242947197
                          2      3      4      5      6
(%i8) factor(1 + 149 + 149  + 149  + 149  + 149  + 149
                                                 2      3      4      5     26
                                 + (1 + 149 + 149  + 149  + 149  + 149 ) 149  )
(%o8) 1741 185709317 72789110113359731232139098536379337876029605853749860733
                          2      3      4      5      6
(%i9) factor(1 + 151 + 151  + 151  + 151  + 151  + 151
                                                 2      3      4      5     26
                                 + (1 + 151 + 151  + 151  + 151  + 151 ) 151  )
(%o9) 3467 14149 160669 58203527
                                77555048314507370580976383167567886632957106997
                           2      3      4      5      6
(%i10) factor(1 + 152 + 152  + 152  + 152  + 152  + 152
                                                 2      3      4      5     26
                                 + (1 + 152 + 152  + 152  + 152  + 152 ) 152  )
(%o10) 11955172171 3651422034679578387385464532828417034922661819775402713579
                           2      3      4      5      6
(%i11) factor(1 + 153 + 153  + 153  + 153  + 153  + 153
                                                 2      3      4      5     26
                                 + (1 + 153 + 153  + 153  + 153  + 153 ) 153  )
(%o11) 2714466824264789549986357 19705962865851884382217495874151434699488057
                           2      3      4      5      6
(%i12) factor(1 + 155 + 155  + 155  + 155  + 155  + 155
                                                 2      3      4      5     26
                                 + (1 + 155 + 155  + 155  + 155  + 155 ) 155  )
(%o12) 55902651401 1431071109072163328402872444372000033163212277793442830281
                           2      3      4      5      6
(%i13) factor(1 + 156 + 156  + 156  + 156  + 156  + 156
                                                 2      3      4      5     26
                                 + (1 + 156 + 156  + 156  + 156  + 156 ) 156  )
(%o13) 6547 1448903 10395150499
                               990245814101185061009257956483063806285880712547
                           2      3      4      5      6
(%i14) factor(1 + 161 + 161  + 161  + 161  + 161  + 161
                                                 2      3      4      5     26
                                 + (1 + 161 + 161  + 161  + 161  + 161 ) 161  )
(%o14) 163 13003 328810131823 11947753390327 5450823085627399
                                                         5719833087418134514243
                           2      3      4      5      6
(%i15) factor(1 + 165 + 165  + 165  + 165  + 165  + 165
                                                 2      3      4      5     26
                                 + (1 + 165 + 165  + 165  + 165  + 165 ) 165  )
(%o15) 673 19709 2004773 167160419507750739703
                                           124957997259527162204008868812048027
                           2      3      4      5      6
(%i16) factor(1 + 166 + 166  + 166  + 166  + 166  + 166
                                                 2      3      4      5     26
                                 + (1 + 166 + 166  + 166  + 166  + 166 ) 166  )
(%o16) 17977 5166674937174977 534370385523227918323
                                                  13495970932360084317324141929
                           2      3      4      5      6
(%i17) factor(1 + 168 + 168  + 168  + 168  + 168  + 168
                                                 2      3      4      5     26
                                 + (1 + 168 + 168  + 168  + 168  + 168 ) 168  )
(%o17) 224773876577 28476886014449 53696839851557865299
                                                      2824837591543185308165987
                           2      3      4      5      6
(%i18) factor(1 + 169 + 169  + 169  + 169  + 169  + 169
                                                 2      3      4      5     26
                                 + (1 + 169 + 169  + 169  + 169  + 169 ) 169  )
(%o18) 4537497277 44784324967 5742788949198274061310499030276817196970200892039
                           2      3      4      5      6
(%i19) factor(1 + 171 + 171  + 171  + 171  + 171  + 171
                                                 2      3      4      5     26
                                 + (1 + 171 + 171  + 171  + 171  + 171 ) 171  )
(%o19) 142757 214939 63273251 619405104405120737563
                                                1397394550166083758883849997047
                           2      3      4      5      6
(%i20) factor(1 + 172 + 172  + 172  + 172  + 172  + 172
                                                 2      3      4      5     26
                                 + (1 + 172 + 172  + 172  + 172  + 172 ) 172  )
(%o20) 2797 4456706258603 1293105231930223 701754905990682251
                                                          177987042709419738583
                           2      3      4      5      6
(%i21) factor(1 + 174 + 174  + 174  + 174  + 174  + 174
                                                 2      3      4      5     26
                                 + (1 + 174 + 174  + 174  + 174  + 174 ) 174  )
(%o21) 251 733 2860931 14557712096453951708603
                                           375968652604428217525427093782341029
                           2      3      4      5      6
(%i22) factor(1 + 175 + 175  + 175  + 175  + 175  + 175
                                                 2      3      4      5     26
                                 + (1 + 175 + 175  + 175  + 175  + 175 ) 175  )
(%o22) 2371 2609 667949 1473919697
                               564996229980129783280315410116613941835121018103
                           2      3      4      5      6
(%i23) factor(1 + 177 + 177  + 177  + 177  + 177  + 177
                                                 2      3      4      5     26
                                 + (1 + 177 + 177  + 177  + 177  + 177 ) 177  )
(%o23) 15624400127605117 131370731885211149
                                          2384129733232246163931266853124290773
                           2      3      4      5      6
(%i24) factor(1 + 178 + 178  + 178  + 178  + 178  + 178
                                                 2      3      4      5     26
                                 + (1 + 178 + 178  + 178  + 178  + 178 ) 178  )
(%o24) 80852339 396093492587035836091
                                     181960244544118270958434129855116288616751
                           2      3      4      5      6
(%i25) factor(1 + 180 + 180  + 180  + 180  + 180  + 180
                                                 2      3      4      5     26
                                 + (1 + 180 + 180  + 180  + 180  + 180 ) 180  )
(%o25) 61333 106065109 54716696262421 2926101316867152943
                                                      7910267221134938898853591
                           2      3      4      5      6
(%i26) factor(1 + 182 + 182  + 182  + 182  + 182  + 182
                                                 2      3      4      5     26
                                 + (1 + 182 + 182  + 182  + 182  + 182 ) 182  )
(%o26) 541 937
              22891222393370471378347111317671240131702860824296975177424742247
                           2      3      4      5      6
(%i27) factor(1 + 184 + 184  + 184  + 184  + 184  + 184
                                                 2      3      4      5     26
                                 + (1 + 184 + 184  + 184  + 184  + 184 ) 184  )
素数ですね。
(%o27) 16282431004982253186024840231628067173981583786644234087813165337355001
                           2      3      4      5      6
(%i28) factor(1 + 185 + 185  + 185  + 185  + 185  + 185
                                                 2      3      4      5     26
                                 + (1 + 185 + 185  + 185  + 185  + 185 ) 185  )
(%o28) 1879 444967
                 23036839795026242288418952435152221662908982486348252704238477
                           2      3      4      5      6
(%i29) factor(1 + 189 + 189  + 189  + 189  + 189  + 189
                                                 2      3      4      5     26
                                 + (1 + 189 + 189  + 189  + 189  + 189 ) 189  )
(%o29) 21382345882409017351
                           1748093000373911551713551374784041570098766689922651
                           2      3      4      5      6
(%i30) factor(1 + 190 + 190  + 190  + 190  + 190  + 190
                                                 2      3      4      5     26
                                 + (1 + 190 + 190  + 190  + 190  + 190 ) 190  )
(%o30) 19753 16238246137 186871325213
                                  734409992055838619816143270361097219470999687
                           2      3      4      5      6
(%i31) factor(1 + 191 + 191  + 191  + 191  + 191  + 191
                                                 2      3      4      5     26
                                 + (1 + 191 + 191  + 191  + 191  + 191 ) 191  )
(%o31) 131111
             395070881271341582525958473532049285562330030363137679615330951063
                           2      3      4      5      6
(%i32) factor(1 + 193 + 193  + 193  + 193  + 193  + 193
                                                 2      3      4      5     26
                                 + (1 + 193 + 193  + 193  + 193  + 193 ) 193  )
(%o32) 1787 9851 477221401 774231043 8706115324658033
                                                1263318571060853895695992813583
                           2      3      4      5      6
(%i33) factor(1 + 195 + 195  + 195  + 195  + 195  + 195
                                                 2      3      4      5     26
                                 + (1 + 195 + 195  + 195  + 195  + 195 ) 195  )
(%o33) 4013 39273570229516214854917253
                                     624793194819425047850124572882998546791089
                           2      3      4      5      6
(%i34) factor(1 + 197 + 197  + 197  + 197  + 197  + 197
                                                 2      3      4      5     26
                                 + (1 + 197 + 197  + 197  + 197  + 197 ) 197  )
(%o34) 56417 30060094315356701878635907
                                      79664133792769015132377734428799329961951
                           2      3      4      5      6
(%i35) factor(1 + 198 + 198  + 198  + 198  + 198  + 198
                                                 2      3      4      5     26
                                 + (1 + 198 + 198  + 198  + 198  + 198 ) 198  )
??????????????????????????????????????????????????????????????????????????????


b.txtに追加されるものは、

443,107
829,107
953,109
307,110
569,111
137,113
193,119
331,130
211,141
163,161
673,165
251,174
541,182
937,182