The closed form for $n = 3$ where $3! <= p < q < (r > 2p$ and $r > 2q)$ is $g(p,q,r)= (p -2)(q -2)(r -2) -2[(p -1)(q -1) -1 +(p -1)(r -1) -1 +(q -1)(r -1) -1] +3[p +q +r +1] -1.$ It took me about 45 minutes to find it.
For example, the McDonald's nugget problem is $p= 6, q= 9, r= 20, g(6,9,20)= 4*7*18 -2[(5*8 -1 +(5*19 -1) +(8*19 -1)] +3[6 +9 +20 +1] -1 = 504 -2(284) +3(36) -1 = 43.$
Try it for this made up problem... for 6, 8, 27; you should get 37, and it's right! Nobody has seen it since about the year 1880. Nice,... huh?? I made a YouTube video that reiterates it. William Bouris
Somebody is actually down-voting it. LOL
