$a_0=0, a_n=\frac1{\sqrt n}, b_n=\frac1n$
This is a homework question. The solution says that there is no such function, because that would mean that series $\sum a_n^2$ converges, which we know to be false.
I'm not sure where that comes from as I haven't really understood the relation between the fourier series and its coefficients. Any help will be appreciated