作者tml (流刑人形)
看板puzzle
标题[中译] ProjectEuler 463 A weird recurrence re
时间Thu Apr 17 04:21:21 2014
463. A weird recurrence relation
http://projecteuler.net/problem=463
一函数f对所有正整数定义如下:
‧f(1) = 1
‧f(3) = 3
‧f(2n) = f(n)
‧f(4n+1) = 2f(2n+1) - f(n)
‧f(4n+3) = 3f(2n+1) - 2f(n)
定义函数S(n)为Σf(i)对1≦i≦n的和。
S(8) = 22以及S(100) = 3604。
请求出S(3^37),并给出结果的末九位数作为答案。
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 129.2.129.155
※ 文章网址: http://webptt.com/cn.aspx?n=bbs/puzzle/M.1397679685.A.88B.html