Composite & CompositeEx Parameters

Top  Previous  Next

Composite parameters allow you to easily define just composite numbers in a particular range. This allows you to easily ensure that your numbers will have factors.

 

$c=composite(low,high)

 

Notes:

low and high do NOT need to be composite to use the commands.
The composite parameter will never return a 1.

 

Examples:

 

$c=composite(1,10)                $c will be chosen from the set {4,6,8,9,10}.

 

$c=compositeex(low,high)

 

You can also use the compositeex commands to include negative numbers.

 

$c=compositeex(1,10)                $c will be chosen from the set {-10,-9,-8,-6,-4,4,6,8,10}.