This is a kind of digital signal I'd like to re-create. i.e. I'd like to get N samples that will describe this signal:
even better if it satisfy the Nyquist theorem (thus, sample-rate is 2x bandwidth).
How would I retrieve the Fourier series? Or even better: which kind of series will create this signal?
I got it summing random partials at different phase:
and than waveshaping it with some curves inside some range of samples.
But I'd like to do the opposite process: create it starting from summing sin waves.


Have you learnt what the Fourier Transform does? it takes a function $g(t)$ in the time domain, and gives a new function $\mathcal{F}\{g\} = G(f)$, which for different values of $f$ (which are frequencies), provides the amplitude of the given frequency in the original $g(t)$.
You can take the signal you have, apply the fourier transform on it, take as many frequencies as you want (preferably the largest ones that contribute the most to your signal) and then use the same frequencies to generate your signal again when you want to.