d6j := proc(ia,ib,ie,id,ic,ig) local i1,i2,i3,i4,i5,i6,i7,k1,k2,k3,k4,k5,k6,k7,d1,d2,d3,d4,ss,kmin,kmax; l1 := abs(ib-ie); if ia < l1 then RETURN(0) fi; if ia-ib-ie > 0 then RETURN(0) fi; l1 := abs(ic-ig); if ia < l1 then RETURN(0) fi; if ia-ic-ig > 0 then RETURN(0) fi; l1 := abs(id-ic); if ie < l1 then RETURN(0) fi; if ie-id-ic > 0 then RETURN(0) fi; l1 := abs(id-ig); if ib < l1 then RETURN(0) fi; if ib-id-ig > 0 then RETURN(0) fi; l1 := ia+ib+ie; if (2*l1) mod 2 <> 0 then RETURN(0) fi; l1 := ia+ic+ig; if (2*l1) mod 2 <> 0 then RETURN(0) fi; l1 := ic+id+ie; if (2*l1) mod 2 <> 0 then RETURN(0) fi; l1 := ib+id+ig; if (2*l1) mod 2 <> 0 then RETURN(0) fi; i1 := ia+ib-ie; i2 := ia-ib+ie; i3 := -ia+ib+ie; i4 := ia+ib+ie+1; d1 := sqrt( i1! * i2! * i3! / i4! ); i1 := ia+ic-ig; i2 := ia-ic+ig; i3 := -ia+ic+ig; i4 := ia+ic+ig+1; d2 := sqrt( i1! * i2! * i3! / i4! ); i1 := id+ib-ig; i2 := id-ib+ig; i3 := -id+ib+ig; i4 := id+ib+ig+1; d3 := sqrt( i1! * i2! * i3! / i4! ); i1 := id+ic-ie; i2 := id-ic+ie; i3 := -id+ic+ie; i4 := id+ic+ie+1; d4 := sqrt( i1! * i2! * i3! / i4! ); ss := 0; k1 := ia+ib+ie; k2 := ia+ic+ig; k3 := id+ib+ig; k4 := id+ic+ie; k5 := ia+ib+id+ic; k6 := ib+ie+ic+ig; k7 := ie+ia+ig+id; kmax := min(k5,k6,k7); kmin := max(k1,k2,k3,k4); for k from kmin to kmax do i1 := k-k1; i2 := k-k2; i3 := k-k3; i4 := k-k4; i5 := k5-k; i6 := k6-k; i7 := k7-k; ss := ss + (-1)^k * (k+1)! / ( i1! * i2! * i3! * i4! * i5! * i6! * i7! ); od; d1 := d1 * d1 * d2 * d2 * d3 * d3 * d4 * d4; ss := ss * sqrt(d1); end;