Ask Your Question

Idempotent help

asked 2010-12-09 13:56:12 -0500

CENTO gravatar image

updated 2011-04-28 08:59:57 -0500

Kelvin Li gravatar image

Hello my fellow Sage users. I'm trying to come up ith a formula in sage that relates the number of idempotents in Zn with the number of distinct prime factors that n has. Talking about idempotent rings in my class has gotten a few students confused and this formula will help me better explain the concept. Thank you. Any pointers in the right direction would help greatly.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2010-12-12 08:24:09 -0500

Jason Bandlow gravatar image

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.

edit flag offensive delete link more

answered 2010-12-10 15:25:43 -0500

niles gravatar image

I guess the number of idempotents should be basically the same as the number of direct summands -- is that right? If so, then maybe you're looking for the direct-sum decomposition of Z/n. Does the fundamental theorem of finitely generated abelian groups give you enough information?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2010-12-09 13:56:12 -0500

Seen: 192 times

Last updated: Dec 12 '10