Ask Your Question
1

Idempotent help

asked 2010-12-09 20:56:12 +0100

CENTO gravatar image

updated 2011-04-28 15:59:57 +0100

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
1

answered 2010-12-12 15:24:09 +0100

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
1

answered 2010-12-10 22:25:43 +0100

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

Stats

Asked: 2010-12-09 20:56:12 +0100

Seen: 832 times

Last updated: Dec 12 '10