code: def is_nilpotent_number(n) -> bool:
      """
      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 [1]_.
  
      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
      ==========
  
      .. [1] Pakianathan, J., Shankar, K., Nilpotent Numbers,
             The American Mathematical Monthly, 107(7), 631-634.
      .. [2] https://oeis.org/A056867
  
      """
      n = as_int(n)
      if n <= 0:
          raise ValueError("n must be a positive integer, not %i" % n)
      return _is_nilpotent_number(factorint(n))
  
file_path: sympy/sympy/combinatorics/group_numbers.py
imports: from itertools import chain, combinations
  from sympy.external.gmpy import gcd
  from sympy.ntheory.factor_ import factorint
  from sympy.utilities.misc import as_int
label_desc: Use image node_id 2 for calling a global function with example usage: is_nilpotent_number(n) and returns: _is_nilpotent_number