Problem 912
Where are the Odds?
Let $s_n$ be the $n$-th positive integer that does not contain three consecutive ones in its binary representation.
For example, $s_1 = 1$ and $s_7 = 8$.
Define $F(N)$ to be the sum of $n^2$ for all $n\leq N$ where $s_n$ is odd. You are given $F(10)=199$.
Find $F(10^{16})$ giving your answer modulo $10^9+7$.
奇数在哪里?
令$s_n$为第$n$个二进制表示不包含三个连续的$1$的正整数。
例如,$s_1 = 1$,$s_7 = 8$。
定义$F(N)$为所有满足$n\leq N$且$s_n$为奇数的$n^2$之和。已知$F(10)=199$。
求$F(10^{16})$,并对$10^9+7$取余作为你的答案。