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

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

多項式を変える。

(%i1) factor((x^5+x^4+x^3+x^2+x+1)*x^23+x^6+x^5+x^4+x^3+x^2+x+1);
       28    27    26    25    24    23    6    5    4    3    2
(%o1) x   + x   + x   + x   + x   + x   + x  + x  + x  + x  + x  + x + 1

より、

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

e13.batをmaximaで実行した。

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

read and interpret file: e13.bat
(%i3) for x from 2 while x < 20 do (y :
                2    3    4    5    6             2    3    4    5   23
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)= 23 22977497
        x= 3
factor(x)= 23 47 281 379 297659
        x= 4
factor(x)= 5039 19061983687739
        x= 5
factor(x)= 67 3037 2567351 89132789
        x= 6
factor(x)= 26003 5459161 51910784201
        x= 7
factor(x)= 11 251 109541687 1774362649343
        x= 8
factor(x)= 37 597459129787112647331413
        x= 9
factor(x)= 881 668291690452344662659661
        x= 10
factor(x)= 331 33568277945619335347435381
        x= 11
factor(x)= 41 1151 835937 1581611891 2542464949
        x= 12
factor(x)= 523 701 163487 30002702343088981021
        x= 13
factor(x)= 49801 9408980611 35842248277450831
        x= 14
factor(x)= 13 23 54958769 221489221 36534977490061
        x= 15
factor(x)= 27689657 1884299062631 17500523120623
        x= 16
factor(x)= 8876053 14872022387921 41956407492221
        x= 17
factor(x)= 288850419551303 104285929566907535147
        x= 18
factor(x)= 11 263 101513 14900097391253 33993392631463
        x= 19
factor(x)= 101 307 2179197900744883 9972992493796301
(%o3)                                done
(%o3)                               e13.bat
(%i4)

これより、b.txtは、以下のようになった。
23,2
23,3
47,3
281,3
379,3
67,5
11,7
251,7
37,8
881,9
331,10
41,11
523,12
701,12
13,14
23,14
11,18
263,18
101,19
307,19


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

生成されたa.batは、
factor((1^5+1^4+1^3+1^2+1+1)*1^23+1^6+1^5+1^4+1^3+1^2+1+1);
factor((4^5+4^4+4^3+4^2+4+1)*4^23+4^6+4^5+4^4+4^3+4^2+4+1);
factor((6^5+6^4+6^3+6^2+6+1)*6^23+6^6+6^5+6^4+6^3+6^2+6+1);
factor((13^5+13^4+13^3+13^2+13+1)*13^23+13^6+13^5+13^4+13^3+13^2+13+1);
factor((15^5+15^4+15^3+15^2+15+1)*15^23+15^6+15^5+15^4+15^3+15^2+15+1);
factor((16^5+16^4+16^3+16^2+16+1)*16^23+16^6+16^5+16^4+16^3+16^2+16+1);
factor((17^5+17^4+17^3+17^2+17+1)*17^23+17^6+17^5+17^4+17^3+17^2+17+1);
factor((20^5+20^4+20^3+20^2+20+1)*20^23+20^6+20^5+20^4+20^3+20^2+20+1);
factor((21^5+21^4+21^3+21^2+21+1)*21^23+21^6+21^5+21^4+21^3+21^2+21+1);
factor((22^5+22^4+22^3+22^2+22+1)*22^23+22^6+22^5+22^4+22^3+22^2+22+1);
factor((23^5+23^4+23^3+23^2+23+1)*23^23+23^6+23^5+23^4+23^3+23^2+23+1);
factor((24^5+24^4+24^3+24^2+24+1)*24^23+24^6+24^5+24^4+24^3+24^2+24+1);
factor((28^5+28^4+28^3+28^2+28+1)*28^23+28^6+28^5+28^4+28^3+28^2+28+1);
factor((30^5+30^4+30^3+30^2+30+1)*30^23+30^6+30^5+30^4+30^3+30^2+30+1);
factor((31^5+31^4+31^3+31^2+31+1)*31^23+31^6+31^5+31^4+31^3+31^2+31+1);
factor((32^5+32^4+32^3+32^2+32+1)*32^23+32^6+32^5+32^4+32^3+32^2+32+1);
factor((33^5+33^4+33^3+33^2+33+1)*33^23+33^6+33^5+33^4+33^3+33^2+33+1);
factor((34^5+34^4+34^3+34^2+34+1)*34^23+34^6+34^5+34^4+34^3+34^2+34+1);
factor((35^5+35^4+35^3+35^2+35+1)*35^23+35^6+35^5+35^4+35^3+35^2+35+1);
factor((36^5+36^4+36^3+36^2+36+1)*36^23+36^6+36^5+36^4+36^3+36^2+36+1);
factor((38^5+38^4+38^3+38^2+38+1)*38^23+38^6+38^5+38^4+38^3+38^2+38+1);
factor((39^5+39^4+39^3+39^2+39+1)*39^23+39^6+39^5+39^4+39^3+39^2+39+1);
factor((41^5+41^4+41^3+41^2+41+1)*41^23+41^6+41^5+41^4+41^3+41^2+41+1);
factor((42^5+42^4+42^3+42^2+42+1)*42^23+42^6+42^5+42^4+42^3+42^2+42+1);
factor((43^5+43^4+43^3+43^2+43+1)*43^23+43^6+43^5+43^4+43^3+43^2+43+1);
factor((44^5+44^4+44^3+44^2+44+1)*44^23+44^6+44^5+44^4+44^3+44^2+44+1);
factor((46^5+46^4+46^3+46^2+46+1)*46^23+46^6+46^5+46^4+46^3+46^2+46+1);
factor((47^5+47^4+47^3+47^2+47+1)*47^23+47^6+47^5+47^4+47^3+47^2+47+1);
factor((54^5+54^4+54^3+54^2+54+1)*54^23+54^6+54^5+54^4+54^3+54^2+54+1);
factor((55^5+55^4+55^3+55^2+55+1)*55^23+55^6+55^5+55^4+55^3+55^2+55+1);
factor((56^5+56^4+56^3+56^2+56+1)*56^23+56^6+56^5+56^4+56^3+56^2+56+1);
factor((57^5+57^4+57^3+57^2+57+1)*57^23+57^6+57^5+57^4+57^3+57^2+57+1);
factor((58^5+58^4+58^3+58^2+58+1)*58^23+58^6+58^5+58^4+58^3+58^2+58+1);
factor((59^5+59^4+59^3+59^2+59+1)*59^23+59^6+59^5+59^4+59^3+59^2+59+1);
factor((61^5+61^4+61^3+61^2+61+1)*61^23+61^6+61^5+61^4+61^3+61^2+61+1);
factor((63^5+63^4+63^3+63^2+63+1)*63^23+63^6+63^5+63^4+63^3+63^2+63+1);
factor((64^5+64^4+64^3+64^2+64+1)*64^23+64^6+64^5+64^4+64^3+64^2+64+1);
factor((65^5+65^4+65^3+65^2+65+1)*65^23+65^6+65^5+65^4+65^3+65^2+65+1);
factor((67^5+67^4+67^3+67^2+67+1)*67^23+67^6+67^5+67^4+67^3+67^2+67+1);
factor((68^5+68^4+68^3+68^2+68+1)*68^23+68^6+68^5+68^4+68^3+68^2+68+1);
factor((69^5+69^4+69^3+69^2+69+1)*69^23+69^6+69^5+69^4+69^3+69^2+69+1);
factor((70^5+70^4+70^3+70^2+70+1)*70^23+70^6+70^5+70^4+70^3+70^2+70+1);
factor((74^5+74^4+74^3+74^2+74+1)*74^23+74^6+74^5+74^4+74^3+74^2+74+1);
factor((75^5+75^4+75^3+75^2+75+1)*75^23+75^6+75^5+75^4+75^3+75^2+75+1);
factor((76^5+76^4+76^3+76^2+76+1)*76^23+76^6+76^5+76^4+76^3+76^2+76+1);
factor((77^5+77^4+77^3+77^2+77+1)*77^23+77^6+77^5+77^4+77^3+77^2+77+1);
factor((78^5+78^4+78^3+78^2+78+1)*78^23+78^6+78^5+78^4+78^3+78^2+78+1);
factor((80^5+80^4+80^3+80^2+80+1)*80^23+80^6+80^5+80^4+80^3+80^2+80+1);
factor((81^5+81^4+81^3+81^2+81+1)*81^23+81^6+81^5+81^4+81^3+81^2+81+1);
factor((85^5+85^4+85^3+85^2+85+1)*85^23+85^6+85^5+85^4+85^3+85^2+85+1);
factor((86^5+86^4+86^3+86^2+86+1)*86^23+86^6+86^5+86^4+86^3+86^2+86+1);
factor((87^5+87^4+87^3+87^2+87+1)*87^23+87^6+87^5+87^4+87^3+87^2+87+1);
factor((88^5+88^4+88^3+88^2+88+1)*88^23+88^6+88^5+88^4+88^3+88^2+88+1);
factor((89^5+89^4+89^3+89^2+89+1)*89^23+89^6+89^5+89^4+89^3+89^2+89+1);
factor((90^5+90^4+90^3+90^2+90+1)*90^23+90^6+90^5+90^4+90^3+90^2+90+1);
factor((91^5+91^4+91^3+91^2+91+1)*91^23+91^6+91^5+91^4+91^3+91^2+91+1);
factor((96^5+96^4+96^3+96^2+96+1)*96^23+96^6+96^5+96^4+96^3+96^2+96+1);
factor((98^5+98^4+98^3+98^2+98+1)*98^23+98^6+98^5+98^4+98^3+98^2+98+1);
factor((99^5+99^4+99^3+99^2+99+1)*99^23+99^6+99^5+99^4+99^3+99^2+99+1);
factor((100^5+100^4+100^3+100^2+100+1)*100^23+100^6+100^5+100^4+100^3+100^2+100+1);

