Function to generate n samples of brown noise