I would like to know if I could do something like:

$\epsilon (0)\text{:=}0$

$\epsilon (n)\text{:=}\frac{4}{2 n-(-1)^n+1}$

and use it instead of a constant.

As $n\rightarrow \infty$, $\epsilon \rightarrow 0.$

Edit for clarification:

In Hardy and Wright, sixth edition, page 494, (22.19.2), it states, "...there is always a prime $p$ satisfying"

$x < p < (1 + \epsilon) x$

Using this function:

$x(0)\text{:=}0$

$x(n)\text{:=}\frac{1}{8} \left(2 n (n+2)-(-1)^n+1\right)$

I want to have:

$x(n) < p \leq (1+\epsilon(n)) x(n)$

Edit after the closure: The answer I was looking for is "YES." I have located several proofs that have $\epsilon$ dependent on $x,$ meaning it can vary under my control. Now, I can't use it that way because neither $x$ nor $\epsilon$ are dependent on each other, but both are dependent on $n.$ But, I hope to adapt.

I did not sign off on quid's answer because it was not exactly what I needed. However, I do like the answer very much.

Thanks.