Serial pattern learning of temporal intervals