IBM Interview Question

Pattern recognition and math