I want to generate (multiple) random numbers from a given number class with extra conditions. (for automatic generation of exercises)
- generate "a" out of natural Numbers which are dividible by three
- generate "b" which is a rational number but not natural number
- generate "c" and "d" which are both prime numbers and "d" is at least twice as big as "c"
- generate "f" as a polynomyal function of grade 2
My plan is to write a little script that will be then run multiple times from maxima and maxima outputs new tasks (with their solutions) every time.
my idea (pseudocode)
a := random(natural_numbers) | rest(a / 3) = 0 solution := 1/3 + 2/a
and this would output an "a" that I can use to build the exercise as well as a "solution" that i can check against.