How many such 5's are there in the following number sequence, each of which is immediately preceded by 3 or 4 but not immediately followed by 8 or 9?
3 5 9 5 4 5 5 3 5 8 4 5 6 7 3 5 7 5 5 4 5 2 3 5 1 0
How many such 5's are there in the following number sequence, each of which is immediately preceded by 3 or 4 but not immediately followed by 8 or 9?
3 5 9 5 4 5 5 3 5 8 4 5 6 7 3 5 7 5 5 4 5 2 3 5 1 0
Solution
The sequence given is:
The criteria for counting a :
- Must be immediately preceded by or
- Must NOT be immediately followed by or
Let's number each position and examine every in the sequence:
Position to :
Position :
Preceded by ✓, but followed by ✗
Does not count
Position :
Preceded by ✗
Does not count
Position :
Preceded by ✓, followed by ✓
Counts ✓
Position :
Preceded by ✗
Does not count
Position :
Preceded by ✓, but followed by ✗
Does not count
Position :
Preceded by ✓, followed by ✓
Counts ✓
Position :
Preceded by ✓, followed by ✓
Counts ✓
Position :
Preceded by ✗
Does not count
Position :
Preceded by ✗
Does not count
Position :
Preceded by ✓, followed by ✓
Counts ✓
Position :
Preceded by ✓, followed by ✓
Counts ✓
The 's that satisfy both conditions are at positions and .
Therefore, there are such 's in the sequence.
Related questions:
2023: 19 June Shift 1
2026: 21 May Shift 2
2025: 24 May Shift 2
2022: 23 Aug Shift 1
2026: 29 May Shift 1
2023: 15 June Shift 2