ProjectEuler 505 Bidirectional Recurre - 拼圖
By Kristin
at 2015-03-03T01:57
at 2015-03-03T01:57
Table of Contents
505. Bidirectional Recurrence
https://projecteuler.net/problem=505
令:
x(0) = 0
x(1) = 1
x(2k) = 3x(k) + 2x([k/2]) mod 2^60 對所有k≧1,其中[]是高斯函數
x(2k+1) = 2x(k) + 3x([k/2]) mod 2^60 對所有k≧1
y_n(k) = x(k) 若k≧n
2^60 - 1 - max(y_n(2k),y_n(2k+1)) 若k<n
A(n) = y_n(1)
已知:
x(2) = 3
x(3) = 2
x(4) = 11
y_4(4) = 11
y_4(3) = 2^60 - 9
y_4(2) = 2^60 - 12
y_4(1) = A(4) = 8
A(10) = 2^60 - 34
A(10^3) = 101881
請求出A(10^12)。
--
https://projecteuler.net/problem=505
令:
x(0) = 0
x(1) = 1
x(2k) = 3x(k) + 2x([k/2]) mod 2^60 對所有k≧1,其中[]是高斯函數
x(2k+1) = 2x(k) + 3x([k/2]) mod 2^60 對所有k≧1
y_n(k) = x(k) 若k≧n
2^60 - 1 - max(y_n(2k),y_n(2k+1)) 若k<n
A(n) = y_n(1)
已知:
x(2) = 3
x(3) = 2
x(4) = 11
y_4(4) = 11
y_4(3) = 2^60 - 9
y_4(2) = 2^60 - 12
y_4(1) = A(4) = 8
A(10) = 2^60 - 34
A(10^3) = 101881
請求出A(10^12)。
--
Tags:
拼圖
All Comments
Related Posts
ProjectEuler 504 Square on the Inside
By Isla
at 2015-03-03T01:09
at 2015-03-03T01:09
ProjectEuler 503 Compromise or persist
By Charlotte
at 2015-03-03T01:01
at 2015-03-03T01:01
請問有人在逢甲四季熱壓過嗎?
By Suhail Hany
at 2015-02-24T13:10
at 2015-02-24T13:10
拼圖上膠問題
By Olive
at 2015-02-22T16:11
at 2015-02-22T16:11
高雄裱框
By Skylar Davis
at 2015-02-21T23:55
at 2015-02-21T23:55