Apparently you do not see why I regarded your wording as ambiguous: "of the 3 highest VALUES" is NOT the same as " of the top three [DICE] -- in the case (e.g.) where the third highest die has the same value as the fourth highest die.

There are 252 unique COMBINATIONS of the figures from five dice (from 1,1,1,1,1 to 6,6,6,6,6). There are 6**5 PERMUTATIONS. Whether using so-called "analytic" methods or "software" (why is a program NOT "analytic") one still needs an unambiguous problem to be solved -- else the exercise is a waste of further time (anyone who programs learns that early on! -- Before you start, be sure you know what is required -- when in doubt, ask -- as I did.)

I have not the slightest iDea what your "d2" and "d4" are all about, but the latter presumably earns your favor. Ah, well, "life" is not always "fair", even though both have four letters. I'll bet my program could "count them" faster than your "analytics" -- 7776 is not too large.