partial numerical array - pattern matching
According to your definition (consecutive, order matters, max +/-2 difference), it's not a fuzzy matching case. It's just a minor variant of searching a subsequence:

for i=0 to len(source)-len(test) {
  j=0
  while (j&lt;len(test)) &amp;&amp; (abs(source[i+j]-test[j]) &lt;= 2) {
    j++
  if (j == len(test)) { 
     // match found
  }
}


This is the simple version, in case efficiency is an issue there is a more efficient version using dynamic programming.