title: How to detect if a repeating pattern exists
body: <p>My question isn't language specific... I would probably implement this in C# or Python unless there is a specific feature of a language that helps me get what I am looking for.</p>
  
  <p>Is there some sort of algorithm that anyone knows of that can help me determine if a list of numbers contains a repeating pattern?</p>
  
  <p>Let's say I have a several lists of numbers...</p>
  
  <pre><code>[12, 4, 5, 7, 1, 2]
  [1, 2, 3, 1, 2, 3, 1, 2, 3]
  [1, 1, 1, 1, 1, 1]
  [ 1, 2, 4, 12, 13, 1, 2, 4, 12, 13]
  </code></pre>
  
  <p>I need to detect if there is a repeating pattern in each list... For example, list 1 returns false, but and lists 2, 3, and 4 return true.</p>
  
  <p>I was thinking maybe taking a count of each value that appears in the list and if val 1 == val 2 == val n... then that would do it. Any better ideas?</p>