実行結果を示す。

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

read and interpret file: a.bat
                      2    3    4    5    6             2    3    4    5   23
(%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   23
(%i6) factor(1 + 4 + 4  + 4  + 4  + 4  + 4  + (1 + 4 + 4  + 4  + 4  + 4 ) 4  )
(%o6)                         5039 19061983687739
                      2    3    4    5    6             2    3    4    5   23
(%i7) factor(1 + 6 + 6  + 6  + 6  + 6  + 6  + (1 + 6 + 6  + 6  + 6  + 6 ) 6  )
(%o7)                      26003 5459161 51910784201
                        2     3     4     5     6
(%i8) factor(1 + 13 + 13  + 13  + 13  + 13  + 13
                                                     2     3     4     5    23
                                       + (1 + 13 + 13  + 13  + 13  + 13 ) 13  )
(%o8)                 49801 9408980611 35842248277450831
                        2     3     4     5     6
(%i9) factor(1 + 15 + 15  + 15  + 15  + 15  + 15
                                                     2     3     4     5    23
                                       + (1 + 15 + 15  + 15  + 15  + 15 ) 15  )
(%o9)                27689657 1884299062631 17500523120623
                         2     3     4     5     6
(%i10) factor(1 + 16 + 16  + 16  + 16  + 16  + 16
                                                     2     3     4     5    23
                                       + (1 + 16 + 16  + 16  + 16  + 16 ) 16  )
(%o10)               8876053 14872022387921 41956407492221
                         2     3     4     5     6
(%i11) factor(1 + 17 + 17  + 17  + 17  + 17  + 17
                                                     2     3     4     5    23
                                       + (1 + 17 + 17  + 17  + 17  + 17 ) 17  )
(%o11)               288850419551303 104285929566907535147
                         2     3     4     5     6
(%i12) factor(1 + 20 + 20  + 20  + 20  + 20  + 20
                                                     2     3     4     5    23
                                       + (1 + 20 + 20  + 20  + 20  + 20 ) 20  )
(%o12)           107 21493 200293 36925024901 166130312421547
                         2     3     4     5     6
(%i13) factor(1 + 21 + 21  + 21  + 21  + 21  + 21
                                                     2     3     4     5    23
                                       + (1 + 21 + 21  + 21  + 21  + 21 ) 21  )
(%o13)             389 124301 228510059123871551424340389637
                         2     3     4     5     6
(%i14) factor(1 + 22 + 22  + 22  + 22  + 22  + 22
                                                     2     3     4     5    23
                                       + (1 + 22 + 22  + 22  + 22  + 22 ) 22  )
(%o14)             121486243 4347371636051 76786447606421627
                         2     3     4     5     6
(%i15) factor(1 + 23 + 23  + 23  + 23  + 23  + 23
                                                     2     3     4     5    23
                                       + (1 + 23 + 23  + 23  + 23  + 23 ) 23  )
(%o15)            61 3706111 6940701241 89543270455539004051
                         2     3     4     5     6
(%i16) factor(1 + 24 + 24  + 24  + 24  + 24  + 24
                                                     2     3     4     5    23
                                       + (1 + 24 + 24  + 24  + 24  + 24 ) 24  )
(%o16)            9120193 434006737 116653472546408849157961
                         2     3     4     5     6
(%i17) factor(1 + 28 + 28  + 28  + 28  + 28  + 28
                                                     2     3     4     5    23
                                       + (1 + 28 + 28  + 28  + 28  + 28 ) 28  )
(%o17)           167 7351 27999885150727886149880451079283213
                         2     3     4     5     6
(%i18) factor(1 + 30 + 30  + 30  + 30  + 30  + 30
                                                     2     3     4     5    23
                                       + (1 + 30 + 30  + 30  + 30  + 30 ) 30  )
(%o18)          227 295513 2702306029 1305513629501201914349189
                         2     3     4     5     6
(%i19) factor(1 + 31 + 31  + 31  + 31  + 31  + 31
                                                     2     3     4     5    23
                                       + (1 + 31 + 31  + 31  + 31  + 31 ) 31  )
(%o19)          101 11153300651 525585146160862392991492306183
                         2     3     4     5     6
(%i20) factor(1 + 32 + 32  + 32  + 32  + 32  + 32
                                                     2     3     4     5    23
                                       + (1 + 32 + 32  + 32  + 32  + 32 ) 32  )
(%o20)          9173 30727 9410244941 542444356470687829053991
                         2     3     4     5     6
(%i21) factor(1 + 33 + 33  + 33  + 33  + 33  + 33
                                                     2     3     4     5    23
                                       + (1 + 33 + 33  + 33  + 33  + 33 ) 33  )
(%o21)            3402156424937598317697805715832227814149581
素数ですね。
                         2     3     4     5     6
(%i22) factor(1 + 34 + 34  + 34  + 34  + 34  + 34
                                                     2     3     4     5    23
                                       + (1 + 34 + 34  + 34  + 34  + 34 ) 34  )
(%o22)         9733 390157 3438049 55464863849 10828255985108711
                         2     3     4     5     6
(%i23) factor(1 + 35 + 35  + 35  + 35  + 35  + 35
                                                     2     3     4     5    23
                                       + (1 + 35 + 35  + 35  + 35  + 35 ) 35  )
(%o23)         37 3559 9719 27060257586181 509343945771869454353
                         2     3     4     5     6
(%i24) factor(1 + 36 + 36  + 36  + 36  + 36  + 36
                                                     2     3     4     5    23
                                       + (1 + 36 + 36  + 36  + 36  + 36 ) 36  )
(%o24)        499 1019 3337711649 11475622031 1991611833354012827
                         2     3     4     5     6
(%i25) factor(1 + 38 + 38  + 38  + 38  + 38  + 38
                                                     2     3     4     5    23
                                       + (1 + 38 + 38  + 38  + 38  + 38 ) 38  )
(%o25)         1373347 53858513 464815835923 5119258029690000347
                         2     3     4     5     6
(%i26) factor(1 + 39 + 39  + 39  + 39  + 39  + 39
                                                     2     3     4     5    23
                                       + (1 + 39 + 39  + 39  + 39  + 39 ) 39  )
(%o26)         479 16175723 46977596392870597878639534393393133
                         2     3     4     5     6
(%i27) factor(1 + 41 + 41  + 41  + 41  + 41  + 41
                                                     2     3     4     5    23
                                       + (1 + 41 + 41  + 41  + 41  + 41 ) 41  )
(%o27)         66629 18897237132887 1171143858683357345650375951
                         2     3     4     5     6
(%i28) factor(1 + 42 + 42  + 42  + 42  + 42  + 42
                                                     2     3     4     5    23
                                       + (1 + 42 + 42  + 42  + 42  + 42 ) 42  )
(%o28)        197 56663 77659 3338012666401001906978584006997959
                         2     3     4     5     6
(%i29) factor(1 + 43 + 43  + 43  + 43  + 43  + 43
                                                     2     3     4     5    23
                                       + (1 + 43 + 43  + 43  + 43  + 43 ) 43  )
(%o29)          933739 5985637651862452010335112419769616364459
                         2     3     4     5     6
(%i30) factor(1 + 44 + 44  + 44  + 44  + 44  + 44
                                                     2     3     4     5    23
                                       + (1 + 44 + 44  + 44  + 44  + 44 ) 44  )
(%o30)        14591 13209471248681 55168181811240332018744350411
                         2     3     4     5     6
(%i31) factor(1 + 46 + 46  + 46  + 46  + 46  + 46
                                                     2     3     4     5    23
                                       + (1 + 46 + 46  + 46  + 46  + 46 ) 46  )
(%o31)       251 3221 12817367 5030216276744287 707480836777621877
                         2     3     4     5     6
(%i32) factor(1 + 47 + 47  + 47  + 47  + 47  + 47
                                                     2     3     4     5    23
                                       + (1 + 47 + 47  + 47  + 47  + 47 ) 47  )
(%o32)         2614242077287 25747451449410052143222503517219703
                         2     3     4     5     6
(%i33) factor(1 + 54 + 54  + 54  + 54  + 54  + 54
                                                     2     3     4     5    23
                                       + (1 + 54 + 54  + 54  + 54  + 54 ) 54  )
(%o33)      433 9241 55633 1080852755916079 13609346908432407585301
                         2     3     4     5     6
(%i34) factor(1 + 55 + 55  + 55  + 55  + 55  + 55
                                                     2     3     4     5    23
                                       + (1 + 55 + 55  + 55  + 55  + 55 ) 55  )
(%o34)      181 35961497849 1252317563293441 671264093075200705589
                         2     3     4     5     6
(%i35) factor(1 + 56 + 56  + 56  + 56  + 56  + 56
                                                     2     3     4     5    23
                                       + (1 + 56 + 56  + 56  + 56  + 56 ) 56  )
(%o35)     71 373 52561 1834067 12137871043 292348976675310384531211
                         2     3     4     5     6
(%i36) factor(1 + 57 + 57  + 57  + 57  + 57  + 57
                                                     2     3     4     5    23
                                       + (1 + 57 + 57  + 57  + 57  + 57 ) 57  )
(%o36)      3677 111731 11486071 3150242420793179081983442178416413
                         2     3     4     5     6
(%i37) factor(1 + 58 + 58  + 58  + 58  + 58  + 58
                                                     2     3     4     5    23
                                       + (1 + 58 + 58  + 58  + 58  + 58 ) 58  )
(%o37)       193 125308245317809274328705112526153064956456838967
                         2     3     4     5     6
(%i38) factor(1 + 59 + 59  + 59  + 59  + 59  + 59
                                                     2     3     4     5    23
                                       + (1 + 59 + 59  + 59  + 59  + 59 ) 59  )
(%o38)     461 3701 7643 164599 18178970362038906542700212215198733
                         2     3     4     5     6
(%i39) factor(1 + 61 + 61  + 61  + 61  + 61  + 61
                                                     2     3     4     5    23
                                       + (1 + 61 + 61  + 61  + 61  + 61 ) 61  )
(%o39)       109159 908561681324251259398170400771643588276006467
                         2     3     4     5     6
(%i40) factor(1 + 63 + 63  + 63  + 63  + 63  + 63
                                                     2     3     4     5    23
                                       + (1 + 63 + 63  + 63  + 63  + 63 ) 63  )
(%o40)        244615653268410484667939203895333855344377126272641
素数ですね。
                         2     3     4     5     6
(%i41) factor(1 + 64 + 64  + 64  + 64  + 64  + 64
                                                     2     3     4     5    23
                                       + (1 + 64 + 64  + 64  + 64  + 64 ) 64  )
(%o41)      2857 350087 90541019913143466809 4197078471811893444631
                         2     3     4     5     6
(%i42) factor(1 + 65 + 65  + 65  + 65  + 65  + 65
                                                     2     3     4     5    23
                                       + (1 + 65 + 65  + 65  + 65  + 65 ) 65  )
(%o42)      622493 184073356964977 5118962686630458348972953174081
                         2     3     4     5     6
(%i43) factor(1 + 67 + 67  + 67  + 67  + 67  + 67
                                                     2     3     4     5    23
                                       + (1 + 67 + 67  + 67  + 67  + 67 ) 67  )
(%o43)       3477456713168578741 393879710559640762940770425766501
                         2     3     4     5     6
(%i44) factor(1 + 68 + 68  + 68  + 68  + 68  + 68
                                                     2     3     4     5    23
                                       + (1 + 68 + 68  + 68  + 68  + 68 ) 68  )
(%o44)      811 1301 1965103888414925181809932183910702564281311491
                         2     3     4     5     6
(%i45) factor(1 + 69 + 69  + 69  + 69  + 69  + 69
                                                     2     3     4     5    23
                                       + (1 + 69 + 69  + 69  + 69  + 69 ) 69  )
(%o45)    127 547 953 3359 313901473 44691755405965265432539695973519
                         2     3     4     5     6
(%i46) factor(1 + 70 + 70  + 70  + 70  + 70  + 70
                                                     2     3     4     5    23
                                       + (1 + 70 + 70  + 70  + 70  + 70 ) 70  )
(%o46)      983 26484712701323 179244271822348210458219856650788719
                         2     3     4     5     6
(%i47) factor(1 + 74 + 74  + 74  + 74  + 74  + 74
                                                     2     3     4     5    23
                                       + (1 + 74 + 74  + 74  + 74  + 74 ) 74  )
(%o47)   269 353 8839 335057 6666443039 11788377219074386599742126219
                         2     3     4     5     6
(%i48) factor(1 + 75 + 75  + 75  + 75  + 75  + 75
                                                     2     3     4     5    23
                                       + (1 + 75 + 75  + 75  + 75  + 75 ) 75  )
(%o48)       32176953183605646678984157915692776441574277063318201
素数ですね。
                         2     3     4     5     6
(%i49) factor(1 + 76 + 76  + 76  + 76  + 76  + 76
                                                     2     3     4     5    23
                                       + (1 + 76 + 76  + 76  + 76  + 76 ) 76  )
(%o49)      7673 6075299806482670280839613715155710528328006506181
                         2     3     4     5     6
(%i50) factor(1 + 77 + 77  + 77  + 77  + 77  + 77
                                                     2     3     4     5    23
                                       + (1 + 77 + 77  + 77  + 77  + 77 ) 77  )
(%o50)     5435897 82595278259873 149689382904505127911629757119901
                         2     3     4     5     6
(%i51) factor(1 + 78 + 78  + 78  + 78  + 78  + 78
                                                     2     3     4     5    23
                                       + (1 + 78 + 78  + 78  + 78  + 78 ) 78  )
(%o51)     455755038428483 1517060700134383 139482048283872414204839
                         2     3     4     5     6
(%i52) factor(1 + 80 + 80  + 80  + 80  + 80  + 80
                                                     2     3     4     5    23
                                       + (1 + 80 + 80  + 80  + 80  + 80 ) 80  )
(%o52)      6257460488177302633 31302888586169990841509482046834857
                         2     3     4     5     6
(%i53) factor(1 + 81 + 81  + 81  + 81  + 81  + 81
                                                     2     3     4     5    23
                                       + (1 + 81 + 81  + 81  + 81  + 81 ) 81  )
(%o53)      72749840931459737 3811917672343373755207486767508875509
                         2     3     4     5     6
(%i54) factor(1 + 85 + 85  + 85  + 85  + 85  + 85
                                                     2     3     4     5    23
                                       + (1 + 85 + 85  + 85  + 85  + 85 ) 85  )
(%o54)    1237 26783 32258237770861742230719337858884007607008998191
                         2     3     4     5     6
(%i55) factor(1 + 86 + 86  + 86  + 86  + 86  + 86
                                                     2     3     4     5    23
                                       + (1 + 86 + 86  + 86  + 86  + 86 ) 86  )
(%o55)    2213 13567 49382255417503074222246821060843424713888735993
                         2     3     4     5     6
(%i56) factor(1 + 87 + 87  + 87  + 87  + 87  + 87
                                                     2     3     4     5    23
                                       + (1 + 87 + 87  + 87  + 87  + 87 ) 87  )
(%o56)   577 195343 24864214901 7998730313837 91409304241147601125903
                         2     3     4     5     6
(%i57) factor(1 + 88 + 88  + 88  + 88  + 88  + 88
                                                     2     3     4     5    23
                                       + (1 + 88 + 88  + 88  + 88  + 88 ) 88  )
(%o57)    8677 121577922969473 2674569714941006493682601948319702821
                         2     3     4     5     6
(%i58) factor(1 + 89 + 89  + 89  + 89  + 89  + 89
                                                     2     3     4     5    23
                                       + (1 + 89 + 89  + 89  + 89  + 89 ) 89  )
(%o58)   293 18191 3072261333769 236398747545498134956704820633199263
                         2     3     4     5     6
(%i59) factor(1 + 90 + 90  + 90  + 90  + 90  + 90
                                                     2     3     4     5    23
                                       + (1 + 90 + 90  + 90  + 90  + 90 ) 90  )
(%o59)    331 380085157 42066256280176490928725254416008978777575873
                         2     3     4     5     6
(%i60) factor(1 + 91 + 91  + 91  + 91  + 91  + 91
                                                     2     3     4     5    23
                                       + (1 + 91 + 91  + 91  + 91  + 91 ) 91  )
(%o60)    52698852970597 146338703955047 934969622891554269894651347
                         2     3     4     5     6
(%i61) factor(1 + 96 + 96  + 96  + 96  + 96  + 96
                                                     2     3     4     5    23
                                       + (1 + 96 + 96  + 96  + 96  + 96 ) 96  )
(%o61)   2389 108294375905555517332129 124543222952489785071744587453
                         2     3     4     5     6
(%i62) factor(1 + 98 + 98  + 98  + 98  + 98  + 98
                                                     2     3     4     5    23
                                       + (1 + 98 + 98  + 98  + 98  + 98 ) 98  )
(%o62)    2129 26953104764854028610224153726760733138597840729370159
                         2     3     4     5     6
(%i63) factor(1 + 99 + 99  + 99  + 99  + 99  + 99
                                                     2     3     4     5    23
                                       + (1 + 99 + 99  + 99  + 99  + 99 ) 99  )
(%o63)     76242050441918650235952161755832813117631420099783839401
素数ですね。
                           2      3      4      5      6
(%i64) factor(1 + 100 + 100  + 100  + 100  + 100  + 100
                                                 2      3      4      5     23
                                 + (1 + 100 + 100  + 100  + 100  + 100 ) 100  )
(%o64)    80332002847 1257407974781649850578136675347867416280205483
(%o64)                               a.bat
(%i65)

b.txtに追加されるものは、
107,20
389,21
61,23
167,28
227,30
101,31
37,35
499,36
479,39
197,42
251,46
433,54
181,55
71,56
373,56
193,58
461,59
811,68
127,69
983,70
269,74
353,74
577,87
293,89
331,90
これより、Autohajiku.cの
#define max 1 /* この数から+100まで生成する */

#define max 100 /* この数から+100まで生成する */
になおして、
Autohajiku.cをコンパイル実行する。
$gcc -Wall Autohajiku.c -o Autohajiku
$./Autohajiku
23n+2
23n+3
47n+3
281n+3
379n+3
67n+5
11n+7
251n+7
37n+8
881n+9
331n+10
41n+11
523n+12
701n+12
13n+14
23n+14
11n+18
263n+18
101n+19
307n+19
107n+20
389n+21
61n+23
167n+28
227n+30
101n+31
37n+35
499n+36
479n+39
197n+42
251n+46
433n+54
181n+55
71n+56
373n+56
193n+58
461n+59
811n+68
127n+69
983n+70
269n+74
353n+74
577n+87
293n+89
331n+90
b.txt read!  45 個 
$gcc -Wall hajiku-6.c -o hajiku-6
$./hajiku-6
!!! 100 !!!
!!! 101 !!!
!!! 102 !!!
!!! 103 !!!
!!! 104 !!!
105=13x7+14
106=11x9+7
106=23x4+14
106=11x8+18
!!! 107 !!!
!!! 108 !!!
109=37x2+35
!!! 110 !!!
!!! 111 !!!
!!! 112 !!!
!!! 113 !!!
!!! 114 !!!
!!! 115 !!!
!!! 116 !!!
117=23x5+2
117=11x10+7
117=11x9+18
118=23x5+3
118=13x8+14
119=37x3+8
120=101x1+19
!!! 121 !!!
!!! 122 !!!
!!! 123 !!!
!!! 124 !!!
!!! 125 !!!
!!! 126 !!!
127=107x1+20
127=71x1+56
128=11x11+7
128=11x10+18
129=23x5+14
!!! 130 !!!
131=13x9+14
132=101x1+31
!!! 133 !!!
134=41x3+11
!!! 135 !!!
!!! 136 !!!
!!! 137 !!!
!!! 138 !!!
139=67x2+5
139=11x12+7
139=11x11+18
140=23x6+2
141=23x6+3
!!! 142 !!!
!!! 143 !!!
144=47x3+3
144=13x10+14
145=61x2+23
146=37x3+35
!!! 147 !!!
!!! 148 !!!
!!! 149 !!!
150=11x13+7
150=11x12+18
!!! 151 !!!
152=23x6+14
!!! 153 !!!
!!! 154 !!!
!!! 155 !!!
156=37x4+8
157=13x11+14
!!! 158 !!!
!!! 159 !!!
!!! 160 !!!
161=11x14+7
161=11x13+18
!!! 162 !!!
163=23x7+2
164=23x7+3
!!! 165 !!!
!!! 166 !!!
!!! 167 !!!
!!! 168 !!!
!!! 169 !!!
170=13x12+14
!!! 171 !!!
172=11x15+7
172=11x14+18
!!! 173 !!!
!!! 174 !!!
175=41x4+11
175=23x7+14
!!! 176 !!!
!!! 177 !!!
!!! 178 !!!
!!! 179 !!!
!!! 180 !!!
!!! 181 !!!
!!! 182 !!!
183=11x16+7
183=13x13+14
183=11x15+18
183=37x4+35
!!! 184 !!!
!!! 185 !!!
186=23x8+2
187=23x8+3
!!! 188 !!!
!!! 189 !!!
!!! 190 !!!
191=47x4+3
!!! 192 !!!
193=37x5+8
194=11x17+7
194=11x16+18
195=167x1+28
196=13x14+14
196=127x1+69
!!! 197 !!!
198=23x8+14
198=71x2+56
!!! 199 !!!


生成されたa.batは、
factor((100^5+100^4+100^3+100^2+100+1)*100^23+100^6+100^5+100^4+100^3+100^2+100+1);
factor((101^5+101^4+101^3+101^2+101+1)*101^23+101^6+101^5+101^4+101^3+101^2+101+1);
factor((102^5+102^4+102^3+102^2+102+1)*102^23+102^6+102^5+102^4+102^3+102^2+102+1);
factor((103^5+103^4+103^3+103^2+103+1)*103^23+103^6+103^5+103^4+103^3+103^2+103+1);
factor((104^5+104^4+104^3+104^2+104+1)*104^23+104^6+104^5+104^4+104^3+104^2+104+1);
factor((107^5+107^4+107^3+107^2+107+1)*107^23+107^6+107^5+107^4+107^3+107^2+107+1);
factor((108^5+108^4+108^3+108^2+108+1)*108^23+108^6+108^5+108^4+108^3+108^2+108+1);
factor((110^5+110^4+110^3+110^2+110+1)*110^23+110^6+110^5+110^4+110^3+110^2+110+1);
factor((111^5+111^4+111^3+111^2+111+1)*111^23+111^6+111^5+111^4+111^3+111^2+111+1);
factor((112^5+112^4+112^3+112^2+112+1)*112^23+112^6+112^5+112^4+112^3+112^2+112+1);
factor((113^5+113^4+113^3+113^2+113+1)*113^23+113^6+113^5+113^4+113^3+113^2+113+1);
factor((114^5+114^4+114^3+114^2+114+1)*114^23+114^6+114^5+114^4+114^3+114^2+114+1);
factor((115^5+115^4+115^3+115^2+115+1)*115^23+115^6+115^5+115^4+115^3+115^2+115+1);
factor((116^5+116^4+116^3+116^2+116+1)*116^23+116^6+116^5+116^4+116^3+116^2+116+1);
factor((121^5+121^4+121^3+121^2+121+1)*121^23+121^6+121^5+121^4+121^3+121^2+121+1);
factor((122^5+122^4+122^3+122^2+122+1)*122^23+122^6+122^5+122^4+122^3+122^2+122+1);
factor((123^5+123^4+123^3+123^2+123+1)*123^23+123^6+123^5+123^4+123^3+123^2+123+1);
factor((124^5+124^4+124^3+124^2+124+1)*124^23+124^6+124^5+124^4+124^3+124^2+124+1);
factor((125^5+125^4+125^3+125^2+125+1)*125^23+125^6+125^5+125^4+125^3+125^2+125+1);
factor((126^5+126^4+126^3+126^2+126+1)*126^23+126^6+126^5+126^4+126^3+126^2+126+1);
factor((130^5+130^4+130^3+130^2+130+1)*130^23+130^6+130^5+130^4+130^3+130^2+130+1);
factor((133^5+133^4+133^3+133^2+133+1)*133^23+133^6+133^5+133^4+133^3+133^2+133+1);
factor((135^5+135^4+135^3+135^2+135+1)*135^23+135^6+135^5+135^4+135^3+135^2+135+1);
factor((136^5+136^4+136^3+136^2+136+1)*136^23+136^6+136^5+136^4+136^3+136^2+136+1);
factor((137^5+137^4+137^3+137^2+137+1)*137^23+137^6+137^5+137^4+137^3+137^2+137+1);
factor((138^5+138^4+138^3+138^2+138+1)*138^23+138^6+138^5+138^4+138^3+138^2+138+1);
factor((142^5+142^4+142^3+142^2+142+1)*142^23+142^6+142^5+142^4+142^3+142^2+142+1);
factor((143^5+143^4+143^3+143^2+143+1)*143^23+143^6+143^5+143^4+143^3+143^2+143+1);
factor((147^5+147^4+147^3+147^2+147+1)*147^23+147^6+147^5+147^4+147^3+147^2+147+1);
factor((148^5+148^4+148^3+148^2+148+1)*148^23+148^6+148^5+148^4+148^3+148^2+148+1);
factor((149^5+149^4+149^3+149^2+149+1)*149^23+149^6+149^5+149^4+149^3+149^2+149+1);
factor((151^5+151^4+151^3+151^2+151+1)*151^23+151^6+151^5+151^4+151^3+151^2+151+1);
factor((153^5+153^4+153^3+153^2+153+1)*153^23+153^6+153^5+153^4+153^3+153^2+153+1);
factor((154^5+154^4+154^3+154^2+154+1)*154^23+154^6+154^5+154^4+154^3+154^2+154+1);
factor((155^5+155^4+155^3+155^2+155+1)*155^23+155^6+155^5+155^4+155^3+155^2+155+1);
factor((158^5+158^4+158^3+158^2+158+1)*158^23+158^6+158^5+158^4+158^3+158^2+158+1);
factor((159^5+159^4+159^3+159^2+159+1)*159^23+159^6+159^5+159^4+159^3+159^2+159+1);
factor((160^5+160^4+160^3+160^2+160+1)*160^23+160^6+160^5+160^4+160^3+160^2+160+1);
factor((162^5+162^4+162^3+162^2+162+1)*162^23+162^6+162^5+162^4+162^3+162^2+162+1);
factor((165^5+165^4+165^3+165^2+165+1)*165^23+165^6+165^5+165^4+165^3+165^2+165+1);
factor((166^5+166^4+166^3+166^2+166+1)*166^23+166^6+166^5+166^4+166^3+166^2+166+1);
factor((167^5+167^4+167^3+167^2+167+1)*167^23+167^6+167^5+167^4+167^3+167^2+167+1);
factor((168^5+168^4+168^3+168^2+168+1)*168^23+168^6+168^5+168^4+168^3+168^2+168+1);
factor((169^5+169^4+169^3+169^2+169+1)*169^23+169^6+169^5+169^4+169^3+169^2+169+1);
factor((171^5+171^4+171^3+171^2+171+1)*171^23+171^6+171^5+171^4+171^3+171^2+171+1);
factor((173^5+173^4+173^3+173^2+173+1)*173^23+173^6+173^5+173^4+173^3+173^2+173+1);
factor((174^5+174^4+174^3+174^2+174+1)*174^23+174^6+174^5+174^4+174^3+174^2+174+1);
factor((176^5+176^4+176^3+176^2+176+1)*176^23+176^6+176^5+176^4+176^3+176^2+176+1);
factor((177^5+177^4+177^3+177^2+177+1)*177^23+177^6+177^5+177^4+177^3+177^2+177+1);
factor((178^5+178^4+178^3+178^2+178+1)*178^23+178^6+178^5+178^4+178^3+178^2+178+1);
factor((179^5+179^4+179^3+179^2+179+1)*179^23+179^6+179^5+179^4+179^3+179^2+179+1);
factor((180^5+180^4+180^3+180^2+180+1)*180^23+180^6+180^5+180^4+180^3+180^2+180+1);
factor((181^5+181^4+181^3+181^2+181+1)*181^23+181^6+181^5+181^4+181^3+181^2+181+1);
factor((182^5+182^4+182^3+182^2+182+1)*182^23+182^6+182^5+182^4+182^3+182^2+182+1);
factor((184^5+184^4+184^3+184^2+184+1)*184^23+184^6+184^5+184^4+184^3+184^2+184+1);
factor((185^5+185^4+185^3+185^2+185+1)*185^23+185^6+185^5+185^4+185^3+185^2+185+1);
factor((188^5+188^4+188^3+188^2+188+1)*188^23+188^6+188^5+188^4+188^3+188^2+188+1);
factor((189^5+189^4+189^3+189^2+189+1)*189^23+189^6+189^5+189^4+189^3+189^2+189+1);
factor((190^5+190^4+190^3+190^2+190+1)*190^23+190^6+190^5+190^4+190^3+190^2+190+1);
factor((192^5+192^4+192^3+192^2+192+1)*192^23+192^6+192^5+192^4+192^3+192^2+192+1);
factor((197^5+197^4+197^3+197^2+197+1)*197^23+197^6+197^5+197^4+197^3+197^2+197+1);
factor((199^5+199^4+199^3+199^2+199+1)*199^23+199^6+199^5+199^4+199^3+199^2+199+1);

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

read and interpret file: a.bat
                           2      3      4      5      6
(%i66) factor(1 + 100 + 100  + 100  + 100  + 100  + 100
                                                 2      3      4      5     23
                                 + (1 + 100 + 100  + 100  + 100  + 100 ) 100  )
(%o66)    80332002847 1257407974781649850578136675347867416280205483
                           2      3      4      5      6
(%i67) factor(1 + 101 + 101  + 101  + 101  + 101  + 101
                                                 2      3      4      5     23
                                 + (1 + 101 + 101  + 101  + 101  + 101 ) 101  )
(%o67)   1021 47531662365577275242494537 2749863231527399984359843969
                           2      3      4      5      6
(%i68) factor(1 + 102 + 102  + 102  + 102  + 102  + 102
                                                 2      3      4      5     23
                                 + (1 + 102 + 102  + 102  + 102  + 102 ) 102  )
(%o68)   2790143 1982011663 31794422374454095905011747107360636667459
                           2      3      4      5      6
(%i69) factor(1 + 103 + 103  + 103  + 103  + 103  + 103
                                                 2      3      4      5     23
                                 + (1 + 103 + 103  + 103  + 103  + 103 ) 103  )
(%o69)  439 4312317497 1151135471813 106017524469780985995215152700899
                           2      3      4      5      6
(%i70) factor(1 + 104 + 104  + 104  + 104  + 104  + 104
                                                 2      3      4      5     23
                                 + (1 + 104 + 104  + 104  + 104  + 104 ) 104  )
(%o70)  211127617 391308709643 1562645427001264079 2345333513088383029
                           2      3      4      5      6
(%i71) factor(1 + 107 + 107  + 107  + 107  + 107  + 107
                                                 2      3      4      5     23
                                 + (1 + 107 + 107  + 107  + 107  + 107 ) 107  )
(%o71)    170243956835434503325783 3942320995547224062435692829900847
                           2      3      4      5      6
(%i72) factor(1 + 108 + 108  + 108  + 108  + 108  + 108
                                                 2      3      4      5     23
                                 + (1 + 108 + 108  + 108  + 108  + 108 ) 108  )
(%o72)    8713 99939556396922651864472660914169894865556324652073237
                           2      3      4      5      6
(%i73) factor(1 + 110 + 110  + 110  + 110  + 110  + 110
                                                 2      3      4      5     23
                                 + (1 + 110 + 110  + 110  + 110  + 110 ) 110  )
(%o73)    1455329630431739581808423364696104100000000001787813853211
素数ですね。
                           2      3      4      5      6
(%i74) factor(1 + 111 + 111  + 111  + 111  + 111  + 111
                                                 2      3      4      5     23
                                 + (1 + 111 + 111  + 111  + 111  + 111 ) 111  )
(%o74)   20472968171 3105553259201 29488583179359844981687574885499043
                           2      3      4      5      6
(%i75) factor(1 + 112 + 112  + 112  + 112  + 112  + 112
                                                 2      3      4      5     23
                                 + (1 + 112 + 112  + 112  + 112  + 112 ) 112  )
(%o75)    83 29034983680761554625997387268519718474498977058717871787
                           2      3      4      5      6
(%i76) factor(1 + 113 + 113  + 113  + 113  + 113  + 113
                                                 2      3      4      5     23
                                 + (1 + 113 + 113  + 113  + 113  + 113 ) 113  )
(%o76) 367 977 642683 100958020600134629797 132849086047262506210570549
                           2      3      4      5      6
(%i77) factor(1 + 114 + 114  + 114  + 114  + 114  + 114
                                                 2      3      4      5     23
                                 + (1 + 114 + 114  + 114  + 114  + 114 ) 114  )
(%o77)    883 4479211213210163979249909495786749370780019137816800917
                           2      3      4      5      6
(%i78) factor(1 + 115 + 115  + 115  + 115  + 115  + 115
                                                 2      3      4      5     23
                                 + (1 + 115 + 115  + 115  + 115  + 115 ) 115  )
(%o78)  229 1453 15178589727401565089325956783840817600650582316121993
                           2      3      4      5      6
(%i79) factor(1 + 116 + 116  + 116  + 116  + 116  + 116
                                                 2      3      4      5     23
                                 + (1 + 116 + 116  + 116  + 116  + 116 ) 116  )
(%o79) 769 2081 904887649 10696319165099 415486018048949437081397872207
                           2      3      4      5      6
(%i80) factor(1 + 121 + 121  + 121  + 121  + 121  + 121
                                                 2      3      4      5     23
                                 + (1 + 121 + 121  + 121  + 121  + 121 ) 121  )
(%o80)   4951421819819210231281 4235108752364705435981936981130294253
                           2      3      4      5      6
(%i81) factor(1 + 122 + 122  + 122  + 122  + 122  + 122
                                                 2      3      4      5     23
                                 + (1 + 122 + 122  + 122  + 122  + 122 ) 122  )
(%o81)  167 199 794474882957275479021903282590431543864777898976040967
                           2      3      4      5      6
(%i82) factor(1 + 123 + 123  + 123  + 123  + 123  + 123
                                                 2      3      4      5     23
                                 + (1 + 123 + 123  + 123  + 123  + 123 ) 123  )
(%o82) 1070369 174735436663 6249791140336379 28386273628528686861462397
                           2      3      4      5      6
(%i83) factor(1 + 124 + 124  + 124  + 124  + 124  + 124
                                                 2      3      4      5     23
                                 + (1 + 124 + 124  + 124  + 124  + 124 ) 124  )
(%o83)  1801 56545110446287 408709741138756535481853149930608949989323
                           2      3      4      5      6
(%i84) factor(1 + 125 + 125  + 125  + 125  + 125  + 125
                                                 2      3      4      5     23
                                 + (1 + 125 + 125  + 125  + 125  + 125 ) 125  )
(%o2)   127 607628616496672055166263 675346653510967374519438723729101
                          2      3      4      5      6
(%i3) factor(1 + 126 + 126  + 126  + 126  + 126  + 126
                                                 2      3      4      5     23
                                 + (1 + 126 + 126  + 126  + 126  + 126 ) 126  )
(%o3)   279619 39880316012618158530823 5841313647530837878870339913599
                          2      3      4      5      6
(%i4) factor(1 + 130 + 130  + 130  + 130  + 130  + 130
                                                 2      3      4      5     23
                                 + (1 + 130 + 130  + 130  + 130  + 130 ) 130  )
(%o4)    51257 3047995508188775984056789721220999486899350332732392183
                          2      3      4      5      6
(%i5) factor(1 + 133 + 133  + 133  + 133  + 133  + 133
                                                 2      3      4      5     23
                                 + (1 + 133 + 133  + 133  + 133  + 133 ) 133  )
(%o5)   128321 267131327 8631794648935832338053995802889474151890287643
                          2      3      4      5      6
(%i6) factor(1 + 135 + 135  + 135  + 135  + 135  + 135
                                                 2      3      4      5     23
                                 + (1 + 135 + 135  + 135  + 135  + 135 ) 135  )
(%o6)  83 593 128819 70869893279194045940408036634465620843299285267001
                          2      3      4      5      6
(%i7) factor(1 + 136 + 136  + 136  + 136  + 136  + 136
                                                 2      3      4      5     23
                                 + (1 + 136 + 136  + 136  + 136  + 136 ) 136  )
(%o7)    552452030637088490198138135158517962966359612525581149092553
素数ですね。
                          2      3      4      5      6
(%i8) factor(1 + 137 + 137  + 137  + 137  + 137  + 137
                                                 2      3      4      5     23
                                 + (1 + 137 + 137  + 137  + 137  + 137 ) 137  )
(%o8)  293 24032653301 570338224354487854973 168871250093473292129260889
                          2      3      4      5      6
(%i9) factor(1 + 138 + 138  + 138  + 138  + 138  + 138
                                                 2      3      4      5     23
                                 + (1 + 138 + 138  + 138  + 138  + 138 ) 138  )
(%o9)  38371 317857 230392145527597 295849181150289964574807247732766849
                           2      3      4      5      6
(%i10) factor(1 + 142 + 142  + 142  + 142  + 142  + 142
                                                 2      3      4      5     23
                                 + (1 + 142 + 142  + 142  + 142  + 142 ) 142  )
(%o10) 2891639 427194049 21562357015995228386827 69450819435028994074103
                           2      3      4      5      6
(%i11) factor(1 + 143 + 143  + 143  + 143  + 143  + 143
                                                 2      3      4      5     23
                                 + (1 + 143 + 143  + 143  + 143  + 143 ) 143  )
(%o11)   2251421152800773478793393537762901445381647861524283150090401
素数ですね。
                           2      3      4      5      6
(%i12) factor(1 + 147 + 147  + 147  + 147  + 147  + 147
                                                 2      3      4      5     23
                                 + (1 + 147 + 147  + 147  + 147  + 147 ) 147  )
(%o12) 51593 574855563428384279 7306444247736638317 22490248633908615139
                           2      3      4      5      6
(%i13) factor(1 + 148 + 148  + 148  + 148  + 148  + 148
                                                 2      3      4      5     23
                                 + (1 + 148 + 148  + 148  + 148  + 148 ) 148  )
(%o13) 593 1327168287575572863517 7486722268124043736450484701668633881
                           2      3      4      5      6
(%i14) factor(1 + 149 + 149  + 149  + 149  + 149  + 149
                                                 2      3      4      5     23
                                 + (1 + 149 + 149  + 149  + 149  + 149 ) 149  )
(%o14) 109 1566260296252499941 41672507330122554746429709638945375167429
                           2      3      4      5      6
(%i15) factor(1 + 151 + 151  + 151  + 151  + 151  + 151
                                                 2      3      4      5     23
                                 + (1 + 151 + 151  + 151  + 151  + 151 ) 151  )
(%o15)  675223570251734279 15303565212148547627873436923387213391855047
                           2      3      4      5      6
(%i16) factor(1 + 153 + 153  + 153  + 153  + 153  + 153
                                                 2      3      4      5     23
                                 + (1 + 153 + 153  + 153  + 153  + 153 ) 153  )
(%o16) 468737 21032170499 1514937011099870485269446944521961406313899167
                           2      3      4      5      6
(%i17) factor(1 + 154 + 154  + 154  + 154  + 154  + 154
                                                 2      3      4      5     23
                                 + (1 + 154 + 154  + 154  + 154  + 154 ) 154  )
(%o17) 157 379 17681 1111397165280719 15328318017803747149912845626249396263
                           2      3      4      5      6
(%i18) factor(1 + 155 + 155  + 155  + 155  + 155  + 155
                                                 2      3      4      5     23
                                 + (1 + 155 + 155  + 155  + 155  + 155 ) 155  )
(%o18) 440329 464591 94934753 1106178517199661795133396472307658737738943
                           2      3      4      5      6
(%i19) factor(1 + 158 + 158  + 158  + 158  + 158  + 158
                                                 2      3      4      5     23
                                 + (1 + 158 + 158  + 158  + 158  + 158 ) 158  )
(%o19) 5237 10177464863 10019522183178223 68799720284316185979038330339887
                           2      3      4      5      6
(%i20) factor(1 + 159 + 159  + 159  + 159  + 159  + 159
                                                 2      3      4      5     23
                                 + (1 + 159 + 159  + 159  + 159  + 159 ) 159  )
(%o20) 245650513 37335381205273 4779926878083544848157465352057292058009
                           2      3      4      5      6
(%i21) factor(1 + 160 + 160  + 160  + 160  + 160  + 160
                                                 2      3      4      5     23
                                 + (1 + 160 + 160  + 160  + 160  + 160 ) 160  )
(%o21) 27487831747 1900823921548445913928746178760633236263966135081163
                           2      3      4      5      6
(%i22) factor(1 + 162 + 162  + 162  + 162  + 162  + 162
                                                 2      3      4      5     23
                                 + (1 + 162 + 162  + 162  + 162  + 162 ) 162  )
(%o22) 677 3577976628982176391 30541008758736050486226582057576538550453
                           2      3      4      5      6
(%i23) factor(1 + 165 + 165  + 165  + 165  + 165  + 165
                                                 2      3      4      5     23
                                 + (1 + 165 + 165  + 165  + 165  + 165 ) 165  )
(%o23) 2625061 11256163 1250503351 54329750327 61593969238103112923886375131
                           2      3      4      5      6
(%i24) factor(1 + 166 + 166  + 166  + 166  + 166  + 166
                                                 2      3      4      5     23
                                 + (1 + 166 + 166  + 166  + 166  + 166 ) 166  )
(%o24) 29281843 27567496714945919 181407346034167016723473751144214162719
                           2      3      4      5      6
(%i25) factor(1 + 167 + 167  + 167  + 167  + 167  + 167
                                                 2      3      4      5     23
                                 + (1 + 167 + 167  + 167  + 167  + 167 ) 167  )
(%o25) 446501887372501117 376646241492327882703 1030178870950908177010891
                           2      3      4      5      6
(%i26) factor(1 + 168 + 168  + 168  + 168  + 168  + 168
                                                 2      3      4      5     23
                                 + (1 + 168 + 168  + 168  + 168  + 168 ) 168  )
(%o26) 50047 295645367 13838963754057499973684705167455695817376759894049
                           2      3      4      5      6
(%i27) factor(1 + 169 + 169  + 169  + 169  + 169  + 169
                                                 2      3      4      5     23
                                 + (1 + 169 + 169  + 169  + 169  + 169 ) 169  )
(%o27) 2029 110325217821251 1080061067334571510735295113429355373215501339
                           2      3      4      5      6
(%i28) factor(1 + 171 + 171  + 171  + 171  + 171  + 171
                                                 2      3      4      5     23
                                 + (1 + 171 + 171  + 171  + 171  + 171 ) 171  )
(%o28) 9281 239287 151329780606509196921581501130600232784147278985957519
                           2      3      4      5      6
(%i29) factor(1 + 173 + 173  + 173  + 173  + 173  + 173
                                                 2      3      4      5     23
                                 + (1 + 173 + 173  + 173  + 173  + 173 ) 173  )
(%o29) 24529500509 18972293695569832302825704797976030141508361529807129
                           2      3      4      5      6
(%i30) factor(1 + 174 + 174  + 174  + 174  + 174  + 174
                                                 2      3      4      5     23
                                 + (1 + 174 + 174  + 174  + 174  + 174 ) 174  )
(%o30) 3413 1048601 58811015199697 94848391451520701 27393460287592495505891
                           2      3      4      5      6
(%i31) factor(1 + 176 + 176  + 176  + 176  + 176  + 176
                                                 2      3      4      5     23
                                 + (1 + 176 + 176  + 176  + 176  + 176 ) 176  )
(%o31) 277 673 1877 12755404323591929 168723657987594293383868474369472879841
                           2      3      4      5      6
(%i32) factor(1 + 177 + 177  + 177  + 177  + 177  + 177
                                                 2      3      4      5     23
                                 + (1 + 177 + 177  + 177  + 177  + 177 ) 177  )
(%o32) 278147 208967371 15183056131150450909809929211785936150167923899213
                           2      3      4      5      6
(%i33) factor(1 + 178 + 178  + 178  + 178  + 178  + 178
                                                 2      3      4      5     23
                                 + (1 + 178 + 178  + 178  + 178  + 178 ) 178  )
(%o33) 541 1909895192291968491040222779005284417068314435050507104140731
                           2      3      4      5      6
(%i34) factor(1 + 179 + 179  + 179  + 179  + 179  + 179
                                                 2      3      4      5     23
                                 + (1 + 179 + 179  + 179  + 179  + 179 ) 179  )
(%o34) 331794109 15352712580397 237281623797094872925165156292857281474577
                           2      3      4      5      6
(%i35) factor(1 + 180 + 180  + 180  + 180  + 180  + 180
                                                 2      3      4      5     23
                                 + (1 + 180 + 180  + 180  + 180  + 180 ) 180  )
(%o35) 119645986973 694934518713347894647 16990556195568592211890832679551
                           2      3      4      5      6
(%i36) factor(1 + 181 + 181  + 181  + 181  + 181  + 181
                                                 2      3      4      5     23
                                 + (1 + 181 + 181  + 181  + 181  + 181 ) 181  )
(%o36) 148471151 12407305873 281689358190307 3179187641994491770051903096553
                           2      3      4      5      6
(%i37) factor(1 + 182 + 182  + 182  + 182  + 182  + 182
                                                 2      3      4      5     23
                                 + (1 + 182 + 182  + 182  + 182  + 182 ) 182  )
(%o37) 224909 8558247504136066117399787532098153230632784463772983112239
                           2      3      4      5      6
(%i38) factor(1 + 184 + 184  + 184  + 184  + 184  + 184
                                                 2      3      4      5     23
                                 + (1 + 184 + 184  + 184  + 184  + 184 ) 184  )
(%o38) 35339 39107 2466426929431981141 766811763488603613345785745915651637
                           2      3      4      5      6
(%i39) factor(1 + 185 + 185  + 185  + 185  + 185  + 185
                                                 2      3      4      5     23
                                 + (1 + 185 + 185  + 185  + 185  + 185 ) 185  )
(%o39) 973549589611 19054969172111 163981921909939172101329607694546850041
                           2      3      4      5      6
(%i40) factor(1 + 188 + 188  + 188  + 188  + 188  + 188
                                                 2      3      4      5     23
                                 + (1 + 188 + 188  + 188  + 188  + 188 ) 188  )
(%o40) 2087 8315264796103 235945903046274057139 1165534273059909831070705679
                           2      3      4      5      6
(%i41) factor(1 + 189 + 189  + 189  + 189  + 189  + 189
                                                 2      3      4      5     23
                                 + (1 + 189 + 189  + 189  + 189  + 189 ) 189  )
(%o41) 571 1709 149145487 5978979828455287 6362372554283780422706108929640771
                           2      3      4      5      6
(%i42) factor(1 + 190 + 190  + 190  + 190  + 190  + 190
                                                 2      3      4      5     23
                                 + (1 + 190 + 190  + 190  + 190  + 190 ) 190  )
???????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????
                          2      3      4      5      6
(%i2) factor(1 + 192 + 192  + 192  + 192  + 192  + 192
                                                 2      3      4      5     23
                                 + (1 + 192 + 192  + 192  + 192  + 192 ) 192  )
(%o2) 31213989575484907 42278037052454684729 6519858481239985692795057947
                          2      3      4      5      6
(%i3) factor(1 + 197 + 197  + 197  + 197  + 197  + 197
                                                 2      3      4      5     23
                                 + (1 + 197 + 197  + 197  + 197  + 197 ) 197  )
(%o3) 503 932285640919799 37683176719903044161768573910921894452508534613
                         2      3      4      5      6
(%i2) factor(1 + 199 + 199  + 199  + 199  + 199  + 199
                                                 2      3      4      5     23
                                 + (1 + 199 + 199  + 199  + 199  + 199 ) 199  )
(%o2) 109119357550419434113590031 214868239374610239139469687855062208671
(%o2)                                a.bat

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

439,103
83,112
367,113
977,113
883,114
229,115
769,116
167,122
199,122
127,125
83,135
593,135
293,137
593,148
109,149
157,154
379,154
677,162
277,176
673,176
541,178
571,189
503,197