with(LinearAlgebra): #spisok[[3],[2],[2]]:=[[6,1],[5,2],[4,3],[4,2,1],[6,1],[5,2],[4,3],[4,2,1]] R[6,1][[2],[2]]:= DiagonalMatrix(): Racah[6,1][[3],[2],[2]]:=Matrix([[-sqrt(((q^4 (-1 + q^6))/((1 + q^4) (-1 + q^10)))), sqrt((-1 + q^14)/((1 + q^4) (-1 + q^10)))], [sqrt((-1 + q^14)/((1 + q^4) (-1 + q^10))), sqrt((q^4 (-1 + q^6))/((1 + q^4) (-1 + q^10)))]]): R[5,2][[2],[2]]:= DiagonalMatrix(): Racah[5,2][[3],[2],[2]]:=Matrix([[q^4/((1 + q^4)*sqrt(1 + q^2 + q^4 + q^6 + q^8)), (q*(1 + q^2 + q^4)*sqrt((1 - q^2 + q^4)/(1 + q^2 + q^4 + q^6 + q^8)))/(1 + q^4), (1 - q^2 + q^4)/sqrt(1 - q^2 + 2*q^4 - q^6 + q^8)], [(q + q^3 + q^7 + q^9)/sqrt(1 + q^2 + 3*q^4 + 3*q^6 + 5*q^8 + 4*q^10 + 5*q^12 + 3*q^14 + 3*q^16 + q^18 + q^20), (1 + q^8)/sqrt(1 + 2*q^2 + 4*q^4 + 5*q^6 + 6*q^8 + 5*q^10 + 4*q^12 + 2*q^14 + q^16), -(q/sqrt(1 + q^2 + q^4))], [sqrt((1 + q^4 + q^6 + q^8 + q^12)/(1 + q^2 + q^4))/(1 + q^4), -((q*sqrt((1 + q^2 + q^4 + q^6 + q^8)/(1 + q^2 + q^4)))/(1 + q^4)), q^2/sqrt((1 + q^4)*(1 + q^2 + q^4))]]): R[4,3][[2],[2]]:= DiagonalMatrix(): Racah[4,3][[3],[2],[2]]:=Matrix([[-(q^2/sqrt(1 + q^2 + 2*q^4 + q^6 + q^8)), sqrt((-1 + q^10)/((1 + q^4)*(-1 + q^6)))], [sqrt((-1 + q^10)/((1 + q^4)*(-1 + q^6))), q^2/sqrt(1 + q^2 + 2*q^4 + q^6 + q^8)]]): R[4,2,1][[2],[2]]:= DiagonalMatrix(<-1, q^(-2)>): Racah[4,2,1][[3],[2],[2]]:=Matrix([[-(q/sqrt(1 + q^2 + q^4)), sqrt((1 + q^4)/(1 + q^2 + q^4))], [sqrt((1 + q^4)/(1 + q^2 + q^4)), q/sqrt(1 + q^2 + q^4)]]): R[6,1][[3],[2]]:= DiagonalMatrix(): Racah[6,1][[2],[3],[2]]:=Matrix([[-((q^3 + q^5)/(1 + q^2 + q^4 + q^6 + q^8)), sqrt(q^4 - q^10 - q^18 + q^24)/(q^2 (-1 + q^10))], [sqrt(q^4 - q^10 - q^18 + q^24)/(q^2 (-1 + q^10)), (q^3 (-1 + q^4))/(-1 + q^10)]]): R[5,2][[3],[2]]:= DiagonalMatrix(): Racah[5,2][[2],[3],[2]]:=Matrix([[q^6/((1 + q^4)*(1 + q^2 + q^4 + q^6 + q^8)), (q^2 + q^4 + q^6 + q^8 + q^10 + q^12)/((1 + q^2 + q^4 + q^6 + q^8)*sqrt(1 + 2*q^4 + 2*q^8 + q^12)), sqrt(1 + q^4 + q^8)/(1 + q^4)], [(q^2 + q^4 + q^6 + q^8 + q^10 + q^12)/((1 + q^2 + q^4 + q^6 + q^8)*sqrt(1 + 2*q^4 + 2*q^8 + q^12)), (1 + 2*q^2 + 2*q^4 + q^6 + 2*q^8 + 2*q^10 + q^12)/(1 + 2*q^2 + 3*q^4 + 3*q^6 + 3*q^8 + 2*q^10 + q^12), -((q^2*(1 + q^2))/sqrt((1 + q^4)*(1 + q^2 + q^4)^2))], [sqrt(1 + q^4 + q^8)/(1 + q^4), -((q^2*(1 + q^2))/sqrt((1 + q^4)*(1 + q^2 + q^4)^2)), q^4/(1 + q^2 + 2*q^4 + q^6 + q^8)]]): R[4,3][[3],[2]]:= DiagonalMatrix(<-q, q^(-2)>): Racah[4,3][[2],[3],[2]]:=Matrix([[(q - q^5)/(-1 + q^6), sqrt(q^4 - q^6 - q^14 + q^16)/(q^2 (-1 + q^6))], [sqrt(q^4 - q^6 - q^14 + q^16)/(q^2 (-1 + q^6)), (q + q^3)/(1 + q^2 + q^4)]]): R[4,2,1][[3],[2]]:= DiagonalMatrix(<-q, q^(-2)>): Racah[4,2,1][[2],[3],[2]]:=Matrix([[q^2/(1+q^2+q^4),-((sqrt(1+q^4)*(-1+q^4))/(-1+q^6))],[-((sqrt(1+q^4)*(-1+q^4))/(-1+q^6)),-(q^2/(1+q^2+q^4))]]):