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.

912. 奇数在哪里?

sn 为第 n 个满足二进制表示下没有连续的三个 1 的正整数,例如 s1=1s7=8

F(N) 为:对所有满足 nNsn 是奇数的正整数 n,其 n2 的和。已知 F(10)=199

F(1016)(109+7) 的值。


这个链接 回到源站。

这个链接 回到详细版题目目录。