2017年6月12日月曜日

170612(2)

Ruby


The Irrationality of ζ(3)

Apery がζ(3) の無理数性を示すのに用いた
{a_n} = {1, 5, 73, 1445, ... }

{b_n} = {0, 6, 351/4, 62531/36, ... }
について以下の性質がある。

まず、f とg を次のように定める。
f(q) = 5*E_2(q) - 2*E_2(q^2) + 3*E_2(q^3) - 30*E_2(q^6).
E_4(q) - 28*E_4(q^2) + 63*E_4(q^3) - 36*E_4(q^6) = Sum_{n >= 1} c_n * q^n と展開し、
g(q) = Sum_{n >= 1} c_n /n^3 * q^n.

ここで、
t(q) = (eta(q)*eta(q^6)/(eta(q^2)*eta(q^3))^12
を準備すると、
f(q) = Sum_{n>=0} a_n * t(q)^n,
6*f(q)*g(q) = Sum_{n>=0} b_n * t(q)^n.

このことを確認してみた。

# m次以下を取り出す
def mul(f_ary, b_ary, m)
  s1, s2 = f_ary.size, b_ary.size
  ary = Array.new(s1 + s2 - 1, 0)
  (0..s1 - 1).each{|i|
    (0..s2 - 1).each{|j|
      ary[i + j] += f_ary[i] * b_ary[j]
    }
  }
  ary[0..m]
end

def A000203(n)
  s = 0
  (1..n).each{|i| s += i if n % i == 0}
  s
end

def A006353(n)
  a = [0] + (1..n).map{|i| A000203(i)}
  ary = [1]
  (1..n).each{|i|
    ary[i] = 5 * a[i]
    ary[i] -=  2 * a[i / 2] if i % 2 == 0
    ary[i] +=  3 * a[i / 3] if i % 3 == 0
    ary[i] -= 30 * a[i / 6] if i % 6 == 0
  }
  ary
end

def Apery(a, b, n)
  i = 0
  ary = [a]
  while i < n
    i += 1
    a, b = b, ((((34 * i + 51) * i + 27) * i + 5) * b - i ** 3 * a) / (i + 1r) ** 3
    a = a.to_i if a.denominator == 1
    ary << a
  end
  ary
end

def s(k, n)
  s = 0
  (1..n).each{|i| s += i if n % i == 0 && i % k == 0}
  s
end

def A(ary, n)
  a_ary = [1]
  a = [0] + (1..n).map{|i| ary.inject(0){|s, j| s += j[1] * s(j[0], i)}}
  (1..n).each{|i| a_ary << (1..i).inject(0){|s, j| s -= a[j] * a_ary[-j]} / i}
  a_ary
end

def f(n)
  [0] + A([[1, 12], [6, 12], [2, -12], [3, -12]], n)[0..-2]
end

def S(c_ary, x_ary, n)
  ary = Array.new(n + 1, 0)
  tq = x_ary
  tqn = [1] + Array.new(n, 0)
  (0..c_ary.size - 1).each{|i|
    (0..n).each{|j|
      ary[j] += c_ary[i] * tqn[j]
    }
    # 計算の途中経過を表示
    p [c_ary[i], (0..8).map{|j| tqn[j]}] if i < 9
    tqn = mul(tqn, tq, n)
  }
  ary
end

def A001158(n)
  s = 0
  (1..n).each{|i| s += i * i * i if n % i == 0}
  s
end

def g(n)
  a = [0] + (1..n).map{|i| A001158(i)}
  ary = a.clone
  (1..n).each{|i|
    ary[i] -= 28 * a[i / 2] if i % 2 == 0
    ary[i] += 63 * a[i / 3] if i % 3 == 0
    ary[i] -= 36 * a[i / 6] if i % 6 == 0
  }
  [0] + (1..n).map{|i| ary[i] / (i ** 3).to_r}
end

n = 20
x_ary = f(n)
p a = A006353(n)
p ary1 = S(Apery(1, 5, n), x_ary, n)
p a == ary1

p b = g(n)
# 6*f(q)*g(q)
p c = mul(a, b, n).map{|i| i * 6}
p ary2 = S(Apery(0, 6, n), x_ary, n)
p c == ary2

出力結果
[1, 5, 13, 23, 29, 30, 31, 40, 61, 77, 78, 60, 47, 70, 104, 138, 125, 90, 85, 100, 174]
[1, [1, 0, 0, 0, 0, 0, 0, 0, 0]]
[5, [0, 1, -12, 66, -220, 495, -804, 1068, -1596]]
[73, [0, 0, 1, -24, 276, -2024, 10626, -42528, 135172]]
[1445, [0, 0, 0, 1, -36, 630, -7140, 58905, -377028]]
[33001, [0, 0, 0, 0, 1, -48, 1128, -17296, 194580]]
[819005, [0, 0, 0, 0, 0, 1, -60, 1770, -34220]]
[21460825, [0, 0, 0, 0, 0, 0, 1, -72, 2556]]
[584307365, [0, 0, 0, 0, 0, 0, 0, 1, -84]]
[16367912425, [0, 0, 0, 0, 0, 0, 0, 0, 1]]
[1, 5, 13, 23, 29, 30, 31, 40, 61, 77, 78, 60, 47, 70, 104, 138, 125, 90, 85, 100, 174]
true
[0, (1/1), (-19/8), (91/27), (-179/64), (126/125), (-1/216), (344/343), (-1459/512), (2521/729), (-1197/500), (1332/1331), (-737/1728), (2198/2197), (-817/343), (1274/375), (-11699/4096), (4914/4913), (485/5832), (6860/6859), (-11277/4000)]
[0, (6/1), (63/4), (971/36), (10679/288), (1126103/36000), (105401/2400), (536870027/12348000), (6914199661/98784000), (287234243731/2667168000), (180215848643/2667168000), (372368618068019/3550000608000), (91108455284929/3550000608000), (375230372846413103/3899675667888000), (11572107009689143/74279536531200), (362633909676097/4687110177750), (17569994567535455953/62394810686208000), (-6580051272057008432923/306545704901339904000), (18203831262802264966759/102181901633779968000), (11825963366918039995022749/84103879596731616061440), (11558953346115895446260749/191145180901662763776000)]
[0, [1, 0, 0, 0, 0, 0, 0, 0, 0]]
[6, [0, 1, -12, 66, -220, 495, -804, 1068, -1596]]
[(351/4), [0, 0, 1, -24, 276, -2024, 10626, -42528, 135172]]
[(62531/36), [0, 0, 0, 1, -36, 630, -7140, 58905, -377028]]
[(11424695/288), [0, 0, 0, 0, 1, -48, 1128, -17296, 194580]]
[(35441662103/36000), [0, 0, 0, 0, 0, 1, -60, 1770, -34220]]
[(20637706271/800), [0, 0, 0, 0, 0, 0, 1, -72, 2556]]
[(963652602684713/1372000), [0, 0, 0, 0, 0, 0, 0, 1, -84]]
[(43190915887542721/2195200), [0, 0, 0, 0, 0, 0, 0, 0, 1]]
[(0/1), (6/1), (63/4), (971/36), (10679/288), (1126103/36000), (105401/2400), (536870027/12348000), (6914199661/98784000), (287234243731/2667168000), (180215848643/2667168000), (372368618068019/3550000608000), (91108455284929/3550000608000), (375230372846413103/3899675667888000), (11572107009689143/74279536531200), (362633909676097/4687110177750), (17569994567535455953/62394810686208000), (-6580051272057008432923/306545704901339904000), (18203831262802264966759/102181901633779968000), (11825963366918039995022749/84103879596731616061440), (11558953346115895446260749/191145180901662763776000)]
true

0 件のコメント:

コメントを投稿