Function to generate n samples of white noise