Skip to main content
added 13 characters in body
Source Link
Unrelated String
  • 23k
  • 3
  • 32
  • 55

Jelly, 99 8 bytes

Œp§’÷_ɗ2PŒp§_2İ‘P

Try it online!Try it online!

Based onUses the altered form of the closed form expression given in the question. Takes input as a list [x,y,z].

Œp           Cartesian product of the list.
             (Each element, being an integer, is implicitly converted to a range.)
  §          Sum the items of each triplet,
    _2  ɗ     subtract and2 forfrom each sum (implicitly vectorizing),
    ÷ ɗ      divide
İ     ɗ take the reciprocal of each thelowered sum - 1,
     _ɗ2     by the sumincrement -each 2.reciprocal,
        P    Returnand return the product of allthe quotientsincrements reciprocals.

Jelly, 9 bytes

Œp§’÷_ɗ2P

Try it online!

Based on the closed form expression given in the question. Takes input as a list [x,y,z].

Œp           Cartesian product of the list.
             (Each element, being an integer, is implicitly converted to a range.)
  §          Sum the items of each triplet,
      ɗ      and for each sum (implicitly vectorizing)
    ÷ ɗ      divide
     ɗ      the sum - 1
     _ɗ2     by the sum - 2.
        P    Return the product of all quotients.

Jelly, 9 8 bytes

Œp§_2İ‘P

Try it online!

Uses the altered form of the closed form expression. Takes input as a list [x,y,z].

Œp          Cartesian product of the list.
            (Each element, being an integer, is implicitly converted to a range.)
  §         Sum the items of each triplet,
   _2       subtract 2 from each sum,
     İ      take the reciprocal of each lowered sum,
           increment each reciprocal,
       P    and return the product of the increments reciprocals.
added 403 characters in body
Source Link
Unrelated String
  • 23k
  • 3
  • 32
  • 55

Jelly, 9 bytes

Œp§’÷_ɗ2P

Try it online!

Based on the closed form expression given in the question. Takes input as a list [x,y,z].

Œp           Cartesian product of the list.
             (Each element, being an integer, is implicitly converted to a range.)
  §          Sum the items of each triplet,
      ɗ      and for each sum (implicitly vectorizing)
    ÷ ɗ      divide
   ’  ɗ      the sum - 1
     _ɗ2     by the sum - 2.
        P    Return the product of all quotients.

Jelly, 9 bytes

Œp§’÷_ɗ2P

Try it online!

Based on the closed form expression given in the question.

Jelly, 9 bytes

Œp§’÷_ɗ2P

Try it online!

Based on the closed form expression given in the question. Takes input as a list [x,y,z].

Œp           Cartesian product of the list.
             (Each element, being an integer, is implicitly converted to a range.)
  §          Sum the items of each triplet,
      ɗ      and for each sum (implicitly vectorizing)
    ÷ ɗ      divide
   ’  ɗ      the sum - 1
     _ɗ2     by the sum - 2.
        P    Return the product of all quotients.
Source Link
Unrelated String
  • 23k
  • 3
  • 32
  • 55

Jelly, 9 bytes

Œp§’÷_ɗ2P

Try it online!

Based on the closed form expression given in the question.