@Aisha: Thanks! I did think of that originally but even going back now I can’t seem to find a neat way to apply that approach (and even the OEIS doesn’t seem to give one for the sequence I get solving this for smaller cases). Would be interested to know how you went about this! As it happens, with a bit more thought I did end up finding a single (double-summation) formula that could be used to calculate this
on /blog/120