A particle lies on the real number line at the origin. For each step taken, the particle moves from its current position a distance (and direction) chosen equi-probably from range $[-1,r]$. However, if the particle would otherwise move left of the origin, the particle is set back at the origin before the next step.



> 
> Given $r$, can a closed expression be derived for the probability $P\_{n,r}$ of the particle being at the origin after step $n$? Can an expression be derived for the centered variance $E\_{n,r}(X^2)$?
> 
> 
> 


This is a variation of a problem featured [here](https://mathoverflow.net/questions/94226/a-random-walk-with-uniformly-distributed-steps%20here), where instead of the particle "dying" upon crossing the origin it is simply set at the origin and allowed to continue. Also, I am asking about the probability of it simply being at the origin at the $n$th step, not whether it has at some point been there.


Being only a graduate, all I've managed to do is conjecture what the expression might be for particular cases. Inspired by the excellent answers to the original problem, I directly simulated the problem to find the probabilities and presumed they were given by a rational expression $\frac{N\_r(n)}{(1+r)^n n!}$. Surprisingly, my results indicated that the numerator was likely an integer in these cases. My conjectures as to the numerator for those particular cases are:


* $r=0$: $N\_0(n)=n!$ (Known precisely, since $P\_{n,0} = 1$ for all $n$)
* $r=1$: $N\_1(n) = (2n-1)!!$
* $r\rightarrow\infty$: $N\_r(n)\rightarrow (n+1)^{n-1}$


Edit: The conjecture for the case when $r$ gets arbitrarily large has been changed. There was a typo. (I was considering its similarity to Cayley's Formula and typed that out instead!) 


At this point I'm lost. Your consideration is appreciated.


**Update:** I've managed to derive a stronger conjecture for the expression for the "re-center" probability:


$$P\_{n,r}=\left(\frac{a}{c}\right)^n\frac{\Gamma(1+\frac{d}{a}) \Gamma(1+\frac{b}{a}+n)}{\Gamma(1+\frac{b}{a}) \Gamma(1+\frac{d}{c}+n)}$$


I have made no progress in determining the dependence of the four variables $a$, $b$, $c$, $d$ on the parameter $r$, except in the obvious cases when $r=0$ and $r=1$. If this expression suggests any accessible combinatorial argument I'd be happy to hear it.


**Second Update:** I have a closed form conjecture for the "re-center" probability when $r \geq 1$:


$$P\_{n,r}=\frac{\left(\frac{3r}{1+r}\right)\_{n-1}}{(1+r)\left(2r\right)\_{n-1}}, r\geq 1$$


This expression uses the rising Pochhammer symbol. It appears to fail for $r<1$ for whatever reason.



Random Walk on $\mathbb{R}$ with Uniformly Distributed Steps and "Reflective" Boundary at Origin
Let $X\_1,X\_2,\dots$ be independent identically distributed random variables representing the successive jumps of the particle. Let $M\_n$ be the position of the particle at time $n\in\{0,1,\dots\}$, so that $M\_0=0$ and $M\_n=\max(0,M\_{n-1}+X\_n)$ for $n\in\{1,2,\dots\}$. Let now $F\_n(x):=\mathbb{P}(M\_n\le x)$ for real $x$. Then $F\_0(x)=\mathrm{I}\{x\ge0\}$ and $F\_n(x)=\frac{\mathrm{I}\{x\ge0\}}{1+r}\,\int\_{-r}^1 F\_{n-1}(x-y)\,dy$ for all real $x$ and $n\in\{1,2,\dots\}$. In particular, the probability in question is $P\_{n,r}=\mathbb{P}(M\_n=0)=F\_n(0)$. 


The work in Mathematica notebook at [n=1,2,3](https://www.dropbox.com/s/w6w2obndgxcdr0y/walk%3Bn%3D1%2C2%2C3.nb?dl=0) (the corresponding pdf file at [n=1,2,3 - pdf](https://www.dropbox.com/s/3c3j39hntqtaitf/walk%3Bn%3D1%2C2%2C3.pdf?dl=0)) shows that the expression 
$$\frac{\left(\frac{3r}{1+r}\right)\_{n-1}}{(1+r)\left(2r\right)\_{n-1}},\quad r\geq 1,$$
which you most recently proposed for $P\_{n,r}$, is incorrect already for $n=3$ (and $r\ne1$), even though it seems pretty close to the correct one. 


I doubt that there is such a simple closed form expression for $P\_{n,r}$. However, using Spitzer's identity and work done in [c.f. of X\_+](http://arxiv.org/abs/1309.5928v3), one can obtain an integral expression for the generating function of $P\_{n,r}$: 
$$
(\*)\qquad \sum\_{n=0}^\infty P\_{n,r}z^n=
\frac1{\sqrt{1-z}}\exp \Big(\frac1{2 \pi i}\,\int\_0^{\infty } 
\ln\frac{(r+1) u-z (e^{i r u}-e^{-i u})}{(r+1) u-z (e^{i u}-e^{-i r u})} \, \frac{du}{u}\Big)
$$ 
for complex $z$ with $|z|<1$. 
To obtain (\*), one can start with formula (23) in [c.f. of X\_+](http://arxiv.org/abs/1309.5928v3), analytically extend it to complex $s$ with $\tau:=\Im s\ge0$, and then let $\tau\to\infty$. Alternatively, one can start with the second displayed formula on page 159 (with $\lambda=0$) in 
[Spitzer 1960](http://www.ams.org/journals/tran/1960-094-01/S0002-9947-1960-0111066-X/) and then reason as in [c.f. of X\_+](http://arxiv.org/abs/1309.5928v3); here one should also have in mind statement (2.4) on page 155 in [Spitzer 1960](http://www.ams.org/journals/tran/1960-094-01/S0002-9947-1960-0111066-X/). 


In particular, it easily follows from (\*) that your expression for $P\_{n,r}$ is correct in the symmetric case, when $r=1$, but apparently only in this case. 


**Addendum:** Even though there does not seem to be a simple closed form expression for $P\_{n,r}$, an explicit but rather complicated expression for $P\_{n,r}$ can be obtained from (\*). Indeed, expand the logarithm back in powers of $z$. Then use the Cauchy integral theorem to see that for natural $n$ 
$$\frac1{\pi i}\int\_0^\infty\frac{f(u)^n-f(-u)^n}u\,du =1-2a\_n,$$
where 
$$f(u):=\mathbb{E}e^{iuX\_1}=\frac{e^{iru}-e^{-iu}}{i(r+1)u}$$
for $u\ne0$ and 
$$a\_n:=a\_{n,r}:=\frac1{2n}\Big[1+\frac1{n!}\sum\_{j=0}^n(-1)^j \binom nj \Big(\frac n{r+1}-j\Big)^n\,\text{sign}\Big(\frac n{r+1}-j\Big)\Big].$$ 


It follows from (\*) that for complex $z$ with $|z|<1$ 
$$\sum\_{n=0}^\infty P\_{n,r}z^n=\exp\sum\_{k=1}^\infty a\_k z^k
=\prod\_{k=1}^\infty\exp(a\_k z^k)
=\prod\_{k=1}^\infty\sum\_{q=0}^\infty \frac{a\_k^q z^{kq}}{q!},$$
whence 
$$P\_{n,r}=\sum\prod\_{k=1}^n\frac{a\_k^{q\_k}}{q\_k!},$$
where the sum is taken over all $n$-tuples $(q\_1,\dots,q\_n)$ of nonnegative integers such that $1q\_1+2q\_2+\dots+nq\_n=n$. In particular, for $n=0$ the set of all such $n$-tuples is the singleton set $\{\emptyset\}$, and, as usual, $\prod\_{k=1}^0\ldots:=1$, so that $P\_{0,r}=1$. Also, 
$$P\_{1,r}=a\_1=a\_{1,r},\quad P\_{2,r}=a\_2+a\_1^2/2!, \quad P\_{3,r}=a\_3+a\_1a\_2+a\_1^3/3!. $$
Substituting here the expressions for the $a\_k$'s, one sees that the above results for $n=1,2,3$ agree with the ones previously found in the Mathematica notebook at [n=1,2,3](https://www.dropbox.com/s/w6w2obndgxcdr0y/walk%3Bn%3D1%2C2%2C3.nb?dl=0) (the corresponding pdf file at [n=1,2,3 - pdf](https://www.dropbox.com/s/3c3j39hntqtaitf/walk%3Bn%3D1%2C2%2C3.pdf?dl=0)) by iterative integration. 


