Patterns and Two-Variable Equations