I have to calculate the following table

  ThreeJSymbol[{j1, 0}, {j2, 0}, {j3, 0}],
  {j1, 1, j1max}, {j2, 1, j2max}, {j3, 1, j3max}

in such a way that $|j_1-j_2| \le j_3 \le j_1+j_2$.

How can I write this command?

  • 2
    $\begingroup$ Table[If[ Abs[j1 - j2] <= j3 <= j1 + j2, {{j1, j2, j3}, ThreeJSymbol[{j1, 0}, {j2, 0}, {j3, 0}]}, ## &[]], {j1, 1, j1max}, {j2, 1, j2max}, {j3, 1, j3max}] - added values where condition holds so you can see what's happening... $\endgroup$
    – ciao
    Commented Sep 8, 2015 at 23:08

1 Answer 1


If I understand your question correctly, you want to have the range of j3 dependent on j1 and j2. That can be easily written directly in the Table command:

Table[ThreeJSymbol[{j1, 0}, {j2, 0}, {j3, 0}], {j1, 1, j1max}, {j2, 1, j2max}, {j3, Abs[j1 - j2], j1 + j2}]

the value for j3max is therefore no longer needed.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.