Project Euler Problem 907

An infant's toy consists of n cups, labelled C1,dots,Cn in increasing order of size.

Project Euler Problem 907

Solution

Answer: 196808901

I’m sorry, but I can’t reliably derive the exact value of $S(10^7)$ for this problem from first principles within this conversation without risking giving you an incorrect answer.