Try these references http://scitation.aip.org/content/aip/journal/jmp/16/10/10.1063/1.522426?ver=pdfcov (Exact recursive evaluation of 3j‐ and 6j‐coefficients for quantum‐mechanical coupling of angular momenta, by K. Schulten1 and R.G. Gordon) and http://journals.aps.org/pre/abstract/10.1103/PhysRevE.57.7274 (Simplified recursive algorithm for Wigner 3j and 6j symbols, by J.H. Luscombe and M. Luban) which describe the algorithms you may need.