Given a natural number $n>1$,
natural numbers $a$ are chosen uniform randomly between $0$ and $n-1$ i.e.: $$0 \le a \le n - 1$$
natural numbers $b$ are chosen uniform randomly between $1$ and $n-1$ i.e.: $$1 \le b \le n - 1$$ The average $\delta$ of the distance $|a-b|$ between numbers $a$ and $b$ equals $6.5$.
What is the given value of $n$?
First, my true apologies for, initially, not having been conform forum guidelines.
As requested (by @Taladris): some additional information about question.
Have a look at answer provided, also upon request (by @lulu), where formula is derived.
Thanks all for getting me on rails.
I personally believe the formula is strikingly simple. Some people would perhaps expect numerical methods to be required for general reasoning, but not so.
Here is the motivation: average distance in this particular case (note $0 \le a$ and $1 \le b$) turns out to have a very simple formula in terms of $n$, allowing to, conversely, easily find $n$ in function of it. As it so happens, linear Gauss formula, and its quadratic generalization, in this particular case, both contain a common factor that perfectly cancels out for probability computation.
I have used (in disguise) the formulas for two puzzles (112210 112821) on puzzling exchange where also, conversely, some amount is asked in function of some average. So now I thought to present the math.
Have a nice day. I hope to contribute in simplicity.
To be honest: I doubted myself about the validity of such answer and therefore presented the question to the kind exchange community.