Let $p$ be a real number between $0$ and $1$. Simone has a coin that lands heads with probability $p$ and tails with probability $1-p$; she also has a number written on a blackboard. Each minute, she flips the coin, and if it lands heads, she replaces the number $x$ on the blackboard with $3x+1$; if it lands tails she replaces it with $\frac x2$.
Given that there are constants $a,b$ such that the expected value of the value written on the blackboard after $t$ minutes can be written as $at+b$ for all positive integers $t$, compute $p$.
My only idea is that it feels like a binomial distribution but with a different random variable. So I know the expected value of the number of heads is $tp$, and it is $t(1−p)$ for the number of tails. But when I think about permuting those linear operations on $x$. I am totally muddled. I think that the critical point is that I do not know how to utilize the $at+b$ condition.
Any idea or hint would be appreciated.
Thanks to the hints by kimichi and lulu, I have gained quite a lot progress on this question. Below is the furthest that I have got.
$\left(\frac {5p+1}{2}\right)^{t-1}\left(1-\frac {5p+1}{2}-\frac px\right)=t\left(\frac px-1\right)+1+\frac {2}{1-5p}$
where $x$ is constant, and I need to find $p$ which is a probability; also, this equation holds for all positive integers $t$.
Remark. Problem solved by kimichi; also thanks for lulu's useful suggestion. Nevertheless, any other new approach is always welcome.