Friday, October 24, 2025
HomeLanguagesPython | sympy.antidivisor_count() method

Python | sympy.antidivisor_count() method

With the help of sympy.antidivisor_count() method, we can find the count of anti-divisors of a given integer.

Syntax: antidivisor_count(n)

Parameter:
n – It denotes an integer.

Returns: Returns the count of anti-divisors of the given integer.

Example #1:




# import antidivisor_count() method from sympy
from sympy.ntheory.factor_ import antidivisor_count
  
n = 24
  
# Use antidivisor_count() method 
antidivisor_count_n = antidivisor_count(n) 
      
print("The number of anti-divisors of {} : {}".format(n, antidivisor_count_n))


Output:

The number of anti-divisors of 24 : 2

Example #2:




# import antidivisor_count() method from sympy
from sympy.ntheory.factor_ import antidivisor_count
  
n = 128
  
# Use antidivisor_count() method 
antidivisor_count_n = antidivisor_count(n) 
      
print("The number of anti-divisors of {} : {}".format(n, antidivisor_count_n))


Output:

The number of anti-divisors of 128 : 6
Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32361 POSTS0 COMMENTS
Milvus
88 POSTS0 COMMENTS
Nango Kala
6728 POSTS0 COMMENTS
Nicole Veronica
11892 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11954 POSTS0 COMMENTS
Shaida Kate Naidoo
6852 POSTS0 COMMENTS
Ted Musemwa
7113 POSTS0 COMMENTS
Thapelo Manthata
6805 POSTS0 COMMENTS
Umr Jansen
6801 POSTS0 COMMENTS