Let $o_n$ be defined as follows: $$o_1=1$$ $$o_2=3$$ $$o_3=5$$ As you can see, this function gives odd numbers the rule is $$o_n=2n-1$$
Can this definition be used to find $o_{\frac{1}{2}}$ ? The domain of this function is for all $n$ when $n \in \mathbb{Z} $ and I want it to be for all $n$ when $\mathbb{R} $ or $n \in \mathbb{Q}$
Your question isn't well-defined, for two reasons.
One problem is that finite sequences don't uniquely determine infinite sequences. Given a few values $o_1,o_2,o_3$, you can guess at what the rest of the values $o_n$ might be, and you can come up with formulas that fit the bill - but other people can guess differently and come up with different formulas that also fit the bill. For example, in the sequence $1,3,5,\dots$,
The other problem is that, even if you have a well-defined function on the integers, say $f:\mathbb{Z}\to\mathbb{R}$, $f(n) = 2n-1$, its extension to larger domains isn't well defined either. For example, suppose we try to extend it to $\tilde{f}: \mathbb{R}\to\mathbb{R}$:
For each one of these, you can find $\tilde{f}(\frac{1}{2})$. But they may all be different depending on which $\tilde{f}$ you choose.