code: def mobius(n):
      """
      Mobius function maps natural number to {-1, 0, 1}
  
      .. deprecated:: 1.13
  
          The ``mobius`` function is deprecated. Use :class:`sympy.functions.combinatorial.numbers.mobius`
          instead. See its documentation for more information. See
          :ref:`deprecated-ntheory-symbolic-functions` for details.
  
      It is defined as follows:
          1) `1` if `n = 1`.
          2) `0` if `n` has a squared prime factor.
          3) `(-1)^k` if `n` is a square-free positive integer with `k`
             number of prime factors.
  
      It is an important multiplicative function in number theory
      and combinatorics.  It has applications in mathematical series,
      algebraic number theory and also physics (Fermion operator has very
      concrete realization with Mobius Function model).
  
      Parameters
      ==========
  
      n : positive integer
  
      Examples
      ========
  
      >>> from sympy.ntheory import mobius
      >>> mobius(13*7)
      1
      >>> mobius(1)
      1
      >>> mobius(13*7*5)
      -1
      >>> mobius(13**2)
      0
  
      References
      ==========
  
      .. [1] https://en.wikipedia.org/wiki/M%C3%B6bius_function
      .. [2] Thomas Koshy "Elementary Number Theory with Applications"
  
      """
      from sympy.functions.combinatorial.numbers import (
          mobius as _mobius,
      )
  
      return _mobius(n)
  
imports: from __future__ import annotations
  from sympy.external.gmpy import gcd, lcm, invert, sqrt, legendre, jacobi, kronecker, bit_scan1, remove
  from sympy.polys import Poly
  from sympy.polys.domains import ZZ
  from sympy.polys.galoistools import gf_crt1, gf_crt2, linear_congruence, gf_csolve
  from .primetest import isprime
  from .factor_ import factorint, _perfect_power
  from .modular import crt
  from sympy.utilities.decorator import deprecated
  from sympy.utilities.memoization import recurrence_memo
  from sympy.utilities.misc import as_int
  from sympy.utilities.iterables import iproduct
  from sympy.core.random import _randint, randint
  from itertools import product
label_desc: Use image node_id 22 for calling a global function with example usage: mobius(n) and returns: _mobius