Number of groups

sympy.combinatorics.group_numbers.is_nilpotent_number(n) bool[source]

Check whether \(n\) is a nilpotent number. A number \(n\) is said to be nilpotent if and only if every finite group of order \(n\) is nilpotent. For more information see [R48].

Examples

>>> from sympy.combinatorics.group_numbers import is_nilpotent_number
>>> from sympy import randprime
>>> is_nilpotent_number(21)
False
>>> is_nilpotent_number(randprime(1, 30)**12)
True

References

[R48] (1,2)

Pakianathan, J., Shankar, K., Nilpotent Numbers, The American Mathematical Monthly, 107(7), 631-634.

sympy.combinatorics.group_numbers.is_abelian_number(n) bool[source]

Check whether \(n\) is an abelian number. A number \(n\) is said to be abelian if and only if every finite group of order \(n\) is abelian. For more information see [R50].

Examples

>>> from sympy.combinatorics.group_numbers import is_abelian_number
>>> from sympy import randprime
>>> is_abelian_number(4)
True
>>> is_abelian_number(randprime(1, 2000)**2)
True
>>> is_abelian_number(60)
False

References

[R50] (1,2)

Pakianathan, J., Shankar, K., Nilpotent Numbers, The American Mathematical Monthly, 107(7), 631-634.

sympy.combinatorics.group_numbers.is_cyclic_number(n) bool[source]

Check whether \(n\) is a cyclic number. A number \(n\) is said to be cyclic if and only if every finite group of order \(n\) is cyclic. For more information see [R52].

Examples

>>> from sympy.combinatorics.group_numbers import is_cyclic_number
>>> from sympy import randprime
>>> is_cyclic_number(15)
True
>>> is_cyclic_number(randprime(1, 2000)**2)
False
>>> is_cyclic_number(4)
False

References

[R52] (1,2)

Pakianathan, J., Shankar, K., Nilpotent Numbers, The American Mathematical Monthly, 107(7), 631-634.

sympy.combinatorics.group_numbers.groups_count(n)[source]

Number of groups of order \(n\). In [R54], gnu(n) is given, so we follow this notation here as well.

Parameters:

n : Integer

n is a positive integer

Returns:

int : gnu(n)

Raises:

ValueError

Number of groups of order n is unknown or not implemented. For example, gnu(\(2^{11}\)) is not yet known. On the other hand, gnu(12) is known to be 5, but this has not yet been implemented in this function.

Examples

>>> from sympy.combinatorics.group_numbers import groups_count
>>> groups_count(3) # There is only one cyclic group of order 3
1
>>> # There are two groups of order 10: the cyclic group and the dihedral group
>>> groups_count(10)
2

See also

is_cyclic_number

\(n\) is cyclic iff gnu(n) = 1

References

[R54] (1,2)

John H. Conway, Heiko Dietrich and E.A. O’Brien, Counting groups: gnus, moas and other exotica The Mathematical Intelligencer 30, 6-15 (2008) https://doi.org/10.1007/BF02985731