If the assumption only applies to the global optimal - choose a scenario where all mate, but if at least one can't mate, choose any scenario possible including leaving aside potential mating pairs, then it may be possible to prolong the number of generations. Sorta like a "don't mate, don't die" syndrome.

Which is why I'm assuming you want to assume that "random" also selects the largest number of matings possible.

In which case, trying to prolong the lives of these creatures and dillute the blood as much as possible I can only find 4 matings possible:

Mating #1: A+1, B+2, C+3

Remaining 12: 1 life - A,B,C,1,2,3, 2 lives - A1,B2,C3,1A,2B,3C.

Mating #2 (trying to produce 2 colored offsprings): A+2, B+3, C+1, A1+2B, B2+3C, C3+1A

Remaining 6*2+6 (forefathers die) = 18:

1 life - A1,B2,C3,1A,2B,3C

2 lives - A2, B3, C1, 2A,3B,1C, 12AB, AB12, 23BC, BC23, 13AC, AC13

Mating #3

A1+23BC, B2 + 13AC, C3+AB12, 1A+BC23, 2B+AC13, 3C+12AB - all produce 6*2 colored offsprings who can't mate.

A2+3B, B3+1C, C1+2A - 6 4-colored ones

Remaining 6*2 + 6 + 6*2 = 30

1 life - A2, B3, C1, 2A, 3B, 1C, 12AB, AB12, 23BC, BC23, 13AC, AC13

2 lives - AB23, BC13, AC12, 23AB, 13BC, 12AC, and a bunch of 123ABC and ABC123s who can't mate.

Mating #4

From 18 viable candidates, only the 2-colored once can mate again before they die.

All have >4 colors, there's no one to mate with for a fifth mating.