Generate both number and shape patterns that follow a provided rule.