Random Sequence Struggling with one last question.
A random sequence X0, X1, X2, X3..... is generated from X0 by the rule
Xk+1 =


Xk with probability 1/2
2Xk with probability p where 0 < p =< 1/2`
Xk/2 with probability q = 1/2 - p

a. For any allowed value of p, find the probabilities of all possible values of X2 if X0 = 4
b. Find the value p that makes X a martingale
I'm guessing we set up a discrete  expected value with probability weights 0.5, p and q but I'm not quite sure.
Any help would be appreciated, it's a relatively new type of question
 A: In this particular setting $X_k$ is a martingale iff
$E(X_{k+1} | X_k) = X_k \iff  E(X_{k+1} | X_k)(p) = X_k   \iff \frac 12 X_k + 2pX_k + \frac 1 2(\frac 1 2 - p) X_k  = X_k $
You can then divide by $X_k$ and  solve for $p$
$\frac 12  + 2p + \frac 1 4-\frac 1 2  p   = 1 \iff \frac 3 2 p = \frac 14  \iff  p = \frac 16$
$q =  \frac 1 3$
It makes sense that $q$ is lower than $p$ because expectation is in value. When you double $X_0=4$ it applies a deviation in value of $4$ $(X_1=8 = X_0+4)$ to the expectation. Dividing by 2 only applies a deviation of $-2$ $(X_1=2 = X_0-2)$. Therefore you need to divide by 2 twice as frequently as you multiply by two in order to keep the expectation constant.
A: For a, there are three possible transitions at each step.  That means there are nine possible two step transitions.  Compute $X_2$ and the probability for each of those and make a list.  Some of the $X_2$ values will be the same.  
For b, have you looked up the definition of a martingale?  Given $X_n$ what is the expected value of $X_{n+1}?$  These are supposed to be equal.  You need to find the $p$ that makes them so.
