I am going through the Josephus problem and I am not able to understand the recurrence relation.
The solution says that for $2n$ people, the actual number of person in the $2n$-d round can be mapped using
$$J(2n)=2\cdot J(n)-1 \qquad\rm{eq.1}$$
and for 2n+1 people the numbering in the 2nd round can be mapped using
$$J(2n+1) = 2 \times J(n)+ 1 \qquad\rm{eq.2}$$
I understand the R.H.S of these $2$ equations.
In case of $2n$ people, after the first round the actual number of the person at position $1$ is $1 = 2 \times J(1)-1$, actual number of person $2$ is $3 =2 \times J(2)- 1$.
Same goes for the $2n+1$ equation too, actual number of person $1$ after round $1$ is $3 = 2 \times J(1)+ 1$.
What I do not understand is L.H.S, what does $J(2n)$ and $J(2n+1)$ mean here?
Why $2n$ and $2n+1$?
If I substitute '$1$' in eq.1, we get $J(2 \times 1)=2 \times J(1) - 1 \implies J(2)=1$; which is not correct.
What am I missing here?
Also how is it that using these equations I can calculate the position of the person that survives? Since these equations only represent the position of the person.
Thanks