← Complete problem index

PROJECT EULER · #0912

Where are the Odds?

Statement only · UnsolvedOriginal problem ↗

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.

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.