Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Here is some code for this:

for n in [2..100]:
    print n,': (',len(n.prime_factors()), sum(a.is_idempotent() for a in Zmod(n)),')'

For a fixed n, len(n.prime_factors()) gives the number of prime factors of n and sum(a.is_idempotent() for a in Zmod(n)) gives the number of idempotents.