Waiting time for consecutive repetitions of a pattern and related distributions