p456 - checking if pattern in values of n
p456 - first part of quadrant based loop