{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "kが無限のとき、%o1の式を無限級数で表すと、次数の数を2つの3乗数の和で表す方法の個数がその次数の項の係数になります。" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "\\[\\tag{${\\it \\%o}_{3}$}\\left(\\sum_{n=1}^{k}{x^{n^3}}\\right)^2\\]" ], "text/plain": [ " k\n", " ==== 3\n", " \\ n 2\n", "(%o3) ( > x )\n", " /\n", " ====\n", " n = 1" ], "text/x-maxima": [ "('sum(x^n^3,n,1,k))^2" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "SN:sum(x^(n^3),n,1,k)^2;" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "kを有限にしても$(k^3+1)$次の項までの係数は正しく計算されます。k=12としてやってみましょう。下記の式では係数の不正確な$x^{k^3+1}$より次数の大きな項は捨てています。" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "\\[\\tag{${\\it \\%o}_{4}$}4\\,x^{1729}+2\\,x^{1674}+2\\,x^{1547}+2\\,x^{1512}+x^{1458}+2\\,x^{1456}+2\\,x^{1395}+2\\,x^{1358}+2\\,x^{1343}+2\\,x^{1339}+2\\,x^{1332}+2\\,x^{1241}+2\\,x^{1216}+2\\,x^{1125}+2\\,x^{1072}+2\\,x^{1064}+2\\,x^{1027}+x^{1024}+2\\,x^{1008}+2\\,x^{1001}+2\\,x^{945}+2\\,x^{855}+2\\,x^{854}+2\\,x^{793}+2\\,x^{756}+2\\,x^{737}+2\\,x^{730}+2\\,x^{728}+x^{686}+2\\,x^{637}+2\\,x^{576}+2\\,x^{559}+2\\,x^{539}+2\\,x^{520}+2\\,x^{513}+2\\,x^{468}+x^{432}+2\\,x^{407}+2\\,x^{370}+2\\,x^{351}+2\\,x^{344}+2\\,x^{341}+2\\,x^{280}+x^{250}+2\\,x^{243}+2\\,x^{224}+2\\,x^{217}+2\\,x^{189}+2\\,x^{152}+2\\,x^{133}+x^{128}+2\\,x^{126}+2\\,x^{91}+2\\,x^{72}+2\\,x^{65}+x^{54}+2\\,x^{35}+2\\,x^{28}+x^{16}+2\\,x^9+x^2\\]" ], "text/plain": [ " 1729 1674 1547 1512 1458 1456 1395\n", "(%o4) 4 x + 2 x + 2 x + 2 x + x + 2 x + 2 x\n", " 1358 1343 1339 1332 1241 1216 1125\n", " + 2 x + 2 x + 2 x + 2 x + 2 x + 2 x + 2 x\n", " 1072 1064 1027 1024 1008 1001 945 855\n", " + 2 x + 2 x + 2 x + x + 2 x + 2 x + 2 x + 2 x\n", " 854 793 756 737 730 728 686 637 576\n", " + 2 x + 2 x + 2 x + 2 x + 2 x + 2 x + x + 2 x + 2 x\n", " 559 539 520 513 468 432 407 370 351\n", " + 2 x + 2 x + 2 x + 2 x + 2 x + x + 2 x + 2 x + 2 x\n", " 344 341 280 250 243 224 217 189 152\n", " + 2 x + 2 x + 2 x + x + 2 x + 2 x + 2 x + 2 x + 2 x\n", " 133 128 126 91 72 65 54 35 28 16\n", " + 2 x + x + 2 x + 2 x + 2 x + 2 x + x + 2 x + 2 x + x\n", " 9 2\n", " + 2 x + x" ], "text/x-maxima": [ "4*x^1729+2*x^1674+2*x^1547+2*x^1512+x^1458+2*x^1456+2*x^1395+2*x^1358+2*x^1343\n", " +2*x^1339+2*x^1332+2*x^1241+2*x^1216+2*x^1125+2*x^1072+2*x^1064\n", " +2*x^1027+x^1024+2*x^1008+2*x^1001+2*x^945+2*x^855+2*x^854+2*x^793\n", " +2*x^756+2*x^737+2*x^730+2*x^728+x^686+2*x^637+2*x^576+2*x^559+2*x^539\n", " +2*x^520+2*x^513+2*x^468+x^432+2*x^407+2*x^370+2*x^351+2*x^344+2*x^341\n", " +2*x^280+x^250+2*x^243+2*x^224+2*x^217+2*x^189+2*x^152+2*x^133+x^128\n", " +2*x^126+2*x^91+2*x^72+2*x^65+x^54+2*x^35+2*x^28+x^16+2*x^9+x^2" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "TAXI:remainder(ev(SN,nouns),x^(k^3+2)),k:12;" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "$x^{1729}$の係数が4になっていることは、$1729=12^3+1^3=1^3+12^3=10^3+9^3=9^3+10^3$と4通りに表すことができることに対応しています。\n", "$x^{16}$の係数が1であることは、$16=2^3+2^3$と1通りに表すことができることに対応しています。" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "下記のコードで、上記の多項式で係数が4以上の項の次数を取り出すことが出来ます。" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "\\[\\tag{${\\it \\%o}_{5}$}\\left[ 1729 \\right] \\]" ], "text/plain": [ "(%o5) [1729]" ], "text/x-maxima": [ "[1729]" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "apply(append,map(lambda([term],\n", " block([cf:coeff(term,x^hipow(term,x))],\n", " if cf>3 then [hipow(term,x)] \n", " else [])),\n", " args(TAXI)));" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "kの値を大きくすると%o1をそのまま計算するコードはどんどん遅くなります。それを避けるために、与えられたxの多項式polyの2乗を指定された次数maxdまで計算する関数\n", "\n", "sqexpand(poly, maxd)\n", "\n", "を下記のように定義します。" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "\\[\\tag{${\\it \\%o}_{6}$}{\\it sqexpand}\\left({\\it poly} , {\\it maxd}\\right):=\\mathbf{block}\\;\\left(\\left[ {\\it tlist}:{\\it args}\\left({\\it poly}\\right) , {\\it res}:0 \\right] , \\mathbf{for}\\;{\\it term}\\;\\mathbf{in}\\;{\\it tlist}\\;\\mathbf{do}\\;{\\it res}:{\\it remainder}\\left({\\it res}+{\\it expand}\\left({\\it term}\\,{\\it poly}\\right) , x^{{\\it maxd}+1}\\right) , {\\it return}\\left({\\it res}\\right)\\right)\\]" ], "text/plain": [ "(%o6) sqexpand(poly, maxd) := block([tlist : args(poly), res : 0], \n", " maxd + 1\n", "for term in tlist do res : remainder(res + expand(term poly), x ), \n", "return(res))" ], "text/x-maxima": [ "sqexpand(poly,maxd):=block([tlist:args(poly),res:0],\n", " for term in tlist do res:remainder(res+expand(term*poly),x^(maxd+1)),\n", " return(res))" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sqexpand(poly,maxd):=block([tlist:args(poly),res:0],\n", " for term in tlist do res:remainder(res+expand(term*poly),x^(maxd+1)),\n", " return(res));" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "早速この関数を使ってk=450まで、次数としては$450^3+1$まで求めてみます。ただし出力項数が多すぎるため表示しません。" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "TT:sqexpand(sum(x^(n^3),n,1,450),450^3+1)$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "結果を見るために、下記のコードを使い、係数が4以上の項の次数を出力します。また係数が5以上の項については係数と次数を出力します。" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "\\[\\tag{${\\it \\%o}_{8}$}\\left[ 91034307 , 90527229 , 90091008 , 89576767 , 88780536 , 88129323 , 88122125 , 87952501 , 87699456 , 87579037 , \\left[ \\mbox{ ** } , 6 , \\mbox{ ** } , 87539319 \\right] , 87483968 , 87029432 , 86960952 , 86575168 , 86488136 , 86368464 , 86316741 , 86124824 , 85622264 , 85502375 , 85492792 , 85188096 , 84717568 , 84637287 , 84266000 , 83758528 , 83393856 , 81621568 , 80779032 , 80668224 , 80294760 , 80208576 , 80102574 , 79692193 , 79598125 , 77414967 , 77335776 , 77129864 , 76487168 , 75550088 , 74130875 , 74097261 , 74093832 , 73842713 , 73819863 , 73369088 , 72669177 , 72131904 , 71509312 , 71292312 , 70979896 , 70957971 , 70796808 , 70449093 , 69934592 , 69805125 , 69625969 , 69583995 , 69177024 , 68802048 , 68696000 , 68007673 , 67956616 , 67944312 , 67931136 , 67173463 , 66763333 , 66469429 , 66201408 , 65728000 , 65573928 , 65293317 , 65272753 , 65055744 , 64623104 , 64421875 , 64232000 , 64125000 , 63660032 , 63057960 , 62980288 , 62135073 , 62108397 , 61568208 , 61555832 , 61121024 , 60965288 , 60698521 , 60271939 , 59913728 , 58923072 , 58751784 , 58438072 , 57066633 , 56754152 , 56733696 , 56655872 , 56388339 , 55486125 , 55306557 , 54887625 , 54814509 , 54269091 , 54267003 , 53936064 , 53283923 , 53226297 , 52739288 , 52324272 , 52242463 , 52136000 , 51564032 , 51508639 , 51479064 , 51278929 , 51240427 , 50324625 , 49933368 , 49849856 , 49844032 , 49832523 , 48469976 , 48316662 , 48137544 , 48104000 , 47915712 , 46825128 , 46683000 , 46661832 , 46394712 , 46343059 , 46179224 , 46091997 , 45882739 , 45440551 , 45118528 , 44409995 , 43997625 , 43946000 , 43852536 , 43777216 , 43699392 , 43570872 , 43450344 , 42549416 , 42301656 , 42276843 , 42168581 , 42154840 , 41892515 , 41511232 , 41436873 , 41400639 , 41343640 , 41301953 , 41258737 , 41080832 , 40970375 , 40519115 , 40354119 , 40183262 , 40134584 , 40033000 , 39639691 , 39448808 , 39312000 , 38253878 , 38007144 , 37955008 , 37498032 , 37384704 , 36998208 , 36856512 , 36094464 , 36050904 , 36047592 , 35938728 , 35740224 , 34743312 , 34031907 , 33652736 , 33394248 , 33108264 , 32984000 , 32973759 , 32886784 , 32832000 , 32530680 , 32268024 , 32114143 , 31256000 , 30511936 , 30388904 , 29791125 , 29503656 , 29184057 , 29025864 , 28981125 , 28703269 , 28699272 , 28658448 , 28408896 , 28149336 , 28102464 , 28094976 , 27882127 , 27831951 , 27529073 , 27445392 , 27262872 , 27015625 , 27003375 , 27000064 , 27000008 , 26856576 , 26569809 , 26506467 , 26122131 , 25937576 , 25785432 , 25766208 , 25371171 , 25164405 , 24897817 , 24858171 , 24767171 , 24666560 , 24480125 , 23934528 , 23901696 , 22914304 , 22754277 , 22544704 , 22543417 , 22426369 , 22031576 , 21994875 , 21753576 , 21531608 , 21411000 , 21125384 , 21036743 , 20976832 , 20683000 , 20616463 , 20496896 , 20162952 , 20127744 , 20072017 , 19346168 , 19250163 , 19034379 , 18673625 , 18617625 , 18468513 , 18410392 , 18406603 , 17999072 , 17045567 , 16983854 , 16809984 , 16797375 , 16776487 , 16587207 , 16387189 , 16387128 , 16012269 , 15682680 , 15438250 , 15398936 , 15201368 , 15187041 , 15077907 , 14978061 , 14916727 , 14765192 , 14482503 , 14197248 , 13915125 , 13874112 , 13851000 , 13832000 , 13825728 , 13731319 , 13623913 , 13490533 , 13489875 , 13484016 , 12874176 , 12753160 , 12650337 , 12533824 , 12266856 , 11985003 , 11859211 , 11855727 , 11557000 , 11548089 , 11478584 , 11261376 , 11097567 , 10962432 , 10870119 , 10821896 , 10811017 , 10765603 , 10702783 , 10648512 , 10589696 , 10469816 , 10424232 , 10202696 , 10083528 , 10036845 , 9560896 , 9443761 , 9261729 , 9016488 , 8872487 , 8849601 , 8741824 , 8647128 , 8600256 , 8587000 , 8494577 , 8493039 , 8491392 , 8275176 , 8216000 , 8131968 , 8077888 , 8029000 , 7957504 , 7882245 , 7872536 , 7640128 , 7620661 , 7365384 , 7094269 , 7091712 , 7081984 , 6742008 , 6517000 , 6445504 , 6434883 , 6230504 , 6058747 , 6017193 , 6013000 , 5835375 , 5832729 , 5799339 , 5772403 , 5639816 , 5472152 , 5462424 , 5446359 , 5318677 , 5287707 , 5135104 , 5004125 , 4931101 , 4914000 , 4744376 , 4673088 , 4624776 , 4607064 , 4511808 , 4505949 , 4467528 , 4342914 , 4206592 , 4174281 , 4123000 , 4110848 , 4104000 , 4033503 , 3813992 , 3798613 , 3628233 , 3587409 , 3551112 , 3512808 , 3511872 , 3375008 , 3375001 , 3242197 , 3220776 , 2991816 , 2987712 , 2864288 , 2691451 , 2622104 , 2585375 , 2562112 , 2515968 , 2418271 , 2301299 , 2101248 , 2048391 , 1845649 , 1774656 , 1734264 , 1729000 , 1728216 , 1609272 , 1566728 , 1533357 , 1407672 , 1370304 , 1331064 , 1323712 , 1260441 , 1195112 , 1092728 , 1080891 , 1075032 , 1073375 , 1061424 , 1016496 , 1009736 , 994688 , 984067 , 955016 , 920673 , 886464 , 885248 , 842751 , 805688 , 704977 , 684019 , 593047 , 558441 , 525824 , 515375 , 513856 , 513000 , 443889 , 439101 , 402597 , 373464 , 327763 , 320264 , 314496 , 262656 , 216125 , 216027 , 195841 , 171288 , 165464 , 149389 , 134379 , 110808 , 110656 , 65728 , 64232 , 46683 , 40033 , 39312 , 32832 , 20683 , 13832 , 4104 , 1729 \\right] \\]" ], "text/plain": [ "(%o8) [91034307, 90527229, 90091008, 89576767, 88780536, 88129323, 88122125, \n", "87952501, 87699456, 87579037, [**, 6, **, 87539319], 87483968, 87029432, \n", "86960952, 86575168, 86488136, 86368464, 86316741, 86124824, 85622264, \n", "85502375, 85492792, 85188096, 84717568, 84637287, 84266000, 83758528, \n", "83393856, 81621568, 80779032, 80668224, 80294760, 80208576, 80102574, \n", "79692193, 79598125, 77414967, 77335776, 77129864, 76487168, 75550088, \n", "74130875, 74097261, 74093832, 73842713, 73819863, 73369088, 72669177, \n", "72131904, 71509312, 71292312, 70979896, 70957971, 70796808, 70449093, \n", "69934592, 69805125, 69625969, 69583995, 69177024, 68802048, 68696000, \n", "68007673, 67956616, 67944312, 67931136, 67173463, 66763333, 66469429, \n", "66201408, 65728000, 65573928, 65293317, 65272753, 65055744, 64623104, \n", "64421875, 64232000, 64125000, 63660032, 63057960, 62980288, 62135073, \n", "62108397, 61568208, 61555832, 61121024, 60965288, 60698521, 60271939, \n", "59913728, 58923072, 58751784, 58438072, 57066633, 56754152, 56733696, \n", "56655872, 56388339, 55486125, 55306557, 54887625, 54814509, 54269091, \n", "54267003, 53936064, 53283923, 53226297, 52739288, 52324272, 52242463, \n", "52136000, 51564032, 51508639, 51479064, 51278929, 51240427, 50324625, \n", "49933368, 49849856, 49844032, 49832523, 48469976, 48316662, 48137544, \n", "48104000, 47915712, 46825128, 46683000, 46661832, 46394712, 46343059, \n", "46179224, 46091997, 45882739, 45440551, 45118528, 44409995, 43997625, \n", "43946000, 43852536, 43777216, 43699392, 43570872, 43450344, 42549416, \n", "42301656, 42276843, 42168581, 42154840, 41892515, 41511232, 41436873, \n", "41400639, 41343640, 41301953, 41258737, 41080832, 40970375, 40519115, \n", "40354119, 40183262, 40134584, 40033000, 39639691, 39448808, 39312000, \n", "38253878, 38007144, 37955008, 37498032, 37384704, 36998208, 36856512, \n", "36094464, 36050904, 36047592, 35938728, 35740224, 34743312, 34031907, \n", "33652736, 33394248, 33108264, 32984000, 32973759, 32886784, 32832000, \n", "32530680, 32268024, 32114143, 31256000, 30511936, 30388904, 29791125, \n", "29503656, 29184057, 29025864, 28981125, 28703269, 28699272, 28658448, \n", "28408896, 28149336, 28102464, 28094976, 27882127, 27831951, 27529073, \n", "27445392, 27262872, 27015625, 27003375, 27000064, 27000008, 26856576, \n", "26569809, 26506467, 26122131, 25937576, 25785432, 25766208, 25371171, \n", "25164405, 24897817, 24858171, 24767171, 24666560, 24480125, 23934528, \n", "23901696, 22914304, 22754277, 22544704, 22543417, 22426369, 22031576, \n", "21994875, 21753576, 21531608, 21411000, 21125384, 21036743, 20976832, \n", "20683000, 20616463, 20496896, 20162952, 20127744, 20072017, 19346168, \n", "19250163, 19034379, 18673625, 18617625, 18468513, 18410392, 18406603, \n", "17999072, 17045567, 16983854, 16809984, 16797375, 16776487, 16587207, \n", "16387189, 16387128, 16012269, 15682680, 15438250, 15398936, 15201368, \n", "15187041, 15077907, 14978061, 14916727, 14765192, 14482503, 14197248, \n", "13915125, 13874112, 13851000, 13832000, 13825728, 13731319, 13623913, \n", "13490533, 13489875, 13484016, 12874176, 12753160, 12650337, 12533824, \n", "12266856, 11985003, 11859211, 11855727, 11557000, 11548089, 11478584, \n", "11261376, 11097567, 10962432, 10870119, 10821896, 10811017, 10765603, \n", "10702783, 10648512, 10589696, 10469816, 10424232, 10202696, 10083528, \n", "10036845, 9560896, 9443761, 9261729, 9016488, 8872487, 8849601, 8741824, \n", "8647128, 8600256, 8587000, 8494577, 8493039, 8491392, 8275176, 8216000, \n", "8131968, 8077888, 8029000, 7957504, 7882245, 7872536, 7640128, 7620661, \n", "7365384, 7094269, 7091712, 7081984, 6742008, 6517000, 6445504, 6434883, \n", "6230504, 6058747, 6017193, 6013000, 5835375, 5832729, 5799339, 5772403, \n", "5639816, 5472152, 5462424, 5446359, 5318677, 5287707, 5135104, 5004125, \n", "4931101, 4914000, 4744376, 4673088, 4624776, 4607064, 4511808, 4505949, \n", "4467528, 4342914, 4206592, 4174281, 4123000, 4110848, 4104000, 4033503, \n", "3813992, 3798613, 3628233, 3587409, 3551112, 3512808, 3511872, 3375008, \n", "3375001, 3242197, 3220776, 2991816, 2987712, 2864288, 2691451, 2622104, \n", "2585375, 2562112, 2515968, 2418271, 2301299, 2101248, 2048391, 1845649, \n", "1774656, 1734264, 1729000, 1728216, 1609272, 1566728, 1533357, 1407672, \n", "1370304, 1331064, 1323712, 1260441, 1195112, 1092728, 1080891, 1075032, \n", "1073375, 1061424, 1016496, 1009736, 994688, 984067, 955016, 920673, 886464, \n", "885248, 842751, 805688, 704977, 684019, 593047, 558441, 525824, 515375, \n", "513856, 513000, 443889, 439101, 402597, 373464, 327763, 320264, 314496, \n", "262656, 216125, 216027, 195841, 171288, 165464, 149389, 134379, 110808, \n", "110656, 65728, 64232, 46683, 40033, 39312, 32832, 20683, 13832, 4104, 1729]" ], "text/x-maxima": [ "[91034307,90527229,90091008,89576767,88780536,88129323,88122125,87952501,\n", " 87699456,87579037,[\"**\",6,\"**\",87539319],87483968,87029432,86960952,86575168,\n", " 86488136,86368464,86316741,86124824,85622264,85502375,85492792,85188096,\n", " 84717568,84637287,84266000,83758528,83393856,81621568,80779032,80668224,\n", " 80294760,80208576,80102574,79692193,79598125,77414967,77335776,77129864,\n", " 76487168,75550088,74130875,74097261,74093832,73842713,73819863,73369088,\n", " 72669177,72131904,71509312,71292312,70979896,70957971,70796808,70449093,\n", " 69934592,69805125,69625969,69583995,69177024,68802048,68696000,68007673,\n", " 67956616,67944312,67931136,67173463,66763333,66469429,66201408,65728000,\n", " 65573928,65293317,65272753,65055744,64623104,64421875,64232000,64125000,\n", " 63660032,63057960,62980288,62135073,62108397,61568208,61555832,61121024,\n", " 60965288,60698521,60271939,59913728,58923072,58751784,58438072,57066633,\n", " 56754152,56733696,56655872,56388339,55486125,55306557,54887625,54814509,\n", " 54269091,54267003,53936064,53283923,53226297,52739288,52324272,52242463,\n", " 52136000,51564032,51508639,51479064,51278929,51240427,50324625,49933368,\n", " 49849856,49844032,49832523,48469976,48316662,48137544,48104000,47915712,\n", " 46825128,46683000,46661832,46394712,46343059,46179224,46091997,45882739,\n", " 45440551,45118528,44409995,43997625,43946000,43852536,43777216,43699392,\n", " 43570872,43450344,42549416,42301656,42276843,42168581,42154840,41892515,\n", " 41511232,41436873,41400639,41343640,41301953,41258737,41080832,40970375,\n", " 40519115,40354119,40183262,40134584,40033000,39639691,39448808,39312000,\n", " 38253878,38007144,37955008,37498032,37384704,36998208,36856512,36094464,\n", " 36050904,36047592,35938728,35740224,34743312,34031907,33652736,33394248,\n", " 33108264,32984000,32973759,32886784,32832000,32530680,32268024,32114143,\n", " 31256000,30511936,30388904,29791125,29503656,29184057,29025864,28981125,\n", " 28703269,28699272,28658448,28408896,28149336,28102464,28094976,27882127,\n", " 27831951,27529073,27445392,27262872,27015625,27003375,27000064,27000008,\n", " 26856576,26569809,26506467,26122131,25937576,25785432,25766208,25371171,\n", " 25164405,24897817,24858171,24767171,24666560,24480125,23934528,23901696,\n", " 22914304,22754277,22544704,22543417,22426369,22031576,21994875,21753576,\n", " 21531608,21411000,21125384,21036743,20976832,20683000,20616463,20496896,\n", " 20162952,20127744,20072017,19346168,19250163,19034379,18673625,18617625,\n", " 18468513,18410392,18406603,17999072,17045567,16983854,16809984,16797375,\n", " 16776487,16587207,16387189,16387128,16012269,15682680,15438250,15398936,\n", " 15201368,15187041,15077907,14978061,14916727,14765192,14482503,14197248,\n", " 13915125,13874112,13851000,13832000,13825728,13731319,13623913,13490533,\n", " 13489875,13484016,12874176,12753160,12650337,12533824,12266856,11985003,\n", " 11859211,11855727,11557000,11548089,11478584,11261376,11097567,10962432,\n", " 10870119,10821896,10811017,10765603,10702783,10648512,10589696,10469816,\n", " 10424232,10202696,10083528,10036845,9560896,9443761,9261729,9016488,8872487,\n", " 8849601,8741824,8647128,8600256,8587000,8494577,8493039,8491392,8275176,\n", " 8216000,8131968,8077888,8029000,7957504,7882245,7872536,7640128,7620661,\n", " 7365384,7094269,7091712,7081984,6742008,6517000,6445504,6434883,6230504,\n", " 6058747,6017193,6013000,5835375,5832729,5799339,5772403,5639816,5472152,\n", " 5462424,5446359,5318677,5287707,5135104,5004125,4931101,4914000,4744376,\n", " 4673088,4624776,4607064,4511808,4505949,4467528,4342914,4206592,4174281,\n", " 4123000,4110848,4104000,4033503,3813992,3798613,3628233,3587409,3551112,\n", " 3512808,3511872,3375008,3375001,3242197,3220776,2991816,2987712,2864288,\n", " 2691451,2622104,2585375,2562112,2515968,2418271,2301299,2101248,2048391,\n", " 1845649,1774656,1734264,1729000,1728216,1609272,1566728,1533357,1407672,\n", " 1370304,1331064,1323712,1260441,1195112,1092728,1080891,1075032,1073375,\n", " 1061424,1016496,1009736,994688,984067,955016,920673,886464,885248,842751,\n", " 805688,704977,684019,593047,558441,525824,515375,513856,513000,443889,439101,\n", " 402597,373464,327763,320264,314496,262656,216125,216027,195841,171288,165464,\n", " 149389,134379,110808,110656,65728,64232,46683,40033,39312,32832,20683,13832,\n", " 4104,1729]" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "apply(append,map(lambda([term],\n", " block([cf:coeff(term,x^hipow(term,x))],\n", " if cf>4 then [[\"**\",cf,\"**\",hipow(term,x)]]\n", " elseif cf>3 then [hipow(term,x)]\n", " else [])),\n", " args(TT)));" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "このリストの一番小さい数が1729であることが確認できます。また1729と同様に$450^3+1=91125001$までの数で、2つの3乗数で4通り以上の方法で表すことができる数が全てリストアップされています。さらに87539319については2つの3乗数の和で6通りに表すことができることがわかります。" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Copyright 2021 Yasuaki Honda\n", "\n", "### Computing Ramanujan's taxi number using the generating function $ (\\sum_{n=1}^{\\infty} x^{n^3})^2 $" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Maxima", "language": "maxima", "name": "maxima" }, "language_info": { "codemirror_mode": "maxima", "file_extension": ".mac", "mimetype": "text/x-maxima", "name": "maxima", "pygments_lexer": "maxima", "version": "5.44.0" } }, "nbformat": 4, "nbformat_minor": 4 }