Sequence prediction with mixed order Markov chains