Learn from a vibrant community of students and enthusiasts,
including olympiad champions, researchers, and professionals.

\(+\) and \(\times\) defined

Define \(S(n)\) to be the term directly succeeding \(n\) in A000027. For example, \(S(5) = 6\) because the term succeeding \(5\) in the sequence is \(6\). Also define \(S(0) = 1\). \(S\) is undefined everywhere else, and you may assume that \(S\) is injective.