I think I solved it but I would love someone to tell me if I'm wrong.
the question is as follows:
$n$ people are sitting on a bench with $n$ seats. Find a recursive equation that calculates how many different combinations are there to change the sitting order where every person can only move to the adjacent seat.
For example, if I'm sitting in chair number 4, I can only move to chair number 3, number 2, or stay where I am.
Next question: Same thing, but instead of on a bench, they are sitting around a round table.
My solution:
let $f(n)$ be the number of ways to rearrange the sitting as required. the first person has 2 options, either stay in his seat, or move to the sit next to him (he has only 1 sit next to him if its a bench), and the other people on the bench have $f(n-1)$ options. So overall : $f(n)=f(n-1)+2$
And if they are sitting at a round table: Same idea. the first person has $3$ options now. move right, move left, or stay where he is. overall: $f(n)=f(n-1)+3$
Let's give it a try.
$f(1) = 1$ as the only option is not to move. $f(2) = 2$ as the two people can exchange seats, or not move. Note that these are true for both bench and circle. $f(3) = 3$ for bench ($123 \to 213$ or $\to 132$ or $\to 123$) and $6$ for circle (new ones are $123 \to 321$ and $\to 231$ and $\to 312$).
In other words, you didn't get it right. Try again.
Hint. On a bench, if $1$ wants to go to $2$, $2$ must go to $1$. Otherwise the seat would stay empty.