First time here? Check out the FAQ!

Ask Your Question
1

Idempotent help

asked 14 years ago

CENTO gravatar image

updated 14 years ago

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.

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
1

answered 14 years ago

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.

Preview: (hide)
link
1

answered 14 years ago

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?

Preview: (hide)
link

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: 14 years ago

Seen: 947 times

Last updated: Dec 12 '10