StringTools
PrimitiveRoot
compute the primitive root of a word
Calling Sequence
Parameters
Description
Examples
PrimitiveRoot( w )
w
-
Maple string
The PrimitiveRoot(w) command computes the primitive root of the word (string) w. The primitive root of w is the string r of minimal length for which there is a positive integer e such that w = Repeat( r, e ). That is, r is the smallest root of which w is a power.
All of the StringTools package commands treat strings as (null-terminated) sequences of -bit (ASCII) characters. Thus, there is no support for multibyte character encodings, such as unicode encodings.
See Also
string
StringTools[IsPeriod]
StringTools[IsPrimitive]
StringTools[Period]
StringTools[Repeat]
Download Help Document