When I was learning DSP, I was surprised by the fact that generating pink (1/f) noise, sample by sample, is not mathematically easy at all.
One practical approach is passing white noise (every sample independent random) through a "pinking filter", which is a sum of a bunch of lowpass filters at different frequencies, so that the sum of their cutoff "knees" approximates the frequency curve of pink noise. Another approach is generating in chunks using Fourier transform from a desired shape. Given the ubiquity of 1/f noise, you'd think there would be a simpler and more direct algorithm, but no.