多項式(x^5+x^4+x^3+x^2+
x+1)*x^24+x^6+x^5+x^4+x^3+x^2+x+1
Ver.1.000 2012.9.29
更新履歴
2012.9.29 Ver.1.000 新規作成
多項式を変える。
(%i3)
factor((x^5+x^4+x^3+x^2+x+1)*x^24+x^6+x^5+x^4+x^3+x^2+x+1);
29 28 27
26 25 24
6 5 4
3 2
(%o3) x +
x + x + x + x +
x + x + x + x + x + x + x + 1
より、
e14.batを作った。以下に示す。
for x:2
while x<20 do(
y:factor((x^5+x^4+x^3+x^2+x+1)*x^24+x^6+x^5+x^4+x^3+x^2+x+1),
print("
x=",x),
print("factor(x)=",y)
);
e14.batをmaximaで実行した。
(%i1) batch("e14.bat");
read and interpret file: e14.bat
(%i2) for x from 2 while x <
20 do (y :
2 3 4
5
6
2 3 4
5 24
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)= 5 211392947
x= 3
factor(x)= 102804351280177
x= 4
factor(x)= 23 71 1193
197217666029
x= 5
factor(x)= 19 14957 11558863
70875989
x= 6
factor(x)= 71039 461370893
1348997569
x= 7
factor(x)= 5
751304956982029250742413
x= 8
factor(x)= 17 337097
30860012961356618353
x= 9
factor(x)= 3933712247
1347044339005165883
x= 10
factor(x)= 37361 1478839 86260333
23313449573
x= 11
factor(x)= 38704063
45084136048336143703951
x= 12
factor(x)= 5 59 2437 305475319
98263194473301337
x= 13
factor(x)= 41 4483 24473 10709327
4532285379697409
x= 14
factor(x)= 13 53 383
7054718100866861428799244373
x= 15
factor(x)= 58229
235217898787265906580985406429
x= 16
factor(x)= 47 82139
33588035890009 683402112584629
x= 17
2
factor(x)= 5 174583
414119137 283322052719595158131
x= 18
factor(x)= 73 179 19381
36179718709 292219343225984309
x= 19
factor(x)= 548393
23347673515407977296559898314057
(%o2)
done
(%o2)
e14.bat
これより、b.txtは、以下のようになった。
5,2
23,4
71,4
19,5
7,5
17,8
12,5
59,12
41,13
13,14
53,14
383,14
47,16
5,17
73,18
179,18
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^24+%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
5n+2
23n+4
71n+4
19n+5
7n+5
17n+8
12n+5
59n+12
41n+13
13n+14
53n+14
383n+14
47n+16
5n+17
73n+18
179n+18
b.txt read! 16 個
$gcc -Wall
hajiku-6.c -o hajiku-6
$./hajiku-6
!!! 1 !!!
2=5x0+2
!!! 3 !!!
4=23x0+4
4=71x0+4
5=19x0+5
5=7x0+5
5=12x0+5
!!! 6 !!!
7=5x1+2
8=17x0+8
!!! 9 !!!
!!! 10 !!!
!!! 11 !!!
12=5x2+2
12=7x1+5
12=59x0+12
13=41x0+13
14=13x0+14
14=53x0+14
14=383x0+14
!!! 15 !!!
16=47x0+16
17=5x3+2
17=12x1+5
17=5x0+17
18=73x0+18
18=179x0+18
19=7x2+5
!!! 20 !!!
!!! 21 !!!
22=5x4+2
22=5x1+17
!!! 23 !!!
24=19x1+5
25=17x1+8
26=7x3+5
27=5x5+2
27=23x1+4
27=13x1+14
27=5x2+17
!!! 28 !!!
29=12x2+5
!!! 30 !!!
!!! 31 !!!
32=5x6+2
32=5x3+17
33=7x4+5
!!! 34 !!!
!!! 35 !!!
!!! 36 !!!
37=5x7+2
37=5x4+17
!!! 38 !!!
!!! 39 !!!
40=7x5+5
40=13x2+14
41=12x3+5
42=5x8+2
42=17x2+8
42=5x5+17
43=19x2+5
!!! 44 !!!
!!! 45 !!!
!!! 46 !!!
47=5x9+2
47=7x6+5
47=5x6+17
!!! 48 !!!
!!! 49 !!!
50=23x2+4
!!! 51 !!!
52=5x10+2
52=5x7+17
53=12x4+5
53=13x3+14
54=7x7+5
54=41x1+13
!!! 55 !!!
!!! 56 !!!
57=5x11+2
57=5x8+17
!!! 58 !!!
59=17x3+8
!!! 60 !!!
61=7x8+5
62=5x12+2
62=19x3+5
62=5x9+17
63=47x1+16
!!! 64 !!!
65=12x5+5
66=13x4+14
67=5x13+2
67=53x1+14
67=5x10+17
68=7x9+5
!!! 69 !!!
!!! 70 !!!
71=59x1+12
72=5x14+2
72=5x11+17
73=23x3+4
!!! 74 !!!
75=71x1+4
75=7x10+5
76=17x4+8
77=5x15+2
77=12x6+5
77=5x12+17
!!! 78 !!!
79=13x5+14
!!! 80 !!!
81=19x4+5
82=5x16+2
82=7x11+5
82=5x13+17
!!! 83 !!!
!!! 84 !!!
!!! 85 !!!
!!! 86 !!!
87=5x17+2
87=5x14+17
!!! 88 !!!
89=7x12+5
89=12x7+5
!!! 90 !!!
91=73x1+18
92=5x18+2
92=13x6+14
92=5x15+17
93=17x5+8
!!! 94 !!!
95=41x2+13
96=23x4+4
96=7x13+5
97=5x19+2
97=5x16+17
!!! 98 !!!
!!! 99 !!!
100=19x5+5
生成されたa.batは、
factor((1^5+1^4+1^3+1^2+1+1)*1^24+1^6+1^5+1^4+1^3+1^2+1+1);
factor((3^5+3^4+3^3+3^2+3+1)*3^24+3^6+3^5+3^4+3^3+3^2+3+1);
factor((6^5+6^4+6^3+6^2+6+1)*6^24+6^6+6^5+6^4+6^3+6^2+6+1);
factor((9^5+9^4+9^3+9^2+9+1)*9^24+9^6+9^5+9^4+9^3+9^2+9+1);
factor((10^5+10^4+10^3+10^2+10+1)*10^24+10^6+10^5+10^4+10^3+10^2+10+1);
factor((11^5+11^4+11^3+11^2+11+1)*11^24+11^6+11^5+11^4+11^3+11^2+11+1);
factor((15^5+15^4+15^3+15^2+15+1)*15^24+15^6+15^5+15^4+15^3+15^2+15+1);
factor((20^5+20^4+20^3+20^2+20+1)*20^24+20^6+20^5+20^4+20^3+20^2+20+1);
factor((21^5+21^4+21^3+21^2+21+1)*21^24+21^6+21^5+21^4+21^3+21^2+21+1);
factor((23^5+23^4+23^3+23^2+23+1)*23^24+23^6+23^5+23^4+23^3+23^2+23+1);
factor((28^5+28^4+28^3+28^2+28+1)*28^24+28^6+28^5+28^4+28^3+28^2+28+1);
factor((30^5+30^4+30^3+30^2+30+1)*30^24+30^6+30^5+30^4+30^3+30^2+30+1);
factor((31^5+31^4+31^3+31^2+31+1)*31^24+31^6+31^5+31^4+31^3+31^2+31+1);
factor((34^5+34^4+34^3+34^2+34+1)*34^24+34^6+34^5+34^4+34^3+34^2+34+1);
factor((35^5+35^4+35^3+35^2+35+1)*35^24+35^6+35^5+35^4+35^3+35^2+35+1);
factor((36^5+36^4+36^3+36^2+36+1)*36^24+36^6+36^5+36^4+36^3+36^2+36+1);
factor((38^5+38^4+38^3+38^2+38+1)*38^24+38^6+38^5+38^4+38^3+38^2+38+1);
factor((39^5+39^4+39^3+39^2+39+1)*39^24+39^6+39^5+39^4+39^3+39^2+39+1);
factor((44^5+44^4+44^3+44^2+44+1)*44^24+44^6+44^5+44^4+44^3+44^2+44+1);
factor((45^5+45^4+45^3+45^2+45+1)*45^24+45^6+45^5+45^4+45^3+45^2+45+1);
factor((46^5+46^4+46^3+46^2+46+1)*46^24+46^6+46^5+46^4+46^3+46^2+46+1);
factor((48^5+48^4+48^3+48^2+48+1)*48^24+48^6+48^5+48^4+48^3+48^2+48+1);
factor((49^5+49^4+49^3+49^2+49+1)*49^24+49^6+49^5+49^4+49^3+49^2+49+1);
factor((51^5+51^4+51^3+51^2+51+1)*51^24+51^6+51^5+51^4+51^3+51^2+51+1);
factor((55^5+55^4+55^3+55^2+55+1)*55^24+55^6+55^5+55^4+55^3+55^2+55+1);
factor((56^5+56^4+56^3+56^2+56+1)*56^24+56^6+56^5+56^4+56^3+56^2+56+1);
factor((58^5+58^4+58^3+58^2+58+1)*58^24+58^6+58^5+58^4+58^3+58^2+58+1);
factor((60^5+60^4+60^3+60^2+60+1)*60^24+60^6+60^5+60^4+60^3+60^2+60+1);
factor((64^5+64^4+64^3+64^2+64+1)*64^24+64^6+64^5+64^4+64^3+64^2+64+1);
factor((69^5+69^4+69^3+69^2+69+1)*69^24+69^6+69^5+69^4+69^3+69^2+69+1);
factor((70^5+70^4+70^3+70^2+70+1)*70^24+70^6+70^5+70^4+70^3+70^2+70+1);
factor((74^5+74^4+74^3+74^2+74+1)*74^24+74^6+74^5+74^4+74^3+74^2+74+1);
factor((78^5+78^4+78^3+78^2+78+1)*78^24+78^6+78^5+78^4+78^3+78^2+78+1);
factor((80^5+80^4+80^3+80^2+80+1)*80^24+80^6+80^5+80^4+80^3+80^2+80+1);
factor((83^5+83^4+83^3+83^2+83+1)*83^24+83^6+83^5+83^4+83^3+83^2+83+1);
factor((84^5+84^4+84^3+84^2+84+1)*84^24+84^6+84^5+84^4+84^3+84^2+84+1);
factor((85^5+85^4+85^3+85^2+85+1)*85^24+85^6+85^5+85^4+85^3+85^2+85+1);
factor((86^5+86^4+86^3+86^2+86+1)*86^24+86^6+86^5+86^4+86^3+86^2+86+1);
factor((88^5+88^4+88^3+88^2+88+1)*88^24+88^6+88^5+88^4+88^3+88^2+88+1);
factor((90^5+90^4+90^3+90^2+90+1)*90^24+90^6+90^5+90^4+90^3+90^2+90+1);
factor((94^5+94^4+94^3+94^2+94+1)*94^24+94^6+94^5+94^4+94^3+94^2+94+1);
factor((98^5+98^4+98^3+98^2+98+1)*98^24+98^6+98^5+98^4+98^3+98^2+98+1);
factor((99^5+99^4+99^3+99^2+99+1)*99^24+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 24
(%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 24
(%i6) factor(1 + 3 + 3 +
3 + 3 + 3 + 3 + (1 + 3 + 3 + 3 +
3 + 3 ) 3 )
素数ですね。
(%o6)
102804351280177
2 3 4
5
6
2 3 4
5 24
(%i7) factor(1 + 6 + 6 +
6 + 6 + 6 + 6 + (1 + 6 + 6 + 6 +
6 + 6 ) 6 )
(%o7)
71039 461370893 1348997569
2 3 4
5
6
2 3 4
5 24
(%i8) factor(1 + 9 + 9 +
9 + 9 + 9 + 9 + (1 + 9 + 9 + 9 +
9 + 9 ) 9 )
(%o8)
3933712247 1347044339005165883
2 3
4 5 6
(%i9) factor(1 + 10 + 10 +
10 + 10 + 10 + 10
2 3
4 5 24
+ (1 + 10 + 10 + 10 + 10 + 10 ) 10 )
(%o9)
37361 1478839 86260333 23313449573
2 3
4 5 6
(%i10) factor(1 + 11 + 11 +
11 + 11 + 11 + 11
2 3
4 5 24
+ (1 + 11 + 11 + 11 + 11 + 11 ) 11 )
(%o10)
38704063 45084136048336143703951
2 3
4 5 6
(%i11) factor(1 + 15 + 15 +
15 + 15 + 15 + 15
2 3
4 5 24
+ (1 + 15 + 15 + 15 + 15 + 15 ) 15 )
(%o11)
58229 235217898787265906580985406429
2 3
4 5 6
(%i12) factor(1 + 20 + 20 +
20 + 20 + 20 + 20
2 3
4 5 24
+ (1 + 20 + 20 + 20 + 20 + 20 ) 20 )
(%o12)
1644641 34361740158451601291710470552581
2 3
4 5 6
(%i13) factor(1 + 21 + 21 +
21 + 21 + 21 + 21
2 3
4 5 24
+ (1 + 21 + 21 + 21 + 21 + 21 ) 21 )
(%o13)
83 2795572430728292604365944098227255711
2 3
4 5 6
(%i14) factor(1 + 23 + 23 +
23 + 23 + 23 + 23
2 3
4 5 24
+ (1 + 23 + 23 + 23 + 23 + 23 ) 23 )
(%o14)
17191303 86220391949303 2180186314116422273
2 3
4 5 6
(%i15) factor(1 + 28 + 28 +
28 + 28 + 28 + 28
2 3
4 5 24
+ (1 + 28 + 28 + 28 + 28 + 28 ) 28 )
(%o15)
719 515199776355214273 2598200242655084072771
2 3
4 5 6
(%i16) factor(1 + 30 + 30 +
30 + 30 + 30 + 30
2 3
4 5 24
+ (1 + 30 + 30 + 30 + 30 + 30 ) 30 )
(%o16)
41 19789674309874304081 8750183073735924589411
2 3
4 5 6
(%i17) factor(1 + 31 + 31 +
31 + 31 + 31 + 31
2 3
4 5 24
+ (1 + 31 + 31 + 31 + 31 + 31 ) 31 )
(%o17)
50459 54941 135497 2846399 17165991875453237809609
2 3
4 5 6
(%i18) factor(1 + 34 + 34 +
34 + 34 + 34 + 34
2 3
4 5 24
+ (1 + 34 + 34 + 34 + 34 + 34 ) 34 )
(%o18)
43 1301 3253 3798467 1094452969669 352385714409329803
2 3
4 5 6
(%i19) factor(1 + 35 + 35 +
35 + 35 + 35 + 35
2 3
4 5 24
+ (1 + 35 + 35 + 35 + 35 + 35 ) 35 )
(%o19)
14549 78999198866366466983 537163608021682878283
2 3
4 5 6
(%i20) factor(1 + 36 + 36 +
36 + 36 + 36 + 36
2 3
4 5 24
+ (1 + 36 + 36 + 36 + 36 + 36 ) 36 )
(%o20)
5709601 244568893484285753477685818944953510613
2 3
4 5 6
(%i21) factor(1 + 38 + 38 +
38 + 38 + 38 + 38
2 3
4 5 24
+ (1 + 38 + 38 + 38 + 38 + 38 ) 38 )
(%o21)
397 47388241 793517441 2420172978043 185115248666717
2 3
4 5 6
(%i22) factor(1 + 39 + 39 +
39 + 39 + 39 + 39
2 3
4 5 24
+ (1 + 39 + 39 + 39 + 39 + 39 ) 39 )
(%o22)
14389 15259 412515439403185751 156732016316784463601
2 3
4 5 6
(%i23) factor(1 + 44 + 44 +
44 + 44 + 44 + 44
2 3
4 5 24
+ (1 + 44 + 44 + 44 + 44 + 44 ) 44 )
(%o23)
9506837 6438293681 7643724194131080581149588219033
2 3
4 5 6
(%i24) factor(1 + 45 + 45 +
45 + 45 + 45 + 45
2 3
4 5 24
+ (1 + 45 + 45 + 45 + 45 + 45 ) 45 )
(%o24)
2017 971580147907 15970746983464381 28669028522202139
2 3
4 5 6
(%i25) factor(1 + 46 + 46 +
46 + 46 + 46 + 46
2 3
4 5 24
+ (1 + 46 + 46 + 46 + 46 + 46 ) 46 )
(%o25)
1213 6035951 144711802591 1601076108429346562804559911
2 3
4 5 6
(%i26) factor(1 + 48 + 48 +
48 + 48 + 48 + 48
2 3
4 5 24
+ (1 + 48 + 48 + 48 + 48 + 48 ) 48 )
(%o26)
7770222437 3554767221455043463 210811668206392845947
2 3
4 5 6
(%i27) factor(1 + 49 + 49 +
49 + 49 + 49 + 49
2 3
4 5 24
+ (1 + 49 + 49 + 49 + 49 + 49 ) 49 )
(%o27)
307 30406021 24299852278843409 46659444428688529568387
2 3
4 5 6
(%i28) factor(1 + 51 + 51 +
51 + 51 + 51 + 51
2 3
4 5 24
+ (1 + 51 + 51 + 51 + 51 + 51 ) 51 )
素数ですね。
(%o28)
33739238679416734186753557499172094712826000686513
2 3
4 5 6
(%i29) factor(1 + 55 + 55 +
55 + 55 + 55 + 55
2 3
4 5 24
+ (1 + 55 + 55 + 55 + 55 + 55 ) 55 )
(%o29)
39769 54866225818568021633 137923150095686472420947753
2 3
4 5 6
(%i30) factor(1 + 56 + 56 +
56 + 56 + 56 + 56
2 3
4 5 24
+ (1 + 56 + 56 + 56 + 56 + 56 ) 56 )
(%o30)
29 14057 1244478729080477387148190780011170464826009221
2 3
4 5 6
(%i31) factor(1 + 58 + 58 +
58 + 58 + 58 + 58
2 3
4 5 24
+ (1 + 58 + 58 + 58 + 58 + 58 ) 58 )
(%o31)
185749 953551357973106304043 7919438268553078549423121
2 3
4 5 6
(%i32) factor(1 + 60 + 60 +
60 + 60 + 60 + 60
2 3
4 5 24
+ (1 + 60 + 60 + 60 + 60 + 60 ) 60 )
(%o32) 22613
80677 2565257 739242233 1083078475688585441419457381
2 3
4 5 6
(%i33) factor(1 + 64 + 64 +
64 + 64 + 64 + 64
2 3
4 5 24
+ (1 + 64 + 64 + 64 + 64 + 64 ) 64 )
(%o33)
599 258637 157015018077891219533241836723401120518933827
2 3
4 5 6
(%i34) factor(1 + 69 + 69 +
69 + 69 + 69 + 69
2 3
4 5 24
+ (1 + 69 + 69 + 69 + 69 + 69 ) 69 )
(%o34) 151 251
23618477 49658857 5062314317 956567068095390048620177
2 3
4 5 6
(%i35) factor(1 + 70 + 70 +
70 + 70 + 70 + 70
2 3
4 5 24
+ (1 + 70 + 70 + 70 + 70 + 70 ) 70 )
(%o35) 73
604001 6025498725740339 1229528480182947045927251237593
2 3
4 5 6
(%i36) factor(1 + 74 + 74 +
74 + 74 + 74 + 74
2 3
4 5 24
+ (1 + 74 + 74 + 74 + 74 + 74 ) 74 )
(%o36) 41 227 503 1319 69193
262068324503 12824782577723 1138884109318897
2 3
4 5 6
(%i37) factor(1 + 78 + 78 +
78 + 78 + 78 + 78
2 3
4 5 24
+ (1 + 78 + 78 + 78 + 78 + 78 ) 78 )
(%o37) 101 2411 14929
2069178958152149034225974846896403684303123533
2 3
4 5 6
(%i38) factor(1 + 80 + 80 +
80 + 80 + 80 + 80
2 3
4 5 24
+ (1 + 80 + 80 + 80 + 80 + 80 ) 80 )
(%o38) 1559
22399109 448740905673941126306883454711970622832891051
2 3
4 5 6
(%i39) factor(1 + 83 + 83 +
83 + 83 + 83 + 83
2 3
4 5 24
+ (1 + 83 + 83 + 83 + 83 + 83 ) 83 )
(%o39) 43 179 736847
8032118602726649591750819187357920599077011983
2 3
4 5 6
(%i40) factor(1 + 84 + 84 +
84 + 84 + 84 + 84
2 3
4 5 24
+ (1 + 84 + 84 + 84 + 84 + 84 ) 84 )
(%o40)
691 93287282507766466579473840154114368326447836769325511
2 3
4 5 6
(%i41) factor(1 + 85 + 85 +
85 + 85 + 85 + 85
2 3
4 5 24
+ (1 + 85 + 85 + 85 + 85 + 85 ) 85 )
(%o41) 29 431 34361
211518044526604922220444750834158966487062251799
2 3
4 5 6
(%i42) factor(1 + 86 + 86 +
86 + 86 + 86 + 86
2 3
4 5 24
+ (1 + 86 + 86 + 86 + 86 + 86 ) 86 )
(%o42) 1103 8896339
844797697 15381371240592169273415938752628233887
2 3
4 5 6
(%i43) factor(1 + 88 + 88 +
88 + 88 + 88 + 88
2 3
4 5 24
+ (1 + 88 + 88 + 88 + 88 + 88 ) 88 )
(%o43) 151 4220081
2156810585598626077 180655493048990875772989663691
2 3
4 5 6
(%i44) factor(1 + 90 + 90 +
90 + 90 + 90 + 90
2 3
4 5 24
+ (1 + 90 + 90 + 90 + 90 + 90 ) 90 )
(%o44) 173 563 2351 20978159
19345214993072816917 5125511544832151899453
2 3
4 5 6
(%i45) factor(1 + 94 + 94 +
94 + 94 + 94 + 94
2 3
4 5 24
+ (1 + 94 + 94 + 94 + 94 + 94 ) 94 )
(%o45) 40151 2004817 28363901
1233632404133 596526618056011029955510541
2 3
4 5 6
(%i46) factor(1 + 98 + 98 +
98 + 98 + 98 + 98
2 3
4 5 24
+ (1 + 98 + 98 + 98 + 98 + 98 ) 98 )
(%o46) 41897
134223206538622675544654459313526335620768327055509831
2 3
4 5 6
(%i47) factor(1 + 99 + 99 +
99 + 99 + 99 + 99
2 3
4 5 24
+ (1 + 99 + 99 + 99 + 99 + 99 ) 99 )
(%o47) 8573
3440082059906694133 255934089455588121345501371421132689
(%o47)
a.bat
(%i48)
b.txtに追加されるものは、
83,21
719,28
41,30
43,34
397,38
307,49
29,56
599,64
151,69
251,69
73,70
41,74
227,74
503,74
101,78
43,83
179,83
691,84
29,85
431,85
151,88
173,90
563,90
これより、Autohajiku.cの
#define max 1 /* この数から+100まで生成する
*/
を
#define max 100 /*
この数から+100まで生成する */
になおして、
Autohajiku.cをコンパイル実行する。
$gcc
-Wall Autohajiku.c -o Autohajiku
$./Autohajiku
5n+2
23n+4
71n+4
19n+5
7n+5
17n+8
12n+5
59n+12
41n+13
13n+14
53n+14
383n+14
47n+16
5n+17
73n+18
179n+18
83n+21
719n+28
41n+30
43n+34
397n+38
307n+49
29n+56
599n+64
151n+69
251n+69
73n+70
41n+74
227n+74
503n+74
101n+78
43n+83
179n+83
691n+84
29n+85
431n+85
151n+88
173n+90
563n+90
b.txt read! 39 個
$gcc
-Wall hajiku-6.c -o hajiku-6
$./hajiku-6
100=19x5+5
101=12x8+5
102=5x20+2
102=5x17+17
103=7x14+5
104=83x1+21
105=13x7+14
!!! 106 !!!
107=5x21+2
107=5x18+17
!!! 108 !!!
!!! 109 !!!
110=7x15+5
110=17x6+8
110=47x2+16
!!! 111 !!!
112=5x22+2
112=5x19+17
112=41x2+30
113=12x9+5
114=29x2+56
114=29x1+85
115=41x1+74
!!! 116 !!!
117=5x23+2
117=7x16+5
117=5x20+17
118=13x8+14
119=23x5+4
119=19x6+5
120=53x2+14
120=43x2+34
!!! 121 !!!
122=5x24+2
122=5x21+17
!!! 123 !!!
124=7x17+5
125=12x10+5
126=43x1+83
127=5x25+2
127=17x7+8
127=5x22+17
!!! 128 !!!
!!! 129 !!!
130=59x2+12
131=7x18+5
131=13x9+14
132=5x26+2
132=5x23+17
!!! 133 !!!
!!! 134 !!!
!!! 135 !!!
136=41x3+13
137=5x27+2
137=12x11+5
137=5x24+17
138=19x7+5
138=7x19+5
!!! 139 !!!
!!! 140 !!!
!!! 141 !!!
142=5x28+2
142=23x6+4
142=5x25+17
143=29x3+56
143=73x1+70
143=29x2+85
144=17x8+8
144=13x10+14
145=7x20+5
146=71x2+4
147=5x29+2
147=5x26+17
!!! 148 !!!
149=12x12+5
!!! 150 !!!
!!! 151 !!!
152=5x30+2
152=7x21+5
152=5x27+17
153=41x3+30
!!! 154 !!!
!!! 155 !!!
156=41x2+74
157=5x31+2
157=19x8+5
157=13x11+14
157=47x3+16
157=5x28+17
!!! 158 !!!
159=7x22+5
!!! 160 !!!
161=17x9+8
161=12x13+5
162=5x32+2
162=5x29+17
163=43x3+34
164=73x2+18
165=23x7+4
166=7x23+5
167=5x33+2
167=5x30+17
!!! 168 !!!
169=43x2+83
170=13x12+14
!!! 171 !!!
172=5x34+2
172=5x31+17
172=29x4+56
172=29x3+85
173=7x24+5
173=12x14+5
173=53x3+14
!!! 174 !!!
!!! 175 !!!
176=19x9+5
177=5x35+2
177=41x4+13
177=5x32+17
178=17x10+8
179=101x1+78
180=7x25+5
!!! 181 !!!
182=5x36+2
182=5x33+17
183=13x13+14
!!! 184 !!!
185=12x15+5
!!! 186 !!!
187=5x37+2
187=7x26+5
187=5x34+17
187=83x2+21
188=23x8+4
189=59x3+12
!!! 190 !!!
!!! 191 !!!
192=5x38+2
192=5x35+17
!!! 193 !!!
194=7x27+5
194=41x4+30
195=19x10+5
195=17x11+8
196=13x14+14
197=5x39+2
197=12x16+5
197=5x36+17
197=179x1+18
197=41x3+74
!!! 198 !!!
!!! 199 !!!
生成されたa.batは、
factor((106^5+106^4+106^3+106^2+106+1)*106^24+106^6+106^5+106^4+106^3+106^2+106+1);
factor((108^5+108^4+108^3+108^2+108+1)*108^24+108^6+108^5+108^4+108^3+108^2+108+1);
factor((109^5+109^4+109^3+109^2+109+1)*109^24+109^6+109^5+109^4+109^3+109^2+109+1);
factor((111^5+111^4+111^3+111^2+111+1)*111^24+111^6+111^5+111^4+111^3+111^2+111+1);
factor((116^5+116^4+116^3+116^2+116+1)*116^24+116^6+116^5+116^4+116^3+116^2+116+1);
factor((121^5+121^4+121^3+121^2+121+1)*121^24+121^6+121^5+121^4+121^3+121^2+121+1);
factor((123^5+123^4+123^3+123^2+123+1)*123^24+123^6+123^5+123^4+123^3+123^2+123+1);
factor((128^5+128^4+128^3+128^2+128+1)*128^24+128^6+128^5+128^4+128^3+128^2+128+1);
factor((129^5+129^4+129^3+129^2+129+1)*129^24+129^6+129^5+129^4+129^3+129^2+129+1);
factor((133^5+133^4+133^3+133^2+133+1)*133^24+133^6+133^5+133^4+133^3+133^2+133+1);
factor((134^5+134^4+134^3+134^2+134+1)*134^24+134^6+134^5+134^4+134^3+134^2+134+1);
factor((135^5+135^4+135^3+135^2+135+1)*135^24+135^6+135^5+135^4+135^3+135^2+135+1);
factor((139^5+139^4+139^3+139^2+139+1)*139^24+139^6+139^5+139^4+139^3+139^2+139+1);
factor((140^5+140^4+140^3+140^2+140+1)*140^24+140^6+140^5+140^4+140^3+140^2+140+1);
factor((141^5+141^4+141^3+141^2+141+1)*141^24+141^6+141^5+141^4+141^3+141^2+141+1);
factor((148^5+148^4+148^3+148^2+148+1)*148^24+148^6+148^5+148^4+148^3+148^2+148+1);
factor((150^5+150^4+150^3+150^2+150+1)*150^24+150^6+150^5+150^4+150^3+150^2+150+1);
factor((151^5+151^4+151^3+151^2+151+1)*151^24+151^6+151^5+151^4+151^3+151^2+151+1);
factor((154^5+154^4+154^3+154^2+154+1)*154^24+154^6+154^5+154^4+154^3+154^2+154+1);
factor((155^5+155^4+155^3+155^2+155+1)*155^24+155^6+155^5+155^4+155^3+155^2+155+1);
factor((158^5+158^4+158^3+158^2+158+1)*158^24+158^6+158^5+158^4+158^3+158^2+158+1);
factor((160^5+160^4+160^3+160^2+160+1)*160^24+160^6+160^5+160^4+160^3+160^2+160+1);
factor((168^5+168^4+168^3+168^2+168+1)*168^24+168^6+168^5+168^4+168^3+168^2+168+1);
factor((171^5+171^4+171^3+171^2+171+1)*171^24+171^6+171^5+171^4+171^3+171^2+171+1);
factor((174^5+174^4+174^3+174^2+174+1)*174^24+174^6+174^5+174^4+174^3+174^2+174+1);
factor((175^5+175^4+175^3+175^2+175+1)*175^24+175^6+175^5+175^4+175^3+175^2+175+1);
factor((181^5+181^4+181^3+181^2+181+1)*181^24+181^6+181^5+181^4+181^3+181^2+181+1);
factor((184^5+184^4+184^3+184^2+184+1)*184^24+184^6+184^5+184^4+184^3+184^2+184+1);
factor((186^5+186^4+186^3+186^2+186+1)*186^24+186^6+186^5+186^4+186^3+186^2+186+1);
factor((190^5+190^4+190^3+190^2+190+1)*190^24+190^6+190^5+190^4+190^3+190^2+190+1);
factor((191^5+191^4+191^3+191^2+191+1)*191^24+191^6+191^5+191^4+191^3+191^2+191+1);
factor((193^5+193^4+193^3+193^2+193+1)*193^24+193^6+193^5+193^4+193^3+193^2+193+1);
factor((198^5+198^4+198^3+198^2+198+1)*198^24+198^6+198^5+198^4+198^3+198^2+198+1);
factor((199^5+199^4+199^3+199^2+199+1)*199^24+199^6+199^5+199^4+199^3+199^2+199+1);
(%i48) batch("a.bat");
read and interpret file: a.bat
2 3
4 5 6
(%i49) factor(1 + 106 + 106 + 106 + 106 + 106 +
106
2 3
4 5 24
+ (1 + 106 + 106 + 106 + 106 + 106 ) 106 )
(%o49) 3823 300115133
47675413230818540009012100993079664421317404157
2 3
4 5 6
(%i50) factor(1 + 108 + 108 + 108 + 108 + 108 +
108
2 3
4 5 24
+ (1 + 108 + 108 + 108 + 108 + 108 ) 108 )
(%o50) 1379663953 385179041890507 6177911982975223 28645156829559022609
2 3
4 5 6
(%i51) factor(1 + 109 + 109 + 109 + 109 + 109 +
109
2 3
4 5 24
+ (1 + 109 + 109 + 109 + 109 + 109 ) 109 )
(%o51) 659 2126249 2868043 30569334730611539769131905010545183185086677
2 3
4 5 6
(%i52) factor(1 + 111 + 111 + 111 + 111 + 111 +
111
2 3
4 5 24
+ (1 + 111 + 111 + 111 + 111 + 111 ) 111 )
(%o52) 1292792474753951 1076634646442075891 149520076840360216993688293
2 3
4 5 6
(%i53) factor(1 + 116 + 116 + 116 + 116 + 116 +
116
2 3
4 5 24
+ (1 + 116 + 116 + 116 + 116 + 116 ) 116 )
素数ですね。
(%o53)
746520668771545106977224517932602392226438720099380152703813
2 3
4 5 6
(%i54) factor(1 + 121 + 121 + 121 + 121 + 121 +
121
2 3
4 5 24
+ (1 + 121 + 121 + 121 + 121 + 121 ) 121 )
(%o54) 229 257 2857 5764079 5950444427089 2895993169841951
151923219823707713
2 3
4 5 6
(%i55) factor(1 + 123 + 123 + 123 + 123 + 123 +
123
2 3
4 5 24
+ (1 + 123 + 123 + 123 + 123 + 123 ) 123 )
(%o55) 1302504649627
3133388392055329688901479620059018515974595814691
2 3
4 5 6
(%i56) factor(1 + 128 + 128 + 128 + 128 + 128 +
128
2 3
4 5 24
+ (1 + 128 + 128 + 128 + 128 + 128 ) 128 )
(%o56) 131 523 872363489737 888743108419
243920699451552003939611035400243
2 3
4 5 6
(%i57) factor(1 + 129 + 129 + 129 + 129 + 129 +
129
2 3
4 5 24
+ (1 + 129 + 129 + 129 + 129 + 129 ) 129 )
(%o57) 751 58912163 908507027 403931891377798140944527516035039328088251
2 3
4 5 6
(%i58) factor(1 + 133 + 133 + 133 + 133 + 133 +
133
2 3
4 5 24
+ (1 + 133 + 133 + 133 + 133 + 133 ) 133 )
(%o58) 1091 4745099 7601604486543087761925196193164887874318558949034733
2 3
4 5 6
(%i59) factor(1 + 134 + 134 + 134 + 134 + 134 +
134
2 3
4 5 24
+ (1 + 134 + 134 + 134 + 134 + 134 ) 134 )
(%o59) 163 64451 51529817 9468212530586336120617
9540001598280142683478843
2 3
4 5 6
(%i60) factor(1 + 135 + 135 + 135 + 135 + 135 +
135
2 3
4 5 24
+ (1 + 135 + 135 + 135 + 135 + 135 ) 135 )
(%o60) 73 14159 58688473640831702253388508495275480466150311661395855223
2 3
4 5 6
(%i61) factor(1 + 139 + 139 + 139 + 139 + 139 +
139
2 3
4 5 24
+ (1 + 139 + 139 + 139 + 139 + 139 ) 139 )
(%o61) 56501 4391571874789498417 570018291094828988349157405768356417053
2 3
4 5 6
(%i62) factor(1 + 140 + 140 + 140 + 140 + 140 +
140
2 3
4 5 24
+ (1 + 140 + 140 + 140 + 140 + 140 ) 140 )
(%o62) 821 11443 51399168577 203000737109 66253024442833
26809196482156883863
2 3
4 5 6
(%i63) factor(1 + 141 + 141 + 141 + 141 + 141 +
141
2 3
4 5 24
+ (1 + 141 + 141 + 141 + 141 + 141 ) 141 )
(%o63) 73 49523 59344295201 1984976542465352723363
502552205447323104979469
2 3
4 5 6
(%i64) factor(1 + 148 + 148 + 148 + 148 + 148 +
148
2 3
4 5 24
+ (1 + 148 + 148 + 148 + 148 + 148 ) 148 )
素数ですね。
(%o64)
872035423620503385645795308395501853626694552833290395254432357
2 3
4 5 6
(%i65) factor(1 + 150 + 150 + 150 + 150 + 150 +
150
2 3
4 5 24
+ (1 + 150 + 150 + 150 + 150 + 150 ) 150 )
(%o65) 9421 136601195268365370065230065983402894796199978770832339143631
2 3
4 5 6
(%i66) factor(1 + 151 + 151 + 151 + 151 + 151 +
151
2 3
4 5 24
+ (1 + 151 + 151 + 151 + 151 + 151 ) 151 )
(%o66) 3019 3946342558872547
130966211765135502193744900739423507598555841
2 3
4 5 6
(%i67) factor(1 + 154 + 154 + 154 + 154 + 154 +
154
2 3
4 5 24
+ (1 + 154 + 154 + 154 + 154 + 154 ) 154 )
(%o67) 439 20485561616453607655529
306914777298226378415042474026023515321
2 3
4 5 6
(%i68) factor(1 + 155 + 155 + 155 + 155 + 155 +
155
2 3
4 5 24
+ (1 + 155 + 155 + 155 + 155 + 155 ) 155 )
(%o68) 8108641 410659762149072871719252947110110607927056811246818943441
2 3
4 5 6
(%i69) factor(1 + 158 + 158 + 158 + 158 + 158 +
158
2 3
4 5 24
+ (1 + 158 + 158 + 158 + 158 + 158 ) 158 )
(%o69) 233 9619 47485901 199129931717138891033
273921349689383192672975418317
2 3
4 5 6
(%i70) factor(1 + 160 + 160 + 160 + 160 + 160 +
160
2 3
4 5 24
+ (1 + 160 + 160 + 160 + 160 + 160 ) 160 )
素数ですね。
(%o70) 8359924501791425438624482993350635421696000000000016882733081761
2 3
4 5 6
(%i71) factor(1 + 168 + 168 + 168 + 168 + 168 +
168
2 3
4 5 24
+ (1 + 168 + 168 + 168 + 168 + 168 ) 168 )
(%o71) 491 733 320561 225740651 430573163 589503979
5203821106895549777479497757
2 3
4 5 6
(%i72) factor(1 + 171 + 171 + 171 + 171 + 171 +
171
2 3
4 5 24
+ (1 + 171 + 171 + 171 + 171 + 171 ) 171 )
(%o72) 597814715093
96131958317883323296756473357425750825514482478744941
2 3
4 5 6
(%i73) factor(1 + 174 + 174 + 174 + 174 + 174 +
174
2 3
4 5 24
+ (1 + 174 + 174 + 174 + 174 + 174 ) 174 )
(%o73) 3239303 61170290603
480218877665025640985783468513171301928665366439
2 3
4 5 6
(%i74) factor(1 + 175 + 175 + 175 + 175 + 175 +
175
2 3
4 5 24
+ (1 + 175 + 175 + 175 + 175 + 175 ) 175 )
(%o74) 64091 172259 11596179335074357
877603445515083682099629572402833572397
2 3
4 5 6
(%i75) factor(1 + 181 + 181 + 181 + 181 + 181 +
181
2 3
4 5 24
+ (1 + 181 + 181 + 181 + 181 + 181 ) 181 )
(%o75) 12586423 154646593 567350128003331 3902940894015923
69278572372521109459
2 3
4 5 6
(%i76) factor(1 + 184 + 184 + 184 + 184 + 184 +
184
2 3
4 5 24
+ (1 + 184 + 184 + 184 + 184 + 184 ) 184 )
(%o76) 385843 814660194332505401 1121251999954913377
1364561920701535532958491
2 3
4 5 6
(%i77) factor(1 + 186 + 186 + 186 + 186 + 186 +
186
2 3
4 5 24
+ (1 + 186 + 186 + 186 + 186 + 186 ) 186 )
(%o77) 125820397
5229564778439932948443070107640948389924421389461705364979
2 3
4 5 6
(%i78) factor(1 + 190 + 190
+ 190 + 190 + 190 + 190
2 3
4 5 24
+ (1 + 190 + 190 + 190 + 190 + 190 ) 190 )
(%o78) 1009 44293 699210307
2130826645158137453
18313190848918008420027024523433
2 3
4 5 6
(%i79) factor(1 + 191 + 191
+ 191 + 191 + 191 + 191
2 3
4 5 24
+ (1 + 191 + 191 + 191 + 191 + 191 ) 191 )
(%o79) 49058044573
18752061092832127 1543434393629049780136609077338154253003
2 3
4 5 6
(%i80) factor(1 + 193 + 193
+ 193 + 193 + 193 + 193
2 3
4 5 24
+ (1 + 193 + 193 + 193 + 193 + 193 ) 193 )
(%o80) 5857 925081 1883139000913
188226461681157886517948949468116775712805797
2 3
4 5 6
(%i81) factor(1 + 198 + 198
+ 198 + 198 + 198 + 198
2 3
4 5 24
+ (1 + 198 + 198 + 198 + 198 + 198 ) 198 )
(%o81) 2176284111283859
16184137809899769575759 114468060001946774084625567247
2 3
4 5 6
(%i82) factor(1 + 199 + 199
+ 199 + 199 + 199 + 199
2 3
4 5 24
+ (1 + 199 + 199 + 199 + 199 + 199 ) 199 )
(%o82) 937 1259 76147 3562144721
402649433321
36213485837079424236892436740815761
(%o82)
a.bat
(%i83)
b.txtに追加されるものは、
659,109
229,121
257,121
131,128
523,128
751,129
163,134
73,135
821,140
73,141
439,154
233,158
491,168
733,168
937,199
これより、Autohajiku.cの
#define max 100 /*
この数から+100まで生成する
*/
を
#define max 200 /*
この数から+100まで生成する */
になおして、
Autohajiku.cをコンパイル実行する。
gcc
-Wall Autohajiku.c -o Autohajiku
./Autohajiku
5n+2
23n+4
71n+4
19n+5
7n+5
17n+8
12n+5
59n+12
41n+13
13n+14
53n+14
383n+14
47n+16
5n+17
73n+18
179n+18
83n+21
719n+28
41n+30
43n+34
397n+38
307n+49
29n+56
599n+64
151n+69
251n+69
73n+70
41n+74
227n+74
503n+74
101n+78
43n+83
179n+83
691n+84
29n+85
431n+85
151n+88
173n+90
563n+90
659n+109
229n+121
257n+121
131n+128
523n+128
751n+129
163n+134
73n+135
821n+140
73n+141
439n+154
233n+158
491n+168
733n+168
937n+199
b.txt read! 54 個
gcc
-Wall hajiku-6.c -o hajiku-6
./hajiku-6
!!! 200 !!!
201=7x28+5
201=29x5+56
201=29x4+85
202=5x40+2
202=5x37+17
!!! 203 !!!
204=47x4+16
!!! 205 !!!
206=43x4+34
207=5x41+2
207=5x38+17
208=7x29+5
208=73x1+135
209=12x17+5
209=13x15+14
!!! 210 !!!
211=23x9+4
212=5x42+2
212=17x12+8
212=5x39+17
212=43x3+83
!!! 213 !!!
214=19x11+5
214=73x1+141
215=7x30+5
216=73x2+70
217=5x43+2
217=71x3+4
217=5x40+17
218=41x5+13
!!! 219 !!!
220=151x1+69
221=12x18+5
222=5x44+2
222=7x31+5
222=13x16+14
222=5x41+17
!!! 223 !!!
!!! 224 !!!
!!! 225 !!!
226=53x4+14
227=5x45+2
227=5x42+17
!!! 228 !!!
229=7x32+5
229=17x13+8
230=29x6+56
230=29x5+85
!!! 231 !!!
232=5x46+2
232=5x43+17
233=19x12+5
233=12x19+5
234=23x10+4
235=13x17+14
235=41x5+30
236=7x33+5
237=5x47+2
237=5x44+17
237=73x3+18
238=41x4+74
239=151x1+88
!!! 240 !!!
!!! 241 !!!
242=5x48+2
242=5x45+17
243=7x34+5
!!! 244 !!!
245=12x20+5
246=17x14+8
247=5x49+2
247=5x46+17
248=59x4+12
248=13x18+14
249=43x5+34
250=7x35+5
251=47x5+16
252=5x50+2
252=19x13+5
252=5x47+17
!!! 253 !!!
!!! 254 !!!
255=43x4+83
!!! 256 !!!
257=5x51+2
257=23x11+4
257=7x36+5
257=12x21+5
257=5x48+17
!!! 258 !!!
259=41x6+13
259=29x7+56
259=29x6+85
259=131x1+128
!!! 260 !!!
261=13x19+14
262=5x52+2
262=5x49+17
262=179x1+83
263=17x15+8
263=173x1+90
264=7x37+5
!!! 265 !!!
!!! 266 !!!
267=5x53+2
267=5x50+17
!!! 268 !!!
269=12x22+5
270=83x3+21
271=19x14+5
271=7x38+5
272=5x54+2
272=5x51+17
!!! 273 !!!
274=13x20+14
!!! 275 !!!
276=41x6+30
277=5x55+2
277=5x52+17
278=7x39+5
279=53x5+14
279=41x5+74
280=23x12+4
280=17x16+8
280=101x2+78
281=12x23+5
281=73x2+135
282=5x56+2
282=5x53+17
!!! 283 !!!
!!! 284 !!!
285=7x40+5
!!! 286 !!!
287=5x57+2
287=13x21+14
287=5x54+17
287=73x2+141
288=71x4+4
288=29x8+56
288=29x7+85
289=73x3+70
290=19x15+5
!!! 291 !!!
292=5x58+2
292=7x41+5
292=5x55+17
292=43x6+34
293=12x24+5
!!! 294 !!!
!!! 295 !!!
!!! 296 !!!
297=5x59+2
297=17x17+8
297=5x56+17
297=163x1+134
298=47x6+16
298=43x5+83
299=7x42+5
生成されたa.batは、
factor((200^5+200^4+200^3+200^2+200+1)*200^24+200^6+200^5+200^4+200^3+200^2+200+1);
factor((203^5+203^4+203^3+203^2+203+1)*203^24+203^6+203^5+203^4+203^3+203^2+203+1);
factor((205^5+205^4+205^3+205^2+205+1)*205^24+205^6+205^5+205^4+205^3+205^2+205+1);
factor((210^5+210^4+210^3+210^2+210+1)*210^24+210^6+210^5+210^4+210^3+210^2+210+1);
factor((213^5+213^4+213^3+213^2+213+1)*213^24+213^6+213^5+213^4+213^3+213^2+213+1);
factor((219^5+219^4+219^3+219^2+219+1)*219^24+219^6+219^5+219^4+219^3+219^2+219+1);
factor((223^5+223^4+223^3+223^2+223+1)*223^24+223^6+223^5+223^4+223^3+223^2+223+1);
factor((224^5+224^4+224^3+224^2+224+1)*224^24+224^6+224^5+224^4+224^3+224^2+224+1);
factor((225^5+225^4+225^3+225^2+225+1)*225^24+225^6+225^5+225^4+225^3+225^2+225+1);
factor((228^5+228^4+228^3+228^2+228+1)*228^24+228^6+228^5+228^4+228^3+228^2+228+1);
factor((231^5+231^4+231^3+231^2+231+1)*231^24+231^6+231^5+231^4+231^3+231^2+231+1);
factor((240^5+240^4+240^3+240^2+240+1)*240^24+240^6+240^5+240^4+240^3+240^2+240+1);
factor((241^5+241^4+241^3+241^2+241+1)*241^24+241^6+241^5+241^4+241^3+241^2+241+1);
factor((244^5+244^4+244^3+244^2+244+1)*244^24+244^6+244^5+244^4+244^3+244^2+244+1);
factor((253^5+253^4+253^3+253^2+253+1)*253^24+253^6+253^5+253^4+253^3+253^2+253+1);
factor((254^5+254^4+254^3+254^2+254+1)*254^24+254^6+254^5+254^4+254^3+254^2+254+1);
factor((256^5+256^4+256^3+256^2+256+1)*256^24+256^6+256^5+256^4+256^3+256^2+256+1);
factor((258^5+258^4+258^3+258^2+258+1)*258^24+258^6+258^5+258^4+258^3+258^2+258+1);
factor((260^5+260^4+260^3+260^2+260+1)*260^24+260^6+260^5+260^4+260^3+260^2+260+1);
factor((265^5+265^4+265^3+265^2+265+1)*265^24+265^6+265^5+265^4+265^3+265^2+265+1);
factor((266^5+266^4+266^3+266^2+266+1)*266^24+266^6+266^5+266^4+266^3+266^2+266+1);
factor((268^5+268^4+268^3+268^2+268+1)*268^24+268^6+268^5+268^4+268^3+268^2+268+1);
factor((273^5+273^4+273^3+273^2+273+1)*273^24+273^6+273^5+273^4+273^3+273^2+273+1);
factor((275^5+275^4+275^3+275^2+275+1)*275^24+275^6+275^5+275^4+275^3+275^2+275+1);
factor((283^5+283^4+283^3+283^2+283+1)*283^24+283^6+283^5+283^4+283^3+283^2+283+1);
factor((284^5+284^4+284^3+284^2+284+1)*284^24+284^6+284^5+284^4+284^3+284^2+284+1);
factor((286^5+286^4+286^3+286^2+286+1)*286^24+286^6+286^5+286^4+286^3+286^2+286+1);
factor((291^5+291^4+291^3+291^2+291+1)*291^24+291^6+291^5+291^4+291^3+291^2+291+1);
factor((294^5+294^4+294^3+294^2+294+1)*294^24+294^6+294^5+294^4+294^3+294^2+294+1);
factor((295^5+295^4+295^3+295^2+295+1)*295^24+295^6+295^5+295^4+295^3+295^2+295+1);
factor((296^5+296^4+296^3+296^2+296+1)*296^24+296^6+296^5+296^4+296^3+296^2+296+1);
実行結果は、
(%i83) batch("a.bat");
read and interpret file: a.bat
2 3
4 5 6
(%i84) factor(1 + 200 + 200
+ 200 + 200 + 200 + 200
2 3
4 5 24
+ (1 + 200 + 200 + 200 + 200 + 200 ) 200 )
(%o84) 1781581
3028595139816185969652797150396193044267984447521611458767021
2 3
4 5 6
(%i85) factor(1 + 203 + 203
+ 203 + 203 + 203 + 203
2 3
4 5 24
+ (1 + 203 + 203 + 203 + 203 + 203 ) 203 )
(%o85) 8083641532781
1027833388537056137527063063537202324582071937759093717
2 3
4 5 6
(%i86) factor(1 + 205 + 205
+ 205 + 205 + 205 + 205
2 3
4 5 24
+ (1 + 205 + 205 + 205 + 205 + 205 ) 205 )
(%o86) 179 5312197975673
12616711691830423 920263510892035578387236876994291841
2 3
4 5 6
(%i87) factor(1 + 210 + 210
+ 210 + 210 + 210 + 210
2 3
4 5 24
+ (1 + 210 + 210 + 210 + 210 + 210 ) 210 )
(%o87) 113 23741 295949
27966507059221474223570664389904950266095428065797135383
2 3
4 5 6
(%i88) factor(1 + 213 + 213
+ 213 + 213 + 213 + 213
2 3
4 5 24
+ (1 + 213 + 213 + 213 + 213 + 213 ) 213 )
(%o88) 4409 193589623
8308456340453995123412893 4723998241421068818379907778767
2 3
4 5 6
(%i89) factor(1 + 219 + 219
+ 219 + 219 + 219 + 219
2 3
4 5 24
+ (1 + 219 + 219 + 219 + 219 + 219 ) 219 )
(%o89) 19801 176613895076239
87810057440012473
244124124017272045513442308759183
2 3
4 5 6
(%i90) factor(1 + 223 + 223
+ 223 + 223 + 223 + 223
2 3
4 5 24
+ (1 + 223 + 223 + 223 + 223 + 223 ) 223 )
(%o90) 204923 3474849245689
177936991794264224824066779746156059491016924273931
2 3
4 5 6
(%i91) factor(1 + 224 + 224
+ 224 + 224 + 224 + 224
2 3
4 5 24
+ (1 + 224 + 224 + 224 + 224 + 224 ) 224 )
(%o91) 131 939037713016621
1172684964348443454831165439475147111339922644680151
2 3
4 5 6
(%i92) factor(1 + 225 + 225
+ 225 + 225 + 225 + 225
2 3
4 5 24
+ (1 + 225 + 225 + 225 + 225 + 225 ) 225 )
(%o92) 6451873
25441441520805510215491169284727183179905943028852543139318637
2 3
4 5 6
(%i93) factor(1 + 228 + 228
+ 228 + 228 + 228 + 228
2 3
4 5 24
+ (1 + 228 + 228 + 228 + 228 + 228 ) 228 )
(%o93) 181721 1371731
966819678359752864759287718326015426096474310548712599727
2 3
4 5 6
(%i94) factor(1 + 231 + 231
+ 231 + 231 + 231 + 231
2 3
4 5 24
+ (1 + 231 + 231 + 231 + 231 + 231 ) 231 )
(%o94) 659
621186331480069376131367 860051099035496771776882255869433735115821
2 3
4 5 6
(%i95) factor(1 + 240 + 240
+ 240 + 240 + 240 + 240
2 3
4 5 24
+ (1 + 240 + 240 + 240 + 240 + 240 ) 240 )
(%o95) 243380677 4191844418671807
525391365527866691173
1989597236737243380357703
2 3
4 5 6
(%i96) factor(1 + 241 + 241
+ 241 + 241 + 241 + 241
2 3
4 5 24
+ (1 + 241 + 241 + 241 + 241 + 241 ) 241 )
(%o96) 317 1181 13751 55234888091
8676397185101 1463831204647949
333129190580877763441
2 3
4 5 6
(%i97) factor(1 + 244 + 244
+ 244 + 244 + 244 + 244
2 3
4 5 24
+ (1 + 244 + 244 + 244 + 244 + 244 ) 244 )
(%o97) 60271 1531657 9228383
2021589572445797029423643711112390620619387698305901
2 3
4 5 6
(%i98) factor(1 + 253 + 253
+ 253 + 253 + 253 + 253
2 3
4 5 24
+ (1 + 253 + 253 + 253 + 253 + 253 ) 253 )
(%o98) 211 2633 4547177310399973
738456357826301815691299
2638852142395632284178377
2 3
4 5 6
(%i99) factor(1 + 254 + 254
+ 254 + 254 + 254 + 254
2 3
4 5 24
+ (1 + 254 + 254 + 254 + 254 + 254 ) 254 )
(%o99) 665243357
8296796364673948364663389070822729768569057835272370091307943
2 3
4 5 6
(%i100) factor(1 + 256 +
256 + 256 + 256 + 256 + 256
2 3
4 5 24
+ (1 + 256 + 256 + 256 + 256 + 256 ) 256 )
(%o100) 1326529
5223264639324686803463782767236767740968393096804215689713292097
2 3
4 5 6
(%i101) factor(1 + 258 +
258 + 258 + 258 + 258 + 258
2 3
4 5 24
+ (1 + 258 + 258 + 258 + 258 + 258 ) 258 )
(%o101) 24707168957377
351426955761825242441405065114926683288399860839985186111
2 3
4 5 6
(%i102) factor(1 + 260 +
260 + 260 + 260 + 260 + 260
2 3
4 5 24
+ (1 + 260 + 260 + 260 + 260 + 260 ) 260 )
(%o102) 383 547 441929732697671
14310069229059060543283
8198220942599750401170762277
2 3
4 5 6
(%i103) factor(1 + 265 +
265 + 265 + 265 + 265 + 265
2 3
4 5 24
+ (1 + 265 + 265 + 265 + 265 + 265 ) 265 )
(%o103) 239 9238990619
1350397344158637479521
6328317920172600805639758279206002681
2 3
4 5 6
(%i104) factor(1 + 266 +
266 + 266 + 266 + 266 + 266
2 3
4 5 24
+ (1 + 266 + 266 + 266 + 266 + 266 ) 266 )
(%o104) 9053277687105754622827
2324863094832605689388237200716645439588531282069
2 3
4 5 6
(%i105) factor(1 + 268 +
268 + 268 + 268 + 268 + 268
2 3
4 5 24
+ (1 + 268 + 268 + 268 + 268 + 268 ) 268 )
(%o105) 43372859 13418827375939
44936572415777132802952254331695132459373492952237
2 3
4 5 6
(%i106) factor(1 + 273 +
273 + 273 + 273 + 273 + 273
2 3
4 5 24
+ (1 + 273 + 273 + 273 + 273 + 273 ) 273 )
(%o106) 107 10559 62927 606811
1661268877 13922644126427
44797297599147664832512770538603
2 3
4 5 6
(%i107) factor(1 + 275 +
275 + 275 + 275 + 275 + 275
2 3
4 5 24
+ (1 + 275 + 275 + 275 + 275 + 275 ) 275 )
(%o107) 1607 8629 13486703
154887714167 1054030271929014157
1809164503197408477060818831
2 3
4 5 6
(%i108) factor(1 + 283 +
283 + 283 + 283 + 283 + 283
2 3
4 5 24
+ (1 + 283 + 283 + 283 + 283 + 283 ) 283 )
(%o108) 3157703
40176553420536787898550862359780373296183889744104161936887849799
2 3
4 5 6
(%i109) factor(1 + 284 +
284 + 284 + 284 + 284 + 284
2 3
4 5 24
+ (1 + 284 + 284 + 284 + 284 + 284 ) 284 )
(%o109) 2803 3739 95287 373358099
2252006123 54481212493 3703354762087
829496053126882417
2 3
4 5 6
(%i110) factor(1 + 286 +
286 + 286 + 286 + 286 + 286
2 3
4 5 24
+ (1 + 286 + 286 + 286 + 286 + 286 ) 286 )
(%o110) 38414851 2280803981
1965843851419701667527982175716883880197417543793680573
2 3
4 5 6
(%i111) factor(1 + 291 +
291 + 291 + 291 + 291 + 291
2 3
4 5 24
+ (1 + 291 + 291 + 291 + 291 + 291 ) 291 )
(%o111) 6679 440400133
96790511904894164466443728156268379190062230496725958515659
2 3
4 5 6
(%i112) factor(1 + 294 +
294 + 294 + 294 + 294 + 294
2 3
4 5 24
+ (1 + 294 + 294 + 294 + 294 + 294 ) 294 )
(%o112) 91079 1858712879
719371297835304859421
3147520912307449253609760418850057591
2 3
4 5 6
(%i113) factor(1 + 295 +
295 + 295 + 295 + 295 + 295
2 3
4 5 24
+ (1 + 295 + 295 + 295 + 295 + 295 ) 295 )
(%o113) 5303 280921
47784653984301459297494761
5941811507533620701393083243953855047
2 3
4 5 6
(%i114) factor(1 + 296 +
296 + 296 + 296 + 296 + 296
2 3
4 5 24
+ (1 + 296 + 296 + 296 + 296 + 296 ) 296 )
(%o114) 3871224403 107557104829
35939978921351 114693581889539
271847242073287039553491
(%o114)
a.bat
b.txtに追加されるものは、
179,205
113,210
131,224
659,231
317,241
211,253
383,260
547,260
239,265
107,273