Van Erk's Sequence
Van Erk's Sequence begins in the following manner, with \(V(0)=V(1)=0\) and \(V(2)=1\).
\(V(0),V(1),V(2),V(3), \ldots = 0, 0, 1, 0, 2, 0, 2, 2, 1, 6, 0, 5, 0, 2, \ldots\)
Suppose the \(n^{th}\) term is \(V(n) = x\). Then the \((n+1)^{th}\) term is determined by:
- If \(x\) has not appeared in the sequence before \(V(n)\), then \(V(n+1) = 0\).
- Otherwise, if the \(k^{th}\) term is \(V(k) = x\) and this is the last appearance of \(x\) in the sequence before \(V(n)\), then \(V(n+1) = n-k\).
Part A | Determine \(V(123)\) | |
---|---|---|
Part B | Determine \(V(1234567)\) |