title: Second Order Sequence in python
body: <p>I need to create a second order sequence in python.</p>
  
  <p>There are 4 optional cases <code>[1,2,3,4]</code>.
  I would be great if each case occurs equally often. If that is not possible, well...</p>
  
  <p>Importantly, I want to control for second ordering.
  This means: Depending on the last two numbers, only 2 numbers are allowed to follow.</p>
  
  <p>I will give two examples: 
  If the sequence is <code>[...1,1,...]</code> only 3 or 4 is possible.
  If the sequence is <code>[...3,4,...]</code> only 1 or 2 is possible.
  [I have these restrictions for all possibilities. Of course. But i think when i have a code for two of them i can adapt it for the rest.]</p>
  
  <p>The sequence should look something like that with a length of ca. 120 cases:
  seq = <code>[2,4,3,3,1,3,2,...]</code></p>
  
  <p>Any suggestions how to create such a sequence?</p>