2018年6月23日土曜日

180623

Ruby


Expansion of Riemann-Siegel theta function about infinity

t/2 * log(t/(2Pi*e)) - Pi/8 + 1/(48t) + 7/(5760t^3) + 31/(80640t^5) + ...
となるが、1/t^(2n-1) の係数を求めてみた。

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

# 1/t^(2n-1)の係数
def RiemannSiegelTheta_infty(n)
  a = bernoulli(2 * n)
  (1..n).map{|i| (1 - 1r / 2 ** (2 * i - 1)) * a[2 * i].abs / (4 * i * (2 * i - 1))}
end

n = 50
ary = RiemannSiegelTheta_infty(n)
(1..n).each{|i| p [-(2 * i - 1), ary[i - 1]]}

出力結果
[-1, (1/48)]
[-3, (7/5760)]
[-5, (31/80640)]
[-7, (127/430080)]
[-9, (511/1216512)]
[-11, (1414477/1476034560)]
[-13, (8191/2555904)]
[-15, (118518239/8021606400)]
[-17, (5749691557/64012419072)]
[-19, (91546277357/131491430400)]
[-21, (23273283019/3472883712)]
[-23, (1982765468311237/25282593423360)]
[-25, (22076500342261/20132659200)]
[-27, (455371239541065869/25222195445760)]
[-29, (925118910976041358111/2675794690179072)]
[-31, (16555640865486520478399/2172909854392320)]
[-33, (1302480594081611886641/6803228196864)]
[-35, (904185845619475242495834469891/166176023021774438400)]
[-37, (21194489326041221593005331/122045790683136)]
[-39, (143531742398845896012634103722237/23207172025142476800)]
[-41, (3342730069684120811652882591487741/13677625582370684928)]
[-43, (22256729848336009246732182756923251/2087840639751290880)]
[-45, (912424254048568138351970895723328417/1785958727229112320)]
[-47, (789453341324662409540561918158225679892869/29470700277583325429760)]
[-49, (11147697225254007513111810575214137741411/7282320597458092032)]
[-51, (138774216525269492267278889184261960029330207/1460787575133894082560)]
[-53, (262559530727861921881866927518259047914603716781/41142652410241675689984)]
[-55, (12761363511497245973575744337905525496252437981349/27583646997718813900800)]
[-57, (419840407831094306834595297832289933826084178563079/11631825059978479140864)]
[-59, (700534210387317657846086373720757772905116340448339145899117/231766073364291824836096819200)]
[-61, (914942546207257218347013581951612877187089501496318471/3375754165488847945728)]
[-63, (140700998996297447343377044678566519904070471757052352911817/5418915539092917882716160)]
[-65, (4939031951109733965140066606930832835066903671403675776709554121/1862499865104262175517573120)]
[-67, (683815428157937271065504753388761438699875983320779224773534231/2372989157641996719882240)]
[-69, (25389151494943714651600252168784508359163010155160678766142014854631/763450822186086932762591232)]
[-71, (13760869587331995975993746457467711498463585881697886664960973906542546557363/3382138320647781222946103875338240)]
[-73, (8717850308951125943106241478955633907151863144161504932373403782468541/16547172155975236828790784)]
[-75, (49023311622640470047865661213465876006186714374825393546428762025041095693/680020773533228910772224000)]
[-77, (4822293101128764729841245801951842665278817210269947201709724528113391868856229/463295432925094723993473122304)]
[-79, (2782816853788582377005851633530926719138614127020726458440267606052697114593813198429/1757370975503624612916738863923200)]
[-81, (98896863649218655409761838437607758457536833175487436710877802954285346163824024443/390125197692919293194381819904)]
[-83, (19580499496346711729461614442098338002401418332067606586224352059717880243995978807707091139/459098754681771582869232682134405120)]
[-85, (594422297905774846957822708248761492855687960626880103613286834213475178872065418347611/78918677504442992524819169280)]
[-87, (18448492714875017545254892621120767642137492300133642132001473995657945654874039977000838622979/13227810219377645266590608035676160)]
[-89, (145960221431107281351963087682715030380082072086568444045058765037532667787093417143826510295814277/539658959711635093651289816709464064)]
[-91, (139465888662750057525922213557499999477386634608852751750285481117999879995472867750432983815705583/2541441383051314289156906066903040)]
[-93, (257241581562121447666054655595056567786609536891241202135519514439930252484340788857092820933671991/22104657341479750188598762143744)]
[-95, (8382357404391815551752970865183522834120355297893424941747925300960451850332144891424129781485313192714397253/3252802722275978675482213745653343846400)]
[-97, (219601906638938053472410975845541383947744568855462550031915350118687904096064182124956938408313871105681/368886324666414755835540632764416)]
[-99, (59958629710911453578995485137914549750642868138660184276639300866956629960970010246003223021546695820758192199457/418282865605508170923662666568302592000)]

0 件のコメント:

コメントを投稿