Appendix
A-2: Arithmetic Calculations
Example A-2.3
Determine if 29−1 is a composite number or a prime. If it is composite, find its integer factors.
Solution
Interactive Solution
Context Panel: Test Primality
29−1→check for primefalse
Context Panel: Integer Factors
29−1= factor ⁡7⁢⁡73
Coded Solution
Test primality with the isprime command.
isprime29−1
Obtain integer factors with the ifactor command.
ifactor29−1
Note: After typing each command, press Enter to evaluate it. To save space in this ebook, we will frequently not show the output in the Coded Solution when it is the same as that in the Interactive Solution.
<< Previous Example Section A-2 Next Example >>
© Maplesoft, a division of Waterloo Maple Inc., 2024. All rights reserved. This product is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation.
For more information on Maplesoft products and services, visit www.maplesoft.com
Download Help Document