Sunday Times Teaser 3282 – Not Necessarily in the Right Order
by Colin Vout
Published Sunday August 17 2025 (link)
For one composition, Skaredahora labelled the 12 notes in a standard octave from O to Z in some order, repeating cyclically. Each chord comprised four notes and had the same interval pattern: this meant the successive intervals between notes, when starting at the lowest note, ascending, and finishing with the addition of a note an octave above the lowest. The intervals all exceeded 1 and never increased. For instance, if the notes in an octave in ascending order were OQSYTVWXRPZU, then a chord of QWXZ would have an interval pattern of 5,1,3,3, which would fail for two reasons (an interval of 1 and an increase from 1 to 3).
His chords (with notes in random order) were QPWR, WVQO, RXQS, VYRO, STUP and UVYW.
Starting from O, what are the notes of the octave in ascending order?
A difficult teaser for me (to get a fast version that covers the full solution space).
Great Work Frits! I also thought it would be quite hard work so I decided to get the solution by brute force in order to understand what was going on before thinking about possible ways of speeding it up.
I am still not sure I really understand it yet as I don’t really like these music based teasers since I am not familiar with musical notation.
A faster version than my original using a simplified version of Frits’ approach
No recursion.
Most efficient so far.
The previous functions “check” were incorrect (fi invalidating (0, 4, 6, 8)).
This fix solves that:
Here is a faster version without check().
Here is a simplification of Brian’s simplification of Frits’ excellent solution, also incorporating Brian’s new note check function