Golomb sequence is a non-decreasing integer sequence where n-th term is equal to number of times n appears in the sequence. It's recursive formula is given by :
G(1) = 1
G(n+1) = 1 + G(n + 1 - G(G(n)))
It will be very helpful if someone can just explain this recursion and not any kind of closed form solution. I am stuck on this for a few days but still nothing comes to my mind that will explain this recursive formula.
Let's look at the first few terms, step-by-step:
$G(1) = 1$
$G(2) = 1 + G(2 - G(G(1))) = 1 + G(2 - G(1)) = 1 + G(2-1)=1+G(1)=1+1=2$
$G(3) = 1 + G(3-G(G(2)) = 1+G(3-G(2))=1+G(3-2) = 1+G(1)=1+1=2$
$G(4) = 1+G(4-G(G(3))=1+G(4-G(2))=1+G(4-2)=1+G(2)=1+2=3$
$G(5) = 1+G(5-G(G(4))=1+G(5-G(3))=1+G(5-2)=1+G(3) = 1+2 = 3$
$G(6) = 1+G(6-G(G(5))=1+G(6-G(3))=1+G(6-2)=1+G(4) = 1+3 = 4$
etc.