Generating Numerical Patterns and Forming Ordered Pairs by using Rules