WLJS LogoWLJS Notebook

FrobeniusSolve

FrobeniusSolve[{a1, ..., an}, b] gives a list of all solutions of the Frobenius equation a1x1 + ... + anxn = b.

  • FrobeniusSolve[{a1, ..., an}, b, m] gives at most m solutions.

Examples

Find all ways to make 10 using 3 and 5:

FrobeniusSolve[{3, 5}, 10]

Find at most 3 solutions:

FrobeniusSolve[{2, 3, 5}, 15, 3]

Please visit the official Wolfram Language Reference for more details.

On this page