type/primepower - Maple Help

Home : Support : Online Help : type/primepower

type/primepower

check for a rational prime power

 Calling Sequence type( expr, primepower )

Parameters

 expr - any Maple expression

Description

 • The type( expr, 'primepower' ) command returns true if expr is of type primepower, and false otherwise.
 • An expression is of type primepower if it is a positive integer of the form p^k, for some prime number p and some non-negative integer k.
 • Note that the number $1$ is a prime power, as is each prime number.

Examples

 > $\mathrm{type}\left(0,'\mathrm{primepower}'\right)$
 ${\mathrm{false}}$ (1)
 > $\mathrm{type}\left(1,'\mathrm{primepower}'\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{type}\left(4,'\mathrm{primepower}'\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left(-8,'\mathrm{primepower}'\right)$
 ${\mathrm{false}}$ (4)
 > $\mathrm{type}\left(6,'\mathrm{primepower}'\right)$
 ${\mathrm{false}}$ (5)
 > $\mathrm{type}\left(\frac{2}{3},'\mathrm{primepower}'\right)$
 ${\mathrm{false}}$ (6)
 > $\mathrm{type}\left({30303030303031}^{{10}^{6}},'\mathrm{primepower}'\right)$
 ${\mathrm{true}}$ (7)
 > $\mathrm{type}\left({\left(30303030303031\cdot 30303030303043\right)}^{{10}^{6}},'\mathrm{primepower}'\right)$
 ${\mathrm{false}}$ (8)

Compatibility

 • The type/primepower command was updated in Maple 2020.