0%

Problem 811


Problem 811


Bitwise Recursion

Let b(n) be the largest power of 2 that divides n. For example b(24)=8.

Define the recursive function:
A(0)=1A(2n)=3A(n)+5A(2nb(n))n>0A(2n+1)=A(n)
and let H(t,r)=A((2t+1)r).

You are given H(3,2)=A(81)=636056.

Find H(1014+31,62). Give your answer modulo 1 000 062 031.


按位递归

b(n)为最大的整除n2的幂,例如b(24)=8

定义如下递归关系式:
A(0)=1A(2n)=3A(n)+5A(2nb(n))n>0A(2n+1)=A(n)
并记H(t,r)=A((2t+1)r)

已知H(3,2)=A(81)=636056

H(1014+31,62),并将你的答案对1 000 062 031取余。


Gitalking ...