Background: The following questions arise from the Wigner $3j$ symbol, see here. It is well known that the angular momenta $(j_1,j_2,j_3)$ in the Wigner $3j$ symbol must satisfy the triangle inequality.
Q1: Assume three nonnegative integer numbers $J_1,J_2,J_3\in \mathbb{N}$. I would like to know how to calculate the total number of the triplet $(j_1,j_2,j_3)$ satisfying the triangle inequality, see Eq. (34.2.1) here $$ |j_1-j_2| \leq j_3 \leq j_1+j_2, $$ where $j_i=0,1,...,J_i,i=1,2,3$. The total number is denoted by $N(J_1,J_2,J_3)$.
It is clear that the total number of the triplet $(j_1,j_2,j_3)$ without satisfying the triangle inequality is $$ M(J_1,J_2,J_3) = (J_1+1)(J_2+1)(J_3+1). $$ To make the question clear, here lists the results for some values. It is observed that $N\approx M/2$.
$J_1$ | $J_2$ | $J_3$ | $M$ | $N$ |
---|---|---|---|---|
0 | 0 | 0 | 1 | 1 |
1 | 0 | 0 | 2 | 1 |
1 | 1 | 0 | 4 | 2 |
1 | 1 | 1 | 8 | 5 |
2 | 0 | 0 | 3 | 1 |
2 | 1 | 0 | 6 | 2 |
2 | 1 | 1 | 12 | 6 |
2 | 2 | 1 | 18 | 9 |
2 | 2 | 2 | 27 | 15 |
Q2: Assume the set $A$ contains all the triplets $(j_1,j_2,j_3)$ satisfying the triangle inequality for given numbers $J_1,J_2,J_3$. The total number of elements is $N$ as mentioned above. How to effectively index the element of $A$? It means that we need to find a relation between the index $j = 0, 1, ..., N$ and the triplet $(j_1,j_2,j_3)$ satisfying the triangle inequality.