| 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.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.