Random sequence generator