I got curious about this, and since I haven't seen the spoke length calculation presented explicitly anywhere, I thought I'd do it myself. Hopefully someone here finds it useful or interesting!
For a normal build (equal # of spokes on each side), using the following notation:
E = ERD of rim
D = Diameter of flange
X = flange offset
N = Number of spokes
i = Number of crosses
Define:
Theta = 2 * Pi * i / (N / 2) = 4 * Pi * i / N = angle measured at the hub between a line passing through a hub spoke hole and wheel center and the line passing through rim spoke hole and wheel center for the same spoke
... then, aside from a correction of about 0.8mm from spoke stretch (~0.6mm) and extra spoke hole room (~0.2mm), the length of the spoke comes out to be:
Length = 0.5 * sqrt [ X^2 + E^2 + D^2 - 2 * E * D * cos( theta ) ]
[Note this matches with the results of United Bicycle Institute online calculator]
When one laces a triplet wheel with 24 spokes (16 DS, and 8 NDS), the angle theta turns out to be:
Theta_triplet = 2 * Pi * (19/4) / 24 = 4 * Pi * 4.75 / 48... ie the same angle as for a 48 spoke wheel laced with 4.75 crosses, or a 32 spoke wheel laced with 3.17 crosses
If one's calculator forces an integer for the number of crosses, and one made the calculation for a 5x wheel with 48 spokes, it would lead to a length that is slightly too long, because the angle theta would be off by Pi / 48 radians. If one imagines just the key spoke laced, then it'd be like rotating the hub by an extra quarter of the 24 hole spoke separation of the rim. Since the DS spokes are pretty much perpendicular to a radial line through the spoke hole, the effect of this is to change the length by roughly the angle of rotation multiplied by the radius of the hub flange, ie
Approx_length_error = Pi * (D / 2) / 48 = Pi * D / 96 = Pi * D * 0.010416666
... which is the formula Jeremy came up with and Ergott presented. Moral of the story: you can trust Jeremy