1^(1^m) * 2^(2^m) * ... * n^(n^m) の漸近展開(1)
m = 0 のとき
1 * 2 * ... * n ~ √(2 * π) n^(n + 1/2) * e^(-n) * (1 + 1/(12 * n) + ... )
となるが、
m が1以上のとき、
generalized Glaisher-Kinkelin constant A_m、
適当な多項式U(n), V(n)
および
数列{a_m(k)}
を用いて
1^(1^m) * 2^(2^m) * ... * n^(n^m) ~ A_m * n^U(n) * e^V(n) * Product_{k>=0} a_m(k)/n^k
と書ける。
数列{a_m(k)} を出力してみた。
def bernoulli(n)
ary = []
a = []
(0..n).each{|i|
a << 1r / (i + 1)
i.downto(1){|j| a[j - 1] = j * (a[j - 1] - a[j])}
ary << a[0] # Bn = a[0]
}
ary
end
def ncr(n, r)
return 1 if r == 0
(n - r + 1..n).inject(:*) / (1..r).inject(:*)
end
def A(k, n)
a = bernoulli(n + k + 1)
ary = [1]
(1..n).each{|i|
ary << (-1) ** (k % 2) / i.to_r * (0..i - 1).inject(0){|s, j| s + a[i - j + k + 1] * ary[j] / (ncr(i - j + k, k) * (i - j + k + 1r))}
}
ary
end
n = 15
(0..10).each{|i| p [i, A(i, n)]}
出力結果
[0, [1, (1/12), (1/288), (-139/51840), (-571/2488320), (163879/209018880), (5246819/75246796800), (-534703531/902961561600), (-4483131259/86684309913600), (432261921612371/514904800886784000), (6232523202521089/86504006548979712000), (-25834629665134204969/13494625021640835072000), (-1579029138854919086429/9716130015581401251840000), (746590869962651602203151/116593560186976815022080000), (1511513601028097903631961/2798245444487443560529920000), (-8849272268392873147705987190261/299692087104605205332754432000000)]]
[1, [1, (0/1), (1/720), (0/1), (-1433/7257600), (0/1), (1550887/15676416000), (0/1), (-365236274341/3476402012160000), (0/1), (31170363588856607/162695614169088000000), (0/1), (-2626723351027654662151/4919915372473221120000000), (0/1), (127061942835077684151157039/60219764159072226508800000000), (0/1)]]
[2, [1, (-1/360), (1/259200), (259193/1959552000), (-1036793/2821754880000), (-201551328007/5079158784000000), (9137074752049/76796880814080000000), (9142431862033871923/304115648023756800000000), (-11105299580705049589/125121866615488512000000000), (-11003865617473929216508154207/258236518070374430146560000000000), (114467620015003245418244743007/929651465053347948527616000000000000), (32505236416490926096399421788847363/334674527419205261469941760000000000000), (-254505521478572052318535393350091231/920050700832433373350094438400000000000000), (-1828472168539763642032546635313363411876021/5630710289094492244902577963008000000000000000), (449843951207507728031832088068767125946389963/490547480385912164375912592137256960000000000000000), (31024838101634458799200044021590825216299304842344313/20724188259597771556163554333704585216000000000000000000)]]
[3, [1, (0/1), (-1/5040), (0/1), (1513/50803200), (0/1), (-127057907/8449588224000), (0/1), (7078687551763/442893616349184000), (0/1), (-1626209947417109183/55804595659997184000000), (0/1), (25620826938516570309695021/315568291905804875857920000000), (0/1), (-67861652779316417663427293866727/211531737430299124385080934400000000), (0/1)]]
[4, [1, (1/1260), (1/3175200), (-476279/12002256000), (-1905119/60491370240000), (50409422809211/4192051957632000000), (327409436642411/31691912799697920000000), (-33180456307810635797257/3633794721613363507200000000), (-282922303030975330914097/36628650793862704152576000000000), (5379031277933782422359791052783/415368900002403065090211840000000000), (47439700106584179998732858654521/4428471503102543447807950848000000000000), (-36404043230640972806023058818270566601769/1233152174753934248476601993134080000000000000), (-448477438414484751987416795754334219171169/18645260882279485836966222136187289600000000000000), (44059016262452855253179633655261374898258492303313/446367545521770890936971357940323713024000000000000000), (8158862019359543444070175550192616738556343315215309/102361005539052500709666271802875033870663680000000000000000), (-569629821149561571872765829220003512513888474356694799393913/1251814885386412641031742229871630561277116416000000000000000000)]]
[5, [1, (0/1), (1/10080), (0/1), (-33589/2235340800), (0/1), (6685358543/878757175296000), (0/1), (-3154174722920027/389746382387281920000), (0/1), (4928758950963155306741/333934700429423149056000000), (0/1), (-2256715986149278985600498968703/54873539142916598253181992960000000), (0/1), (629222853795800878962230085722916097/3871876921924195172744521423257600000000), (0/1)]]
[6, [1, (-1/1680), (1/5644800), (9407989/312947712000), (-37631989/2103008624640000), (-2096938112640143/229648541810688000000), (149904329568001573/25463430315969085440000000), (2077435474826915904958427/299449940515796444774400000000), (-17724254999346713040382427/4024607200532304217767936000000000), (-111976939829427960973528888190502151/11379335383073058237485772963840000000000), (15178929891207525282519637681009903963/2485246847663155919066892815302656000000000000), (1779598085747305754736646575789869852177394973/79329079377407936936615218664460779520000000000000), (-241225547842987701588833000525699972846584624703/17592016642733984095063790891030822466355200000000000000), (-2216804467382185051458528121403529509855199450770516869/29554587959793093279707168696931781743476736000000000000000), (1857837620155651450279891034916557225570091149066824757/40889641694960797290512506338343265094504284160000000000000000), (19922345484131707240270922592637479980113734425892164090660921569859/57613815909476645084391529325773831926971254613999616000000000000000000)]]
[7, [1, (0/1), (-1/9504), (0/1), (6569539/410983372800), (0/1), (-94862020867/11717957925273600), (0/1), (148360361562210426521/17228547937242505543680000), (0/1), (-3758214620551052982685723/239312482485807898542735360000), (0/1), (17659775228092034903641523829434461/403596864162581236612265335062528000000), (0/1), (-15253807614781285310910350330441645179853/88223045731026957673548304121988120576000000), (0/1)]]
[8, [1, (1/1188), (1/2822688), (-975236429/22886636572800), (-3900952541/108757296993945600), (1673187234045287/129203668828807372800), (24741204553616603957/2095192534461706118799360000), (-416390509638217044924161981/42314508425988616775271874560000), (-3553044445676273323476205229/402157088080595813832183895818240000), (2594326466683133286611419169781551183899/185861603494377898333565624003980689408000000), (318285642111072314088164648150484807919/25976892347214228614150113096085771649024000000), (-183637667316299523050446787340969584371799407441/5770922496287724172005132524974030686460575744000000), (-5148483739079534617735950371518901403202578056384131/187164866768601985436139260102967752835563976759705600000000), (28638181650561498070967147583289414129520178187169628122173/269162779978172665792477323318604783077839478999062937600000000), (18827705277362052458863395307577239815778846623862046296474289/206568437168688656017105136826216603563521752478872853335244800000000), (-4107665650991246957700860278306395520803885006941136705235066280532998941/8374387727037222459261450799503234216766953606369744910637491814400000000000)]]
[9, [1, (0/1), (691/3603600), (0/1), (-756278519/25971865920000), (0/1), (70428516045253307/4773203017494912000000), (0/1), (-1207282026600970337462141/76897311407776148889600000000), (0/1), (674487004522944662914168709557673/23554107868070281061777817600000000000), (0/1), (-15888760614678571271038978643189988077091187/199127501983984940101086087058882560000000000000), (0/1), (1583798222362424121078560062946355762334601480141783/5023031063046416911037916763277724352512000000000000000), (0/1)]]
[10, [1, (-691/360360), (477481/259718659200), (27270129276629/280776648087936000), (-75375321284918639/404722691619874467840000), (-365968280308506388285675667/12396898877931726874619904000000), (1643735859311321887269714365897/26804078877908862579228171632640000000), (28818902191146659899637620909080751658287/1284662675970950616633738302628574003200000000), (-169930095546261471299784052384223123018804317/3703528335303134113681071477881863422345216000000000), (-382217632900099668663243861277991747464040649775752953/12011431238188536682854998259925574725886898339840000000000), (46823037076414380661715849077881931738040803765228528402891/735834691368915583435716619400952618397502456576606208000000000000), (4866716392353709570566815278008611320497715893298702739601120942213337/67086843513570712170664394764733803248128168268742290718064640000000000000), (-41443567019975441388846205026673443833189485265378666543917124727811255867/290104979142604102053847455569033680061945600607887662597941284044800000000000000), (-329646173828465774346971211550445315710876341492464017680118089036106858298781587903/1359048993689774584809618098155140700312595316255759175219323574538993664000000000000000), (61664000792126295378754033137652704976705049804896776894833298530688749725982457644122487/130272674167368547055610398108415609735396061612136150117621427923351887297904640000000000000000), (13386120102253131524884309722845350152952297269142174938072503858518945291821013177207927479272809211/11970990520052997052324739580898905526683067814450092679378444730447066957201593597952000000000000000000)]]
0 件のコメント:
コメントを投稿
注: コメントを投稿できるのは、このブログのメンバーだけです。