Villegas-Zagier polynomials
A166243 を出力してみた。
def d(ary)
s = ary.size - 1
return [0] if s == 0
(1..s).map{|i| i * ary[i]}
end
def e(ary)
while ary[-1] == 0
ary.pop
end
ary
end
def A(n)
a, b = [0], [1]
cnt = -1
p [cnt, a]
while cnt < n
cnt += 1
s, t = a.size - 1, b.size - 1
c0 = d(b)
c = [0] * 3 + c0.map{|i| i * 8}
(0..t - 1).each{|i| c[i] -= c0[i]}
u = 16 * cnt + 3
(0..t).each{|i| c[i + 2] -= b[i] * u}
v = 4 * cnt * (2 * cnt - 1)
(0..s).each{|i| c[i + 1] -= a[i] * v}
a, b = b, e(c)
p [cnt, a]
end
end
A(3 * 10)
出力結果
[-1, [0]]
[0, [1]]
[1, [0, 0, -3]]
[2, [0, 2, 0, 0, 9]]
[3, [-2, 0, 0, -18, 0, 0, -27]]
[4, [0, 0, 36, 0, 0, 108, 0, 0, 81]]
[5, [0, 152, 0, 0, -360, 0, 0, -540, 0, 0, -243]]
[6, [-152, 0, 0, -16440, 0, 0, 2700, 0, 0, 2430, 0, 0, 729]]
[7, [0, 0, 24240, 0, 0, 1311840, 0, 0, -17010, 0, 0, -10206, 0, 0, -2187]]
[8, [0, 6848, 0, 0, -2974800, 0, 0, -99234720, 0, 0, 95256, 0, 0, 40824, 0, 0, 6561]]
[9, [-6848, 0, 0, -578304, 0, 0, 359465040, 0, 0, 7449816240, 0, 0, -489888, 0, 0, -157464, 0, 0, -19683]]
[10, [0, 0, -1449408, 0, 0, -265081248, 0, 0, -41903736480, 0, 0, -558788636016, 0, 0, 2361960, 0, 0, 590490, 0, 0, 59049]]
[11, [0, 8103296, 0, 0, 1977980256, 0, 0, 94641454944, 0, 0, 4633284565296, 0, 0, 41909486948640, 0, 0, -10825650, 0, 0, -2165130, 0, 0, -177147]]
[12, [-8103296, 0, 0, -7958331648, 0, 0, -708318209088, 0, 0, -19254692103552, 0, 0, -487197802617840, 0, 0, -3143213530388640, 0, 0, 47632860, 0, 0, 7794468, 0, 0, 531441]]
[13, [0, 0, 16509098880, 0, 0, 3427093763712, 0, 0, 172930839409728, 0, 0, 3099554600064192, 0, 0, 49112711823697200, 0, 0, 235741025873274120, 0, 0, -202656168, 0, 0, -27634932, 0, 0, -1594323]]
[14, [0, -22483912960, 0, 0, -10008911957760, 0, 0, -1048666077058176, 0, 0, -34484834259318528, 0, 0, -435466037936464416, 0, 0, -4783578320886450840, 0, 0, -17680576998365153640, 0, 0, 838259604, 0, 0, 96722262, 0, 0, 4782969]]
[15, [22483912960, 0, 0, 19997867262720, 0, 0, 4110634600437888, 0, 0, 262698812582624640, 0, 0, 6043802573996802720, 0, 0, 55841155522938170208, 0, 0, 453064785616306082880, 0, 0, 1326043275165360937728, 0, 0, -3385279170, 0, 0, -334807830, 0, 0, -14348907]]
[16, [0, 0, -26335184087040, 0, 0, -11627833726660608, 0, 0, -1341184086247783680, 0, 0, -57443516228376207360, 0, 0, -968345405212154469120, 0, 0, -6700201992072479965824, 0, 0, -41936118577331514563808, 0, 0, -99453245638779395340480, 0, 0, 13392313200, 0, 0, 1147912560, 0, 0, 43046721]]
[17, [0, 8062284861440, 0, 0, 24862849717217280, 0, 0, 5120469228852172800, 0, 0, 372215131166528812800, 0, 0, 11388772641212837429760, 0, 0, 145461355873909536686976, 0, 0, 763966681908794058638592, 0, 0, 3808230530919669934195680, 0, 0, 7458993422914822844266080, 0, 0, -52038702720, 0, 0, -3902902704, 0, 0, -129140163]]
[18, [-8062284861440, 0, 0, -42507875835555840, 0, 0, -15792098200622604288, 0, 0, -1833916983243887393280, 0, 0, -91732744496763795767040, 0, 0, -2101894726333873158775296, 0, 0, -20862932999521143963809664, 0, 0, -83644323467482489083666624, 0, 0, -340316574920496931447987200, 0, 0, -559424506718640308587100640, 0, 0, 199048037904, 0, 0, 13172296626, 0, 0, 387420489]]
[19, [0, 0, 109552794550517760, 0, 0, 43447810764441489408, 0, 0, 7439150255238803925504, 0, 0, 564438622751924280076800, 0, 0, 20716599016020687233207040, 0, 0, 368394175392220869047970048, 0, 0, 2898185905336579405667767872, 0, 0, 8859108646674704277869573952, 0, 0, 29999139172787130977651928480, 0, 0, 41956838003898148310122265280, 0, 0, -750820907682, 0, 0, -44165935746, 0, 0, -1162261467]]
[20, [0, -196434444070666240, 0, 0, -129586770186825093120, 0, 0, -26706387375865545818112, 0, 0, -2859563805412385084838912, 0, 0, -155691967082061244904801280, 0, 0, -4391909819340937461814731264, 0, 0, -62292554504147899894325460480, 0, 0, -394584989367434611720891531392, 0, 0, -912677773357016660365167730176, 0, 0, -2613561367326155720034159612960, 0, 0, -3146762850292361658955983436224, 0, 0, 2797175930580, 0, 0, 147219785820, 0, 0, 3486784401]]
[21, [196434444070666240, 0, 0, 238419211631944826880, 0, 0, 89097292170367475871744, 0, 0, 12516094687134883334252544, 0, 0, 957821073796002005538656256, 0, 0, 39731308970441867855581215744, 0, 0, 890591123126563791616389795840, 0, 0, 10290556561642724594105831672064, 0, 0, 53180518793313227085147177638784, 0, 0, 91841770188949560735598083116928, 0, 0, 225386889152190404983435820532384, 0, 0, 236007213771927126669156008044920, 0, 0, -10305385007400, 0, 0, -488149816140, 0, 0, -10460353203]]
[22, [0, 0, -105328686056415805440, 0, 0, -163388968162841854992384, 0, 0, -46595366083309945689372672, 0, 0, -4987312421176783684524091392, 0, 0, -292517020858437577727476098048, 0, 0, -9606059462994728690977368099840, 0, 0, -175231399091891788605361589409024, 0, 0, -1677066919698978552868879045139712, 0, 0, -7154001806277117143080145694332160, 0, 0, -9057039058735227820183993132319424, 0, 0, -19264088824133551719997887543832920, 0, 0, -17700541032894534509449180648020120, 0, 0, 37587535842780, 0, 0, 1610894393262, 0, 0, 31381059609]]
[23, [0, -532650564250569441280, 0, 0, -49527031427944991907840, 0, 0, 87086300065104221138903040, 0, 0, 21058785867069416188560826368, 0, 0, 1802455765228255742994322501632, 0, 0, 84041373795358691168872629147648, 0, 0, 2238358194322763967954856414586880, 0, 0, 33803195946739335629933260925882880, 0, 0, 271547407117833126970465184586368256, 0, 0, 966763139831072688994614071389635264, 0, 0, 877602658044818184465242411783401536, 0, 0, 1633612432827558080794425855078186000, 0, 0, 1327540577467090088246255799107484960, 0, 0, -135852093831762, 0, 0, -5292938720718, 0, 0, -94143178827]]
[24, [532650564250569441280, 0, 0, 827521040808298109337600, 0, 0, 83615891392509083952906240, 0, 0, -45115227606298816390359859200, 0, 0, -8912558211612640315867654631424, 0, 0, -614897203687751770289695128379392, 0, 0, -23181773347606500564532016826691584, 0, 0, -508412763144518688014448315010590720, 0, 0, -6437251340006227413221456248327960320, 0, 0, -43886407054432235031446937388643616768, 0, 0, -131823722251393205825069051691759416064, 0, 0, -83734621923736707315444041290548424128, 0, 0, -137566392340027210394640016336914060720, 0, 0, -99565543310031756618619363247697210720, 0, 0, 486950362306056, 0, 0, 17322344904168, 0, 0, 282429536481]]
[25, [0, 0, -285379544891295382732800, 0, 0, -578619520365578913918812160, 0, 0, -15242124619121477725526999040, 0, 0, 26144753403118605110588762652672, 0, 0, 3684332082185664973872531296071680, 0, 0, 202254795076888318274971599443558400, 0, 0, 6210366776718961062072382561492457472, 0, 0, 113316407177111168230220257649606860800, 0, 0, 1214975100855221622536512365063636344064, 0, 0, 7097251986931908392385799154100806638080, 0, 0, 18181586501339892949387630199310024427200, 0, 0, 7880889323942652513462208208753587121664, 0, 0, 11512265945222421859028410618441711089840, 0, 0, 7467415748252381746397044756309442859792, 0, 0, -1732234490416800, 0, 0, -56485907296200, 0, 0, -847288609443]]
[26, [0, -2039228675045199496806400, 0, 0, -1051313614259834853042585600, 0, 0, -77741984977617543812495769600, 0, 0, -61360591917558274954759426424832, 0, 0, -16144711235679732696299390686617600, 0, 0, -1497475854153146243651917668638330880, 0, 0, -64618676416636549454658185830490480640, 0, 0, -1624173952408122836107858144831730436096, 0, 0, -24863114227992593703582422300111441892864, 0, 0, -227697057721075608119718093451978757433600, 0, 0, -1149504618776406200935537468439537578068480, 0, 0, -2538224694608647235685483124281261861829440, 0, 0, -732740170297264958865195133126597339850592, 0, 0, -958007212036211808214856606320700222617632, 0, 0, -560056181118928630979780666561665935819600, 0, 0, 6119306623755000, 0, 0, 183579198712650, 0, 0, 2541865828329]]
[27, [2039228675045199496806400, 0, 0, 6557030548586347115372544000, 0, 0, 4020050199580909454240330711040, 0, 0, 722670488702278235807725431521280, 0, 0, 92010714673747698754992727374274560, 0, 0, 9503500341776688676345084770133647360, 0, 0, 590760892386844356410764208904439664640, 0, 0, 20045228172503291625534697696883033493504, 0, 0, 415221902467591055470681840123381753609728, 0, 0, 5376311697184399562502995516082283813762560, 0, 0, 42391744898991493699132411031410844211298560, 0, 0, 186429794624352674169731342751583459590042240, 0, 0, 358430179434278118192374686855800569170093728, 0, 0, 67386270854552336728726575707184646085816736, 0, 0, 79317956650968267362511447300435672351051600, 0, 0, 42004213583919647323483558898408577664447200, 0, 0, -21478766249380050, 0, 0, -594796603828986, 0, 0, -7625597484987]]
[28, [0, 0, -8885611183444981207508582400, 0, 0, -20797521624931150691044339875840, 0, 0, -7614798703546433260277811083673600, 0, 0, -1015229935347795818817074103277780992, 0, 0, -81331810288020010069501093841684643840, 0, 0, -5055746881450246249778880727586206924800, 0, 0, -222983907498313222773297580732008134590464, 0, 0, -6020629877696469081432748427012107013185536, 0, 0, -103742872282573808307650780838365535703999488, 0, 0, -1145826650257691534284861982045219074003031040, 0, 0, -7838809040030830424776937992579455690810633600, 0, 0, -30254183188458422760885842933943649182908882688, 0, 0, -51123096205384879882155038478366241692045842112, 0, 0, -6136232212755328256637010384022321633036300160, 0, 0, -6536905738997495114717128897772541741022842000, 0, 0, -3150316018793973549261266951376573659236917600, 0, 0, 74944372082452236, 0, 0, 1921650566216724, 0, 0, 22876792454961]]
[29, [0, 5209573728611533514689740800, 0, 0, 67461540810162422049793061683200, 0, 0, 44702661786799766778121275178352640, 0, 0, 9662806176692189746139739367266189312, 0, 0, 940387808173244198872858012647888224256, 0, 0, 54977618566948567413516120997273344245760, 0, 0, 2413151320520130788655991516978469538938880, 0, 0, 79884198726407660286689072001493342149107712, 0, 0, 1747055937491515359042063996649704898588600320, 0, 0, 25320410767482588608001684843967310029382406144, 0, 0, 240644777109633418414591137876954758971004943360, 0, 0, 1439056639516044256576962339891267470035224247680, 0, 0, 4908213075715862519568342532850549688487383575424, 0, 0, 7351581234450503406949952375708495295796596003264, 0, 0, 553781801714830633660835433366053655785992111680, 0, 0, 536472565367123745659616584779983755932401733200, 0, 0, 236273701409548016194595021481805005934827316200, 0, 0, -260063376627996648, 0, 0, -6191985157809444, 0, 0, -68630377364883]]
[30, [-5209573728611533514689740800, 0, 0, -213485696437144166338368090931200, 0, 0, -204751189775974252669323732821606400, 0, 0, -64651806733447584890248350885714984960, 0, 0, -9251847164112426063084739328681874259968, 0, 0, -683236741813676416227564162066338068267008, 0, 0, -31058689403929021134107844469866584752373760, 0, 0, -1043225441565962695756753308081033646133968896, 0, 0, -27114295515343459553044787269273133458922588160, 0, 0, -489487565267369061358091299833282966671019042816, 0, 0, -6036642095393048577905227265986665347933036700672, 0, 0, -49798926557871372587787064744420825168207797653760, 0, 0, -262179269265028451961559136515032086733508388255232, 0, 0, -795341773215427801343375553726826218495399323483520, 0, 0, -1063922291547223487636175010204733525043261256624128, 0, 0, -49570878871560422542115464931831806442924478159840, 0, 0, -43858305824147350506121700863324932093239810909400, 0, 0, -17720527605716101214594626611617384337736567073736, 0, 0, 897837847882369380, 0, 0, 19902809435816070, 0, 0, 205891132094649]]
0 件のコメント:
コメントを投稿
注: コメントを投稿できるのは、このブログのメンバーだけです。