0%

Problem 912


Problem 912


Where are the Odds?

Let sn be the n-th positive integer that does not contain three consecutive ones in its binary representation.

For example, s1=1 and s7=8.

Define F(N) to be the sum of n2 for all nN where sn is odd. You are given F(10)=199.

Find F(1016) giving your answer modulo 109+7.


奇数在哪里?

sn为第n个二进制表示不包含三个连续的1的正整数。

例如,s1=1s7=8

定义F(N)为所有满足nNsn为奇数的n2之和。已知F(10)=199

F(1016),并对109+7取余作为你的答案。


Gitalking ...