In the sequence 4727235974752479478471, how many '7's are there which are immediately preceded by '4' but NOT immediately followed by '2'?
In the sequence 4727235974752479478471, how many '7's are there which are immediately preceded by '4' but NOT immediately followed by '2'?
Scanning the sequence 4-7-2-7-2-3-5-9-7-4-7-5-2-4-7-9-4-7-8-4-7-1 position by position, the 7's that come right after a '4' AND are NOT followed by a '2' occur four times: after the 4 before '5', after the 4 before '9', after the 4 before '8', and after the final 4 before '1'. So the count is 4.
Re-check your working by substituting the answer back into the original question.