My own misinterpretation, I see on reread, though the OP’s scheme strikes me as unnecessarily confusing. Using his approach, where the first digit is the relative rank of the first film in the series (as opposed to be the number of the film I consider the best in the series), I’d rank the first three Star Trek films as:
312 (previously given as 231, indicating I thought TWoK was “first in the quality line”, followed by TSfS and TMP)
…and the first six films:
514263
As for a 231 by the OP’s standard… I propose the first three (official) James Bond films, such that Goldfinger is better than Doctor No is better than From Russia with Love, though I’ll cheerfully admit being open to opinions otherwise.