多項式(x^5+x^4+x^3+x^2+
x+1)*x^22+x^6+x^5+x^4+x^3+x^2+x+1
Ver.1.000 2012.5.20
更新履歴
2012.5.20 Ver.1.000 新規作成
多項式を変える。
(%i1)
factor((x^5+x^4+x^3+x^2+x+1)*x^22+x^6+x^5+x^4+x^3+x^2+x+1);
27 26 25
24 23 22
6 5 4
3 2
(%o1) x +
x + x + x + x +
x + x + x + x + x + x + x + 1
より、
e12.batを作った。以下に示す。
for x:2
while x<20 do(
y:factor((x^5+x^4+x^3+x^2+x+1)*x^22+x^6+x^5+x^4+x^3+x^2+x+1),
print("
x=",x),
print("factor(x)=",y)
);
e12.batをmaximaで実行した。
(%i2) batch("e12.bat");
read and interpret file: e12.bat
(%i3) for x from 2 while x <
20 do (y :
2 3 4
5
6
2 3 4
5 22
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)= 131 2017109
x= 3
factor(x)= 107 347 307649161
x= 4
factor(x)= 19 617 2048394945887
x= 5
factor(x)= 23 404896943465523947
x= 6
factor(x)= 6446581633
190513699891
x= 7
factor(x)= 419
182968427495501741771
x= 8
factor(x)= 23 179 4157 40237
4012670087693
x= 9
factor(x)= 263 102101396581
2436194896367
x= 10
factor(x)= 157
7077133757961783439497523
x= 11
factor(x)= 43597 355608343
930178703736883
x= 12
factor(x)= 23 4135499 9525851
165395054084147
x= 13
factor(x)= 1040697677
1241389144789349989457
x= 14
2
factor(x)= 13 8737
397230351239 16193850454853
x= 15
factor(x)= 59659 1419876049
718622443861926451
x= 16
factor(x)= 1627 21260928383
10006874471157650813
x= 17
factor(x)= 47 5563
6777084178497181311596578649
x= 18
factor(x)= 97 167 966611629
5530290949 95431776281
x= 19
factor(x)= 109 193
1685949280779811496034802200373
(%o3)
done
(%o3)
e12.bat
(%i4)
これより、b.txtは、以下のようになった。
131,2
107,3
347,3
19,4
617,4
23,5
419,7
23,8
179,8
263,9
157,10
23,12
13,14
47,17
97,18
167,18
109,19
193,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^22+%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
131n+2
107n+3
347n+3
19n+4
617n+4
23n+5
419n+7
23n+8
179n+8
263n+9
157n+10
23n+12
13n+14
47n+17
97n+18
167n+18
109n+19
193n+19
b.txt read! 18 個
$gcc -Wall
hajiku-6.c -o hajiku-6
$./hajiku-6
!!! 1 !!!
2=131x0+2
3=107x0+3
3=347x0+3
4=19x0+4
4=617x0+4
5=23x0+5
!!! 6 !!!
7=419x0+7
8=23x0+8
8=179x0+8
9=263x0+9
10=157x0+10
!!! 11 !!!
12=23x0+12
!!! 13 !!!
14=13x0+14
!!! 15 !!!
!!! 16 !!!
17=47x0+17
18=97x0+18
18=167x0+18
19=109x0+19
19=193x0+19
!!! 20 !!!
!!! 21 !!!
!!! 22 !!!
23=19x1+4
!!! 24 !!!
!!! 25 !!!
!!! 26 !!!
27=13x1+14
28=23x1+5
!!! 29 !!!
!!! 30 !!!
31=23x1+8
!!! 32 !!!
!!! 33 !!!
!!! 34 !!!
35=23x1+12
!!! 36 !!!
!!! 37 !!!
!!! 38 !!!
!!! 39 !!!
40=13x2+14
!!! 41 !!!
42=19x2+4
!!! 43 !!!
!!! 44 !!!
!!! 45 !!!
!!! 46 !!!
!!! 47 !!!
!!! 48 !!!
!!! 49 !!!
!!! 50 !!!
51=23x2+5
!!! 52 !!!
53=13x3+14
54=23x2+8
!!! 55 !!!
!!! 56 !!!
!!! 57 !!!
58=23x2+12
!!! 59 !!!
!!! 60 !!!
61=19x3+4
!!! 62 !!!
!!! 63 !!!
64=47x1+17
!!! 65 !!!
66=13x4+14
!!! 67 !!!
!!! 68 !!!
!!! 69 !!!
!!! 70 !!!
!!! 71 !!!
!!! 72 !!!
!!! 73 !!!
74=23x3+5
!!! 75 !!!
!!! 76 !!!
77=23x3+8
!!! 78 !!!
79=13x5+14
80=19x4+4
81=23x3+12
!!! 82 !!!
!!! 83 !!!
!!! 84 !!!
!!! 85 !!!
!!! 86 !!!
!!! 87 !!!
!!! 88 !!!
!!! 89 !!!
!!! 90 !!!
!!! 91 !!!
92=13x6+14
!!! 93 !!!
!!! 94 !!!
!!! 95 !!!
!!! 96 !!!
97=23x4+5
!!! 98 !!!
99=19x5+4
100=23x4+8
!!! 1 !!!
2=11x0+2
2=13x0+2
2=373x0+2
生成されたa.batは、
factor((1^5+1^4+1^3+1^2+1+1)*1^22+1^6+1^5+1^4+1^3+1^2+1+1);
factor((6^5+6^4+6^3+6^2+6+1)*6^22+6^6+6^5+6^4+6^3+6^2+6+1);
factor((11^5+11^4+11^3+11^2+11+1)*11^22+11^6+11^5+11^4+11^3+11^2+11+1);
factor((13^5+13^4+13^3+13^2+13+1)*13^22+13^6+13^5+13^4+13^3+13^2+13+1);
factor((15^5+15^4+15^3+15^2+15+1)*15^22+15^6+15^5+15^4+15^3+15^2+15+1);
factor((16^5+16^4+16^3+16^2+16+1)*16^22+16^6+16^5+16^4+16^3+16^2+16+1);
factor((20^5+20^4+20^3+20^2+20+1)*20^22+20^6+20^5+20^4+20^3+20^2+20+1);
factor((21^5+21^4+21^3+21^2+21+1)*21^22+21^6+21^5+21^4+21^3+21^2+21+1);
factor((22^5+22^4+22^3+22^2+22+1)*22^22+22^6+22^5+22^4+22^3+22^2+22+1);
factor((24^5+24^4+24^3+24^2+24+1)*24^22+24^6+24^5+24^4+24^3+24^2+24+1);
factor((25^5+25^4+25^3+25^2+25+1)*25^22+25^6+25^5+25^4+25^3+25^2+25+1);
factor((26^5+26^4+26^3+26^2+26+1)*26^22+26^6+26^5+26^4+26^3+26^2+26+1);
factor((29^5+29^4+29^3+29^2+29+1)*29^22+29^6+29^5+29^4+29^3+29^2+29+1);
factor((30^5+30^4+30^3+30^2+30+1)*30^22+30^6+30^5+30^4+30^3+30^2+30+1);
factor((32^5+32^4+32^3+32^2+32+1)*32^22+32^6+32^5+32^4+32^3+32^2+32+1);
factor((33^5+33^4+33^3+33^2+33+1)*33^22+33^6+33^5+33^4+33^3+33^2+33+1);
factor((34^5+34^4+34^3+34^2+34+1)*34^22+34^6+34^5+34^4+34^3+34^2+34+1);
factor((36^5+36^4+36^3+36^2+36+1)*36^22+36^6+36^5+36^4+36^3+36^2+36+1);
factor((37^5+37^4+37^3+37^2+37+1)*37^22+37^6+37^5+37^4+37^3+37^2+37+1);
factor((38^5+38^4+38^3+38^2+38+1)*38^22+38^6+38^5+38^4+38^3+38^2+38+1);
factor((39^5+39^4+39^3+39^2+39+1)*39^22+39^6+39^5+39^4+39^3+39^2+39+1);
factor((41^5+41^4+41^3+41^2+41+1)*41^22+41^6+41^5+41^4+41^3+41^2+41+1);
factor((43^5+43^4+43^3+43^2+43+1)*43^22+43^6+43^5+43^4+43^3+43^2+43+1);
factor((44^5+44^4+44^3+44^2+44+1)*44^22+44^6+44^5+44^4+44^3+44^2+44+1);
factor((45^5+45^4+45^3+45^2+45+1)*45^22+45^6+45^5+45^4+45^3+45^2+45+1);
factor((46^5+46^4+46^3+46^2+46+1)*46^22+46^6+46^5+46^4+46^3+46^2+46+1);
factor((47^5+47^4+47^3+47^2+47+1)*47^22+47^6+47^5+47^4+47^3+47^2+47+1);
factor((48^5+48^4+48^3+48^2+48+1)*48^22+48^6+48^5+48^4+48^3+48^2+48+1);
factor((49^5+49^4+49^3+49^2+49+1)*49^22+49^6+49^5+49^4+49^3+49^2+49+1);
factor((50^5+50^4+50^3+50^2+50+1)*50^22+50^6+50^5+50^4+50^3+50^2+50+1);
factor((52^5+52^4+52^3+52^2+52+1)*52^22+52^6+52^5+52^4+52^3+52^2+52+1);
factor((55^5+55^4+55^3+55^2+55+1)*55^22+55^6+55^5+55^4+55^3+55^2+55+1);
factor((56^5+56^4+56^3+56^2+56+1)*56^22+56^6+56^5+56^4+56^3+56^2+56+1);
factor((57^5+57^4+57^3+57^2+57+1)*57^22+57^6+57^5+57^4+57^3+57^2+57+1);
factor((59^5+59^4+59^3+59^2+59+1)*59^22+59^6+59^5+59^4+59^3+59^2+59+1);
factor((60^5+60^4+60^3+60^2+60+1)*60^22+60^6+60^5+60^4+60^3+60^2+60+1);
factor((62^5+62^4+62^3+62^2+62+1)*62^22+62^6+62^5+62^4+62^3+62^2+62+1);
factor((63^5+63^4+63^3+63^2+63+1)*63^22+63^6+63^5+63^4+63^3+63^2+63+1);
factor((65^5+65^4+65^3+65^2+65+1)*65^22+65^6+65^5+65^4+65^3+65^2+65+1);
factor((67^5+67^4+67^3+67^2+67+1)*67^22+67^6+67^5+67^4+67^3+67^2+67+1);
factor((68^5+68^4+68^3+68^2+68+1)*68^22+68^6+68^5+68^4+68^3+68^2+68+1);
factor((69^5+69^4+69^3+69^2+69+1)*69^22+69^6+69^5+69^4+69^3+69^2+69+1);
factor((70^5+70^4+70^3+70^2+70+1)*70^22+70^6+70^5+70^4+70^3+70^2+70+1);
factor((71^5+71^4+71^3+71^2+71+1)*71^22+71^6+71^5+71^4+71^3+71^2+71+1);
factor((72^5+72^4+72^3+72^2+72+1)*72^22+72^6+72^5+72^4+72^3+72^2+72+1);
factor((73^5+73^4+73^3+73^2+73+1)*73^22+73^6+73^5+73^4+73^3+73^2+73+1);
factor((75^5+75^4+75^3+75^2+75+1)*75^22+75^6+75^5+75^4+75^3+75^2+75+1);
factor((76^5+76^4+76^3+76^2+76+1)*76^22+76^6+76^5+76^4+76^3+76^2+76+1);
factor((78^5+78^4+78^3+78^2+78+1)*78^22+78^6+78^5+78^4+78^3+78^2+78+1);
factor((82^5+82^4+82^3+82^2+82+1)*82^22+82^6+82^5+82^4+82^3+82^2+82+1);
factor((83^5+83^4+83^3+83^2+83+1)*83^22+83^6+83^5+83^4+83^3+83^2+83+1);
factor((84^5+84^4+84^3+84^2+84+1)*84^22+84^6+84^5+84^4+84^3+84^2+84+1);
factor((85^5+85^4+85^3+85^2+85+1)*85^22+85^6+85^5+85^4+85^3+85^2+85+1);
factor((86^5+86^4+86^3+86^2+86+1)*86^22+86^6+86^5+86^4+86^3+86^2+86+1);
factor((87^5+87^4+87^3+87^2+87+1)*87^22+87^6+87^5+87^4+87^3+87^2+87+1);
factor((88^5+88^4+88^3+88^2+88+1)*88^22+88^6+88^5+88^4+88^3+88^2+88+1);
factor((89^5+89^4+89^3+89^2+89+1)*89^22+89^6+89^5+89^4+89^3+89^2+89+1);
factor((90^5+90^4+90^3+90^2+90+1)*90^22+90^6+90^5+90^4+90^3+90^2+90+1);
factor((91^5+91^4+91^3+91^2+91+1)*91^22+91^6+91^5+91^4+91^3+91^2+91+1);
factor((93^5+93^4+93^3+93^2+93+1)*93^22+93^6+93^5+93^4+93^3+93^2+93+1);
factor((94^5+94^4+94^3+94^2+94+1)*94^22+94^6+94^5+94^4+94^3+94^2+94+1);
factor((95^5+95^4+95^3+95^2+95+1)*95^22+95^6+95^5+95^4+95^3+95^2+95+1);
factor((96^5+96^4+96^3+96^2+96+1)*96^22+96^6+96^5+96^4+96^3+96^2+96+1);
factor((98^5+98^4+98^3+98^2+98+1)*98^22+98^6+98^5+98^4+98^3+98^2+98+1);
実行結果を示す。
(%i4) batc("a.bat");
(%o4)
batc(a.bat)
(%i5) batch("a.bat");
read and interpret file: a.bat
2 3 4
5
6
2 3 4
5 22
(%i6) factor(1 + 1 + 1 + 1 + 1 + 1 + 1 +
(1 + 1 + 1 + 1 + 1 + 1 ) 1 )
(%o6)
13
素数ですね。
2 3 4
5
6
2 3 4
5 22
(%i7) factor(1 + 6 + 6 + 6 + 6 + 6 + 6 +
(1 + 6 + 6 + 6 + 6 + 6 ) 6 )
(%o7)
6446581633 190513699891
2 3
4 5 6
(%i8) factor(1 + 11 + 11 + 11 + 11 + 11 + 11
2 3
4 5 22
+ (1 + 11 + 11 + 11 + 11 + 11 ) 11 )
(%o8)
43597 355608343 930178703736883
2 3
4 5 6
(%i9) factor(1 + 13 + 13 + 13 + 13 + 13 + 13
2 3
4 5 22
+ (1 + 13 + 13 + 13 + 13 + 13 ) 13 )
(%o9)
1040697677 1241389144789349989457
2 3
4 5 6
(%i10) factor(1 + 15 + 15 + 15 + 15 + 15 + 15
2 3
4 5 22
+ (1 + 15 + 15 + 15 + 15 + 15 ) 15 )
(%o10)
59659 1419876049 718622443861926451
2 3
4 5 6
(%i11) factor(1 + 16 + 16 + 16 + 16 + 16 + 16
2 3
4 5 22
+ (1 + 16 + 16 + 16 + 16 + 16 ) 16 )
(%o11)
1627 21260928383 10006874471157650813
2 3
4 5 6
(%i12) factor(1 + 20 + 20 + 20 + 20 + 20 + 20
2 3
4 5 22
+ (1 + 20 + 20 + 20 + 20 + 20 ) 20 )
(%o12)
241 346391 1692398488210220692848825491
2 3
4 5 6
(%i13) factor(1 + 21 + 21 + 21 + 21 + 21 + 21
2 3
4 5 22
+ (1 + 21 + 21 + 21 + 21 + 21 ) 21 )
(%o13)
1433 367167355405304328268674031442981
2 3
4 5 6
(%i14) factor(1 + 22 + 22 + 22 + 22 + 22 + 22
2 3
4 5 22
+ (1 + 22 + 22 + 22 + 22 + 22 ) 22 )
(%o14)
1843383791288148051825463716557909059
素数ですね。
2 3
4 5 6
(%i15) factor(1 + 24 + 24 + 24 + 24 + 24 + 24
2 3
4 5 22
+ (1 + 24 + 24 + 24 + 24 + 24 ) 24 )
(%o15)
2588969 111377322271 66721116786867716399
2 3
4 5 6
(%i16) factor(1 + 25 + 25 + 25 + 25 + 25 + 25
2 3
4 5 22
+ (1 + 25 + 25 + 25 + 25 + 25 ) 25 )
(%o16)
54757523 145725939952027 7246500722071181
2 3
4 5 6
(%i17) factor(1 + 26 + 26 + 26 + 26 + 26 + 26
2 3
4 5 22
+ (1 + 26 + 26 + 26 + 26 + 26 ) 26 )
(%o17) 73
487 2381 82834732947839 23740509757332307
2 3
4 5 6
(%i18) factor(1 + 29 + 29 + 29 + 29 + 29 + 29
2 3
4 5 22
+ (1 + 29 + 29 + 29 + 29 + 29 ) 29 )
(%o18)
68313671 46289051867133788216381348777531
2 3
4 5 6
(%i19) factor(1 + 30 + 30 + 30 + 30 + 30 + 30
2 3
4 5 22
+ (1 + 30 + 30 + 30 + 30 + 30 ) 30 )
(%o19)
315737332154999 24984530836875230499557069
2 3
4 5 6
(%i20) factor(1 + 32 + 32 + 32 + 32 + 32 + 32
2 3
4 5 22
+ (1 + 32 + 32 + 32 + 32 + 32 ) 32 )
(%o20) 61 229
5431 443967190831 1334878387523821467961
2 3
4 5 6
(%i21) factor(1 + 33 + 33 + 33 + 33 + 33 + 33
2 3
4 5 22
+ (1 + 33 + 33 + 33 + 33 + 33 ) 33 )
(%o21)
834648493496659 123519841039461436640563231
2 3
4 5 6
(%i22) factor(1 + 34 + 34 + 34 + 34 + 34 + 34
2 3
4 5 22
+ (1 + 34 + 34 + 34 + 34 + 34 ) 34 )
(%o22)
39863 23921668991453 241843422778210775438509
2 3
4 5 6
(%i23) factor(1 + 36 + 36 + 36 + 36 + 36 + 36
2 3
4 5 22
+ (1 + 36 + 36 + 36 + 36 + 36 ) 36 )
(%o23) 73 3253 1044697
58711141817 73974864668772059753
2 3
4 5 6
(%i24) factor(1 + 37 + 37 + 37 + 37 + 37 + 37
2 3
4 5 22
+ (1 + 37 + 37 + 37 + 37 + 37 ) 37 )
(%o24)
2256034688086570790499803058170183564867869
素数ですね。
2 3
4 5 6
(%i25) factor(1 + 38 + 38 + 38 + 38 + 38 + 38
2 3
4 5 22
+ (1 + 38 + 38 + 38 + 38 + 38 ) 38 )
(%o25) 68567
50071367 1349069688704603017893680017651
2 3
4 5 6
(%i26) factor(1 + 39 + 39 + 39 + 39 + 39 + 39
2 3
4 5 22
+ (1 + 39 + 39 + 39 + 39 + 39 ) 39 )
(%o26) 41 15749
14454016970367521265966632638046081989
2 3
4 5 6
(%i27) factor(1 + 41 + 41 + 41 + 41 + 41 + 41
2 3
4 5 22
+ (1 + 41 + 41 + 41 + 41 + 41 ) 41 )
(%o27) 7573
17835363064212863023 266279716231448825527
2 3
4 5 6
(%i28) factor(1 + 43 + 43 + 43 + 43 + 43 + 43
2 3
4 5 22
+ (1 + 43 + 43 + 43 + 43 + 43 ) 43 )
(%o28) 1140289 6102253
18679374158125217503913280105397
2 3
4 5 6
(%i29) factor(1 + 44 + 44 + 44 + 44 + 44 + 44
2 3
4 5 22
+ (1 + 44 + 44 + 44 + 44 + 44 ) 44 )
(%o29) 13681
4353301030016629 4057606648717388076409849
2 3
4 5 6
(%i30) factor(1 + 45 + 45 + 45 + 45 + 45 + 45
2 3
4 5 22
+ (1 + 45 + 45 + 45 + 45 + 45 ) 45 )
(%o30) 7687
57642237183351009669862025648498933263483
2 3
4 5 6
(%i31) factor(1 + 46 + 46 + 46 + 46 + 46 + 46
2 3
4 5 22
+ (1 + 46 + 46 + 46 + 46 + 46 ) 46 )
(%o31) 139 491 710867
4086926133739807 4043201062057479583
2 3
4 5 6
(%i32) factor(1 + 47 + 47 + 47 + 47 + 47 + 47
2 3
4 5 22
+ (1 + 47 + 47 + 47 + 47 + 47 ) 47 )
(%o32) 240059
5965738295182568479003963301672478977651
2 3
4 5 6
(%i33) factor(1 + 48 + 48 + 48 + 48 + 48 + 48
2 3
4 5 22
+ (1 + 48 + 48 + 48 + 48 + 48 ) 48 )
(%o33) 10035105637
5099173758603553 49389545406119563069
2 3
4 5 6
(%i34) factor(1 + 49 + 49 + 49 + 49 + 49 + 49
2 3
4 5 22
+ (1 + 49 + 49 + 49 + 49 + 49 ) 49 )
(%o34)
4408075287232056062620558033206531066645967501
素数ですね。
2 3
4 5 6
(%i35) factor(1 + 50 + 50 + 50 + 50 + 50 + 50
2 3
4 5 22
+ (1 + 50 + 50 + 50 + 50 + 50 ) 50 )
(%o35) 354424067
17092557980482489 1254971244455507649677
2 3
4 5 6
(%i36) factor(1 + 52 + 52 + 52 + 52 + 52 + 52
2 3
4 5 22
+ (1 + 52 + 52 + 52 + 52 + 52 ) 52 )
(%o36) 3881 17707 20945081 13303612237583
1143887181950668769
2 3
4 5 6
(%i37) factor(1 + 55 + 55 + 55 + 55 + 55 + 55
2 3
4 5 22
+ (1 + 55 + 55 + 55 + 55 + 55 ) 55 )
(%o37) 1250749 72942361433
1090464577632941537506689084893
2 3
4 5 6
(%i38) factor(1 + 56 + 56 + 56 + 56 + 56 + 56
2 3
4 5 22
+ (1 + 56 + 56 + 56 + 56 + 56 ) 56 )
(%o38) 59 137 2028629 7714670433551
1278820178241806874525529
2 3
4 5 6
(%i39) factor(1 + 57 + 57 + 57 + 57 + 57 + 57
2 3
4 5 22
+ (1 + 57 + 57 + 57 + 57 + 57 ) 57 )
(%o39) 4265023129
206541483919897037 296059668289425847913
2 3
4 5 6
(%i40) factor(1 + 59 + 59 + 59 + 59 + 59 + 59
2 3
4 5 22
+ (1 + 59 + 59 + 59 + 59 + 59 ) 59 )
(%o40) 6121 2538113
6835137665703929 6227987515416122767153
2 3
4 5 6
(%i41) factor(1 + 60 + 60 + 60 + 60 + 60 + 60
2 3
4 5 22
+ (1 + 60 + 60 + 60 + 60 + 60 ) 60 )
(%o41) 89
11694805207261843064889988314606741573566817749
2 3
4 5 6
(%i42) factor(1 + 62 + 62 + 62 + 62 + 62 + 62
2 3
4 5 22
+ (1 + 62 + 62 + 62 + 62 + 62 ) 62 )
(%o42) 1187 27697 53047 36003839 3359617931
11952382733440452227
2 3
4 5 6
(%i43) factor(1 + 63 + 63 + 63 + 63 + 63 + 63
2 3
4 5 22
+ (1 + 63 + 63 + 63 + 63 + 63 ) 63 )
(%o43) 6959 3739269780786860183
149214167056322596290387337
2 3
4 5 6
(%i44) factor(1 + 65 + 65 + 65 + 65 + 65 + 65
2 3
4 5 22
+ (1 + 65 + 65 + 65 + 65 + 65 ) 65 )
(%o44) 487 599 94416577
327634764204974738243765814472232141
2 3
4 5 6
(%i45) factor(1 + 67 + 67 + 67 + 67 + 67 + 67
2 3
4 5 22
+ (1 + 67 + 67 + 67 + 67 + 67 ) 67 )
(%o45) 7321 225620939 10655682043
1161500705269610743082152817
2 3
4 5 6
(%i46) factor(1 + 68 + 68 + 68 + 68 + 68 + 68
2 3
4 5 22
+ (1 + 68 + 68 + 68 + 68 + 68 ) 68 )
(%o46) 636788181361
127075801715376599 376805211117332461091
2 3
4 5 6
(%i47) factor(1 + 69 + 69 + 69 + 69 + 69 + 69
2 3
4 5 22
+ (1 + 69 + 69 + 69 + 69 + 69 ) 69 )
(%o47) 271897 50887684949713397
3267747705086905565594741489
2 3
4 5 6
(%i48) factor(1 + 70 + 70 + 70 + 70 + 70 + 70
2 3
4 5 22
+ (1 + 70 + 70 + 70 + 70 + 70 ) 70 )
(%o48) 542086913
122977909707811042985743294987090012999667
2 3
4 5 6
(%i49) factor(1 + 71 + 71 + 71 + 71 + 71 + 71
2 3
4 5 22
+ (1 + 71 + 71 + 71 + 71 + 71 ) 71 )
(%o49) 647
151088511788198751775196636328273186989741389559
2 3
4 5 6
(%i50) factor(1 + 72 + 72 + 72 + 72 + 72 + 72
2 3
4 5 22
+ (1 + 72 + 72 + 72 + 72 + 72 ) 72 )
(%o50) 79 7369 4057861 606571779147613
99503082813791754102463
2 3
4 5 6
(%i51) factor(1 + 73 + 73 + 73 + 73 + 73 + 73
2 3
4 5 22
+ (1 + 73 + 73 + 73 + 73 + 73 ) 73 )
(%o51) 2729 56180541547245955751707
1349329856433406102156703
2 3
4 5 6
(%i52) factor(1 + 75 + 75 + 75 + 75 + 75 + 75
2 3
4 5 22
+ (1 + 75 + 75 + 75 + 75 + 75 ) 75 )
(%o52) 5399 12763 26714595451
233060651762176208439699992196623
2 3
4 5 6
(%i53) factor(1 + 76 + 76 + 76 + 76 + 76 + 76
2 3
4 5 22
+ (1 + 76 + 76 + 76 + 76 + 76 ) 76 )
(%o53) 11082338981807
55346210488202710385682620077267443059
2 3
4 5 6
(%i54) factor(1 + 78 + 78 + 78 + 78 + 78 + 78
2 3
4 5 22
+ (1 + 78 + 78 + 78 + 78 + 78 ) 78 )
(%o54) 5437 9748673497
23326699350542527399239625476001625071
2 3
4 5 6
(%i55) factor(1 + 82 + 82 + 82 + 82 + 82 + 82
2 3
4 5 22
+ (1 + 82 + 82 + 82 + 82 + 82 ) 82 )
(%o55) 100468157429
47454173133959980638226214605553154183731
2 3
4 5 6
(%i56) factor(1 + 83 + 83 + 83 + 83 + 83 + 83
2 3
4 5 22
+ (1 + 83 + 83 + 83 + 83 + 83 ) 83 )
(%o56) 20860261889
316995412837148983763882855296863669562961
2 3
4 5 6
(%i57) factor(1 + 84 + 84 + 84 + 84 + 84 + 84
2 3
4 5 22
+ (1 + 84 + 84 + 84 + 84 + 84 ) 84 )
(%o57) 347 439 4603 157427 2975741 5173409
5375956983283246610496973
2 3
4 5 6
(%i58) factor(1 + 85 + 85 + 85 + 85 + 85 + 85
2 3
4 5 22
+ (1 + 85 + 85 + 85 + 85 + 85 ) 85 )
(%o58) 1439 12713 265455919 18721489789 833966534659
165828949867267
2 3
4 5 6
(%i59) factor(1 + 86 + 86 + 86 + 86 + 86 + 86
2 3
4 5 22
+ (1 + 86 + 86 + 86 + 86 + 86 ) 86 )
(%o59) 592701919 15692740606519
1853542633021546249303457793163
2 3
4 5 6
(%i60) factor(1 + 87 + 87 + 87 + 87 + 87 + 87
2 3
4 5 22
+ (1 + 87 + 87 + 87 + 87 + 87 ) 87 )
(%o60) 21683771 4296986384587656596087
252779489480198698815397
2 3
4 5 6
(%i61) factor(1 + 88 + 88 + 88 + 88 + 88 + 88
2 3
4 5 22
+ (1 + 88 + 88 + 88 + 88 + 88 ) 88 )
(%o61) 164881 179199617
1085145259957348233309786124854237093257
2 3
4 5 6
(%i62) factor(1 + 89 + 89 + 89 + 89 + 89 + 89
2 3
4 5 22
+ (1 + 89 + 89 + 89 + 89 + 89 ) 89 )
(%o62) 31 128549 1745364831031 31109244370013461
201016373819307869
2 3
4 5 6
(%i63) factor(1 + 90 + 90 + 90 + 90 + 90 + 90
2 3
4 5 22
+ (1 + 90 + 90 + 90 + 90 + 90 ) 90 )
(%o63) 1870067 647795511104697913
48540601857605965479191501621
2 3
4 5 6
(%i64) factor(1 + 91 + 91 + 91 + 91 + 91 + 91
2 3
4 5 22
+ (1 + 91 + 91 + 91 + 91 + 91 ) 91 )
(%o64) 198811 1409970465019858663
282661103627107923547603275781
2 3
4 5 6
(%i65) factor(1 + 93 + 93 + 93 + 93 + 93 + 93
2 3
4 5 22
+ (1 + 93 + 93 + 93 + 93 + 93 ) 93 )
(%o65) 61 29614726505022037 213749824889444873
368970294864680309
2 3
4 5 6
(%i66) factor(1 + 94 + 94 + 94 + 94 + 94 + 94
2 3
4 5 22
+ (1 + 94 + 94 + 94 + 94 + 94 ) 94 )
(%o66) 67 2143
1324341469615119750754715091594171517873926420871
2 3
4 5 6
(%i67) factor(1 + 95 + 95 + 95 + 95 + 95 + 95
2 3
4 5 22
+ (1 + 95 + 95 + 95 + 95 + 95 ) 95 )
(%o67) 3631 6317 5203195843 125293740959856571
16919846537719556891
2 3
4 5 6
(%i68) factor(1 + 96 + 96 + 96 + 96 + 96 + 96
2 3
4 5 22
+ (1 + 96 + 96 + 96 + 96 + 96 ) 96 )
(%o68) 379 599663 37310908105599677
39581170886607257749566008737
2 3
4 5 6
(%i69) factor(1 + 98 + 98 + 98 + 98 + 98 + 98
2 3
4 5 22
+ (1 + 98 + 98 + 98 + 98 + 98 ) 98 )
(%o69) 107 902089 39646731001
153009302769373368184114229706400733
(%o69)
a.bat
(%i70)
b.txtに追加されるものは、
241,20
73,26
487,26
73,36
41,39
139,46
491,46
59,56
137,56
89,60
487,65
647,71
79,72
347,84
439,84
31,89
61,93
67,94
379,96
107,98
これより、Autohajiku.cの
#define max 1 /* この数から+100まで生成する
*/
を
#define max 100 /*
この数から+100まで生成する */
になおして、
Autohajiku.cをコンパイル実行する。
$gcc
-Wall Autohajiku.c -o Autohajiku
$./Autohajiku
131n+2
107n+3
347n+3
19n+4
617n+4
23n+5
419n+7
23n+8
179n+8
263n+9
157n+10
23n+12
13n+14
47n+17
97n+18
167n+18
109n+19
193n+19
241n+20
73n+26
487n+26
73n+36
41n+39
139n+46
491n+46
59n+56
137n+56
89n+60
487n+65
647n+71
79n+72
347n+84
439n+84
31n+89
61n+93
67n+94
379n+96
107n+98
b.txt read! 38 個
$gcc
-Wall hajiku-6.c -o hajiku-6
$./hajiku-6
100=23x4+8
!!! 101 !!!
!!! 102 !!!
!!! 103 !!!
104=23x4+12
105=13x7+14
!!! 106 !!!
!!! 107 !!!
!!! 108 !!!
109=73x1+36
110=107x1+3
111=47x2+17
!!! 112 !!!
!!! 113 !!!
!!! 114 !!!
115=97x1+18
115=59x1+56
!!! 116 !!!
!!! 117 !!!
118=19x6+4
118=13x8+14
!!! 119 !!!
120=23x5+5
120=31x1+89
121=41x2+39
!!! 122 !!!
123=23x5+8
!!! 124 !!!
!!! 125 !!!
!!! 126 !!!
127=23x5+12
128=109x1+19
!!! 129 !!!
!!! 130 !!!
131=13x9+14
!!! 132 !!!
133=131x1+2
!!! 134 !!!
!!! 135 !!!
!!! 136 !!!
137=19x7+4
!!! 138 !!!
!!! 139 !!!
!!! 140 !!!
!!! 141 !!!
!!! 142 !!!
143=23x6+5
144=13x10+14
!!! 145 !!!
146=23x6+8
!!! 147 !!!
!!! 148 !!!
149=89x1+60
150=23x6+12
151=79x1+72
151=31x2+89
!!! 152 !!!
!!! 153 !!!
154=61x1+93
!!! 155 !!!
156=19x8+4
157=13x11+14
158=47x3+17
!!! 159 !!!
!!! 160 !!!
161=67x1+94
162=41x3+39
!!! 163 !!!
!!! 164 !!!
!!! 165 !!!
166=23x7+5
167=157x1+10
!!! 168 !!!
169=23x7+8
170=13x12+14
!!! 171 !!!
172=73x2+26
173=23x7+12
174=59x2+56
175=19x9+4
!!! 176 !!!
!!! 177 !!!
!!! 178 !!!
!!! 179 !!!
!!! 180 !!!
!!! 181 !!!
182=73x2+36
182=31x3+89
183=13x13+14
!!! 184 !!!
185=167x1+18
185=139x1+46
!!! 186 !!!
187=179x1+8
!!! 188 !!!
189=23x8+5
!!! 190 !!!
!!! 191 !!!
192=23x8+8
193=137x1+56
194=19x10+4
!!! 195 !!!
196=23x8+12
196=13x14+14
!!! 197 !!!
!!! 198 !!!
!!! 199 !!!
生成されたa.batは、
factor((101^5+101^4+101^3+101^2+101+1)*101^22+101^6+101^5+101^4+101^3+101^2+101+1);
factor((102^5+102^4+102^3+102^2+102+1)*102^22+102^6+102^5+102^4+102^3+102^2+102+1);
factor((103^5+103^4+103^3+103^2+103+1)*103^22+103^6+103^5+103^4+103^3+103^2+103+1);
factor((106^5+106^4+106^3+106^2+106+1)*106^22+106^6+106^5+106^4+106^3+106^2+106+1);
factor((107^5+107^4+107^3+107^2+107+1)*107^22+107^6+107^5+107^4+107^3+107^2+107+1);
factor((108^5+108^4+108^3+108^2+108+1)*108^22+108^6+108^5+108^4+108^3+108^2+108+1);
factor((112^5+112^4+112^3+112^2+112+1)*112^22+112^6+112^5+112^4+112^3+112^2+112+1);
factor((113^5+113^4+113^3+113^2+113+1)*113^22+113^6+113^5+113^4+113^3+113^2+113+1);
factor((114^5+114^4+114^3+114^2+114+1)*114^22+114^6+114^5+114^4+114^3+114^2+114+1);
factor((116^5+116^4+116^3+116^2+116+1)*116^22+116^6+116^5+116^4+116^3+116^2+116+1);
factor((117^5+117^4+117^3+117^2+117+1)*117^22+117^6+117^5+117^4+117^3+117^2+117+1);
factor((119^5+119^4+119^3+119^2+119+1)*119^22+119^6+119^5+119^4+119^3+119^2+119+1);
factor((122^5+122^4+122^3+122^2+122+1)*122^22+122^6+122^5+122^4+122^3+122^2+122+1);
factor((124^5+124^4+124^3+124^2+124+1)*124^22+124^6+124^5+124^4+124^3+124^2+124+1);
factor((125^5+125^4+125^3+125^2+125+1)*125^22+125^6+125^5+125^4+125^3+125^2+125+1);
factor((126^5+126^4+126^3+126^2+126+1)*126^22+126^6+126^5+126^4+126^3+126^2+126+1);
factor((129^5+129^4+129^3+129^2+129+1)*129^22+129^6+129^5+129^4+129^3+129^2+129+1);
factor((130^5+130^4+130^3+130^2+130+1)*130^22+130^6+130^5+130^4+130^3+130^2+130+1);
factor((132^5+132^4+132^3+132^2+132+1)*132^22+132^6+132^5+132^4+132^3+132^2+132+1);
factor((134^5+134^4+134^3+134^2+134+1)*134^22+134^6+134^5+134^4+134^3+134^2+134+1);
factor((135^5+135^4+135^3+135^2+135+1)*135^22+135^6+135^5+135^4+135^3+135^2+135+1);
factor((136^5+136^4+136^3+136^2+136+1)*136^22+136^6+136^5+136^4+136^3+136^2+136+1);
factor((138^5+138^4+138^3+138^2+138+1)*138^22+138^6+138^5+138^4+138^3+138^2+138+1);
factor((139^5+139^4+139^3+139^2+139+1)*139^22+139^6+139^5+139^4+139^3+139^2+139+1);
factor((140^5+140^4+140^3+140^2+140+1)*140^22+140^6+140^5+140^4+140^3+140^2+140+1);
factor((141^5+141^4+141^3+141^2+141+1)*141^22+141^6+141^5+141^4+141^3+141^2+141+1);
factor((142^5+142^4+142^3+142^2+142+1)*142^22+142^6+142^5+142^4+142^3+142^2+142+1);
factor((145^5+145^4+145^3+145^2+145+1)*145^22+145^6+145^5+145^4+145^3+145^2+145+1);
factor((147^5+147^4+147^3+147^2+147+1)*147^22+147^6+147^5+147^4+147^3+147^2+147+1);
factor((148^5+148^4+148^3+148^2+148+1)*148^22+148^6+148^5+148^4+148^3+148^2+148+1);
factor((152^5+152^4+152^3+152^2+152+1)*152^22+152^6+152^5+152^4+152^3+152^2+152+1);
factor((153^5+153^4+153^3+153^2+153+1)*153^22+153^6+153^5+153^4+153^3+153^2+153+1);
factor((155^5+155^4+155^3+155^2+155+1)*155^22+155^6+155^5+155^4+155^3+155^2+155+1);
factor((159^5+159^4+159^3+159^2+159+1)*159^22+159^6+159^5+159^4+159^3+159^2+159+1);
factor((160^5+160^4+160^3+160^2+160+1)*160^22+160^6+160^5+160^4+160^3+160^2+160+1);
factor((163^5+163^4+163^3+163^2+163+1)*163^22+163^6+163^5+163^4+163^3+163^2+163+1);
factor((164^5+164^4+164^3+164^2+164+1)*164^22+164^6+164^5+164^4+164^3+164^2+164+1);
factor((165^5+165^4+165^3+165^2+165+1)*165^22+165^6+165^5+165^4+165^3+165^2+165+1);
factor((168^5+168^4+168^3+168^2+168+1)*168^22+168^6+168^5+168^4+168^3+168^2+168+1);
factor((171^5+171^4+171^3+171^2+171+1)*171^22+171^6+171^5+171^4+171^3+171^2+171+1);
factor((176^5+176^4+176^3+176^2+176+1)*176^22+176^6+176^5+176^4+176^3+176^2+176+1);
factor((177^5+177^4+177^3+177^2+177+1)*177^22+177^6+177^5+177^4+177^3+177^2+177+1);
factor((178^5+178^4+178^3+178^2+178+1)*178^22+178^6+178^5+178^4+178^3+178^2+178+1);
factor((179^5+179^4+179^3+179^2+179+1)*179^22+179^6+179^5+179^4+179^3+179^2+179+1);
factor((180^5+180^4+180^3+180^2+180+1)*180^22+180^6+180^5+180^4+180^3+180^2+180+1);
factor((181^5+181^4+181^3+181^2+181+1)*181^22+181^6+181^5+181^4+181^3+181^2+181+1);
factor((184^5+184^4+184^3+184^2+184+1)*184^22+184^6+184^5+184^4+184^3+184^2+184+1);
factor((186^5+186^4+186^3+186^2+186+1)*186^22+186^6+186^5+186^4+186^3+186^2+186+1);
factor((188^5+188^4+188^3+188^2+188+1)*188^22+188^6+188^5+188^4+188^3+188^2+188+1);
factor((190^5+190^4+190^3+190^2+190+1)*190^22+190^6+190^5+190^4+190^3+190^2+190+1);
factor((191^5+191^4+191^3+191^2+191+1)*191^22+191^6+191^5+191^4+191^3+191^2+191+1);
factor((195^5+195^4+195^3+195^2+195+1)*195^22+195^6+195^5+195^4+195^3+195^2+195+1);
factor((197^5+197^4+197^3+197^2+197+1)*197^22+197^6+197^5+197^4+197^3+197^2+197+1);
factor((198^5+198^4+198^3+198^2+198+1)*198^22+198^6+198^5+198^4+198^3+198^2+198+1);
factor((199^5+199^4+199^3+199^2+199+1)*199^22+199^6+199^5+199^4+199^3+199^2+199+1);
(%i70) batch("a.bat");
read and interpret file: a.bat
2 3
4 5 6
(%i71) factor(1 + 101 + 101
+ 101 + 101 + 101 + 101
2 3
4 5 22
+ (1 + 101 + 101 + 101 + 101 + 101 ) 101 )
(%o71) 18301
153407 685039 687010177482160955647495874923345894481
2 3
4 5 6
(%i72) factor(1 + 102 + 102
+ 102 + 102 + 102 + 102
2 3
4 5 22
+ (1 + 102 + 102 + 102 + 102 + 102 ) 102 )
(%o72) 409
494327 99053832462100007 86074500680818892072081694379
2 3
4 5 6
(%i73) factor(1 + 103 + 103
+ 103 + 103 + 103 + 103
2 3
4 5 22
+ (1 + 103 + 103 + 103 + 103 + 103 ) 103 )
(%o73)
52026362784976211 43114033514714165849392970584882900379
2 3
4 5 6
(%i74) factor(1 + 106 + 106
+ 106 + 106 + 106 + 106
2 3
4 5 22
+ (1 + 106 + 106 + 106 + 106 + 106 ) 106 )
(%o74) 193 8419
176686643613983 16957170580383576971839785555078323
2 3
4 5 6
(%i75) factor(1 + 107 + 107
+ 107 + 107 + 107 + 107
2 3
4 5 22
+ (1 + 107 + 107 + 107 + 107 + 107 ) 107 )
(%o75) 113
26810060659 2070444864586030238801302712362611949123547
2 3
4 5 6
(%i76) factor(1 + 108 + 108
+ 108 + 108 + 108 + 108
2 3
4 5 22
+ (1 + 108 + 108 + 108 + 108 + 108 ) 108 )
(%o76)
227 35518573783912019321877561369928303718534525537442527
2 3
4 5 6
(%i77) factor(1 + 112 + 112
+ 112 + 112 + 112 + 112
2 3
4 5 22
+ (1 + 112 + 112 + 112 + 112 + 112 ) 112 )
(%o77)
21516996834850080660337349493635148512351922472693965169
素数ですね。
2 3
4 5 6
(%i78) factor(1 + 113 + 113
+ 113 + 113 + 113 + 113
2 3
4 5 22
+ (1 + 113 + 113 + 113 + 113 + 113 ) 113 )
(%o78) 22039
8866029077 139977218283867976668547119566958931974863
2 3
4 5 6
(%i79) factor(1 + 114 + 114
+ 114 + 114 + 114 + 114
2 3
4 5 22
+ (1 + 114 + 114 + 114 + 114 + 114 ) 114 )
(%o79) 257 1259
25737973 4166047329370700695059965957393575214296249
2 3
4 5 6
(%i80) factor(1 + 116 + 116
+ 116 + 116 + 116 + 116
2 3
4 5 22
+ (1 + 116 + 116 + 116 + 116 + 116 ) 116 )
(%o80)
55478646609062507950150454662054280040609300919006468933
素数ですね。
2 3
4 5 6
(%i81) factor(1 + 117 + 117
+ 117 + 117 + 117 + 117
2 3
4 5 22
+ (1 + 117 + 117 + 117 + 117 + 117 ) 117 )
(%o81)
81446684209384663891293673 858761827044688929901297315093
2 3
4 5 6
(%i82) factor(1 + 119 + 119
+ 119 + 119 + 119 + 119
2 3
4 5 22
+ (1 + 119 + 119 + 119 + 119 + 119 ) 119 )
(%o82) 3581 4813 118891
12675477817 4254998482097302174256728570758611
2 3
4 5 6
(%i83) factor(1 + 122 + 122
+ 122 + 122 + 122 + 122
2 3
4 5 22
+ (1 + 122 + 122 + 122 + 122 + 122 ) 122 )
(%o83) 1031 387403
541836483155279657343931669353409072137601937363
2 3
4 5 6
(%i84) factor(1 + 124 + 124
+ 124 + 124 + 124 + 124
2 3
4 5 22
+ (1 + 124 + 124 + 124 + 124 + 124 ) 124 )
(%o84)
3577595657224207 22604129634507089453 4150716095358302263631
2 3
4 5 6
(%i85) factor(1 + 125 + 125
+ 125 + 125 + 125 + 125
2 3
4 5 22
+ (1 + 125 + 125 + 125 + 125 + 125 ) 125 )
(%o85) 11423
5046043411441763 7233150804127761247313864749835569249
2 3
4 5 6
(%i86) factor(1 + 126 + 126
+ 126 + 126 + 126 + 126
2 3
4 5 22
+ (1 + 126 + 126 + 126 + 126 + 126 ) 126 )
(%o86) 499 7963
130103203114078254254248026010760730704284921565899
2 3
4 5 6
(%i87) factor(1 + 129 + 129
+ 129 + 129 + 129 + 129
2 3
4 5 22
+ (1 + 129 + 129 + 129 + 129 + 129 ) 129 )
(%o87)
975667679901652691713238715470565621896433666758276748301
素数ですね。
2 3
4 5 6
(%i88) factor(1 + 130 + 130
+ 130 + 130 + 130 + 130
2 3
4 5 22
+ (1 + 130 + 130 + 130 + 130 + 130 ) 130 )
(%o88)
2902641281 414029024015746729429590936926506279506055162751
2 3
4 5 6
(%i89) factor(1 + 132 + 132
+ 132 + 132 + 132 + 132
2 3
4 5 22
+ (1 + 132 + 132 + 132 + 132 + 132 ) 132 )
(%o89) 11666989
88576217 1755993328773540760252547191557871242610673
2 3
4 5 6
(%i90) factor(1 + 134 + 134
+ 134 + 134 + 134 + 134
2 3
4 5 22
+ (1 + 134 + 134 + 134 + 134 + 134 ) 134 )
(%o90)
71513089307510907363636047 38080020510611163221192337472733
2 3
4 5 6
(%i91) factor(1 + 135 + 135
+ 135 + 135 + 135 + 135
2 3
4 5 22
+ (1 + 135 + 135 + 135 + 135 + 135 ) 135 )
(%o91) 571543873
2674965424187477 2177072907262981779094379965382141
2 3
4 5 6
(%i92) factor(1 + 136 + 136
+ 136 + 136 + 136 + 136
2 3
4 5 22
+ (1 + 136 + 136 + 136 + 136 + 136 ) 136 )
(%o92) 20280401
1816128730237351 307896718371737981 358201532027374603
2 3
4 5 6
(%i93) factor(1 + 138 + 138
+ 138 + 138 + 138 + 138
2 3
4 5 22
+ (1 + 138 + 138 + 138 + 138 + 138 ) 138 )
(%o93) 14364433 930324887
14798797677165263 30461009529702057448584943
2 3
4 5 6
(%i94) factor(1 + 139 + 139
+ 139 + 139 + 139 + 139
2 3
4 5 22
+ (1 + 139 + 139 + 139 + 139 + 139 ) 139 )
(%o94) 11483 26137639625299
24390100514033667599620214358401674950353
2 3
4 5 6
(%i95) factor(1 + 140 + 140
+ 140 + 140 + 140 + 140
2 3
4 5 22
+ (1 + 140 + 140 + 140 + 140 + 140 ) 140 )
(%o95) 197 162751
529762279082119 522997093203785719567558282270116737
2 3
4 5 6
(%i96) factor(1 + 141 + 141
+ 141 + 141 + 141 + 141
2 3
4 5 22
+ (1 + 141 + 141 + 141 + 141 + 141 ) 141 )
(%o96) 179 6881123
606023726629 14421324163739210360257609670249266081
2 3
4 5 6
(%i97) factor(1 + 142 + 142
+ 142 + 142 + 142 + 142
2 3
4 5 22
+ (1 + 142 + 142 + 142 + 142 + 142 ) 142 )
(%o97) 2383
5466766038000236972167499404329981760270346822928642133
2 3
4 5 6
(%i98) factor(1 + 145 + 145
+ 145 + 145 + 145 + 145
2 3
4 5 22
+ (1 + 145 + 145 + 145 + 145 + 145 ) 145 )
(%o98) 1553 165559 8235309340603
10817761520863285350547005943258338641
2 3
4 5 6
(%i99) factor(1 + 147 + 147
+ 147 + 147 + 147 + 147
2 3
4 5 22
+ (1 + 147 + 147 + 147 + 147 + 147 ) 147 )
(%o99) 331 900803831421601
43101451428799481 2579778408088590307881419
2 3
4 5 6
(%i100) factor(1 + 148 +
148 + 148 + 148 + 148 + 148
2 3
4 5 22
+ (1 + 148 + 148 + 148 + 148 + 148 ) 148 )
(%o100) 3727 11793151558987
21591251148199 41951125268983547418821111959
2 3
4 5 6
(%i101) factor(1 + 152 +
152 + 152 + 152 + 152 + 152
2 3
4 5 22
+ (1 + 152 + 152 + 152 + 152 + 152 ) 152 )
(%o101) 235117
347823950574272531534776417323341722615470364877537437
2 3
4 5 6
(%i102) factor(1 + 153 +
153 + 153 + 153 + 153 + 153
2 3
4 5 22
+ (1 + 153 + 153 + 153 + 153 + 153 ) 153 )
(%o102) 2080193791522283
260806987574243042461 179925805733939886449363
2 3
4 5 6
(%i103) factor(1 + 155 +
155 + 155 + 155 + 155 + 155
2 3
4 5 22
+ (1 + 155 + 155 + 155 + 155 + 155 ) 155 )
(%o103) 1301
2024251972680467390177 52628980864695578724566370706787053
2 3
4 5 6
(%i104) factor(1 + 159 +
159 + 159 + 159 + 159 + 159
2 3
4 5 22
+ (1 + 159 + 159 + 159 + 159 + 159 ) 159 )
(%o104) 15389221316871390269
17916193677621671966196051732447459108629
2 3
4 5 6
(%i105) factor(1 + 160 +
160 + 160 + 160 + 160 + 160
2 3
4 5 22
+ (1 + 160 + 160 + 160 + 160 + 160 ) 160 )
(%o105) 62804009 204213312679
13774628208176928161 1848464383398830422591
2 3
4 5 6
(%i106) factor(1 + 163 +
163 + 163 + 163 + 163 + 163
2 3
4 5 22
+ (1 + 163 + 163 + 163 + 163 + 163 ) 163 )
(%o106) 35852402438764927
15039023781383529459922432952020181862642607
2 3
4 5 6
(%i107) factor(1 + 164 +
164 + 164 + 164 + 164 + 164
2 3
4 5 22
+ (1 + 164 + 164 + 164 + 164 + 164 ) 164 )
(%o107) 2459741 372874661376949
693406468619515400361051975548453319989
2 3
4 5 6
(%i108) factor(1 + 165 +
165 + 165 + 165 + 165 + 165
2 3
4 5 22
+ (1 + 165 + 165 + 165 + 165 + 165 ) 165 )
(%o108) 677 1997
105274923972935950652959 5265200573520399201176764991971
2 3
4 5 6
(%i109) factor(1 + 168 +
168 + 168 + 168 + 168 + 168
2 3
4 5 22
+ (1 + 168 + 168 + 168 + 168 + 168 ) 168 )
(%o109) 10537031 877161841
76861892116307 1715672371866273636406872463717
2 3
4 5 6
(%i110) factor(1 + 171 +
171 + 171 + 171 + 171 + 171
2 3
4 5 22
+ (1 + 171 + 171 + 171 + 171 + 171 ) 171 )
(%o110) 242371 2671470962717
3035365941999285616763025681089467904759639
2 3
4 5 6
(%i111) factor(1 + 176 +
176 + 176 + 176 + 176 + 176
2 3
4 5 22
+ (1 + 176 + 176 + 176 + 176 + 176 ) 176 )
(%o111) 971 14447
236372380214735262913 1290396032097905645948803492734973
2 3
4 5 6
(%i112) factor(1 + 177 +
177 + 177 + 177 + 177 + 177
2 3
4 5 22
+ (1 + 177 + 177 + 177 + 177 + 177 ) 177 )
(%o112) 22003
226598427418795730329878672164783843179739145577751183743
2 3
4 5 6
(%i113) factor(1 + 178 +
178 + 178 + 178 + 178 + 178
2 3
4 5 22
+ (1 + 178 + 178 + 178 + 178 + 178 ) 178 )
(%o113)
5804793814775027829509890581134038593449202861617898619139119
素数ですね。
2 3
4 5 6
(%i114) factor(1 + 179 +
179 + 179 + 179 + 179 + 179
2 3
4 5 22
+ (1 + 179 + 179 + 179 + 179 + 179 ) 179 )
(%o114) 12679606256069
16210898511678624113 32851258435720493275613447533
2 3
4 5 6
(%i115) factor(1 + 180 +
180 + 180 + 180 + 180 + 180
2 3
4 5 22
+ (1 + 180 + 180 + 180 + 180 + 180 ) 180 )
(%o115) 211 7817
4758329854213894994426448798587855874600684981774563663
2 3
4 5 6
(%i116) factor(1 + 181 +
181 + 181 + 181 + 181 + 181
2 3
4 5 22
+ (1 + 181 + 181 + 181 + 181 + 181 ) 181 )
(%o116) 108707 36915383
3897868031559613 582687324382236929246260722960301
2 3
4 5 6
(%i117) factor(1 + 184 +
184 + 184 + 184 + 184 + 184
2 3
4 5 22
+ (1 + 184 + 184 + 184 + 184 + 184 ) 184 )
(%o117) 307 757 650290429163
835264258099823 112533658856029746261287750251
2 3
4 5 6
(%i118) factor(1 + 186 +
186 + 186 + 186 + 186 + 186
2 3
4 5 22
+ (1 + 186 + 186 + 186 + 186 + 186 ) 186 )
(%o118)
19019132748309903001112487363921171808209084842721806466717943
素数ですね。
2 3
4 5 6
(%i119) factor(1 + 188 +
188 + 188 + 188 + 188 + 188
2 3
4 5 22
+ (1 + 188 + 188 + 188 + 188 + 188 ) 188 )
(%o119) 271 1669 20323
2761625143512653098745594964265368294357094756537357
2 3
4 5 6
(%i120) factor(1 + 190 +
190 + 190 + 190 + 190 + 190
2 3
4 5 22
+ (1 + 190 + 190 + 190 + 190 + 190 ) 190 )
(%o120)
33778395974906611013290325017091790456510000000047294801005291
素数ですね。
2 3
4 5 6
(%i121) factor(1 + 191 +
191 + 191 + 191 + 191 + 191
2 3
4 5 22
+ (1 + 191 + 191 + 191 + 191 + 191 ) 191 )
(%o121) 367 5833176779
1704925571641048676057 10663605127408563713287309333
2 3
4 5 6
(%i122) factor(1 + 195 +
195 + 195 + 195 + 195 + 195
2 3
4 5 22
+ (1 + 195 + 195 + 195 + 195 + 195 ) 195 )
(%o122) 41669 3177007 175069847
59898313261 557814684567163 87946842208265947
2 3
4 5 6
(%i123) factor(1 + 197 +
197 + 197 + 197 + 197 + 197
2 3
4 5 22
+ (1 + 197 + 197 + 197 + 197 + 197 ) 197 )
(%o123) 8044215671
11151018988429156075114946493300070541248762023437579
2 3
4 5 6
(%i124) factor(1 + 198 +
198 + 198 + 198 + 198 + 198
2 3
4 5 22
+ (1 + 198 + 198 + 198 + 198 + 198 ) 198 )
(%o124) 487 1228174871819107
171937232625877140431305029310727304666992551
2 3
4 5 6
(%i125) factor(1 + 199 +
199 + 199 + 199 + 199 + 199
2 3
4 5 22
+ (1 + 199 + 199 + 199 + 199 + 199 ) 199 )
(%o125) 3889 44376197
4546742906177 150152486117293166192138990043886116061
(%o125)
a.bat
(%i126)
b.txtに追加されるものは、
409,102
193,106
113,107
227,108
257,114
499,126
197,140
179,141
331,147
677,165
971,176
211,180
307,184
757,184
271,188
367,191
487,198