I have seen a theorem that assures that the set $A=\lbrace p\in [1,\infty]: u\in L^p(0,\infty)\rbrace$ is an interval. It is easy to find a function $u$ for which $A$ is the empty-set or $[1,\infty]$ or $\lbrace \infty \rbrace$. Also, the function $$\frac{1}{x^{1/a}[\log^2(x)+1]}$$ is $L^p(0,\infty)$ iff $a=p$ (Is it possible for a function to be in $L^p$ for only one $p$?). I could find a function $u$ s.t. $A$ is of the form $(a,\infty ]$ and $[1,a)$.
I wonder if there exists a function $u$ for which the interval $A$ is of the form $[a,b]$ or $(a,b)$ or $(a,b]$ or $[a,b)$ for $1 \leq a<b \leq \infty$. This might be hard, I do not expect a complete answer but any idea or hint would be appreciated.
Thanks in advance.