Suppose we are given a factor base $\beta$ and we wants to write a Boolean function $f$ such that it tells whether an integer only has factors in $\beta$ or not.
If my factor base is $\beta=\left\{ 2, 3, 5,7 \right\}, f(10)=f(2 \times 5)=\ $yes and $f(22)=f(2 \times 11)= \ $no. How do you write a such function in maple? I'm new to maple and only know basic built-in functions like ifactor.
First, the
ifactorscommand, some list-indexing basics, and conversion of a list to a set.So now we can build a handy, re-usable procedure.