[sage-support] Re: list(factor(1)) yields []: Is this consequent?

2011-09-14 Thread Volker Braun
As Maarten already said, 1 is not prime. Also, note that the empty product equals one: sage: prod([]) 1 -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this gr

[sage-support] Re: list(factor(1)) yields []: Is this consequent?

2011-09-13 Thread Jason Grout
On 9/13/11 4:24 PM, Rolandb wrote: On 13 sep, 22:53, Maarten Derickx wrote: I think it is consequent. list(factor(n)) just gives a list of tuples (p,e) where p is a prime dividing n and e is it's exponent. Since there are no primes dividing 1 the list is empty. Thanks for the swift reply!

[sage-support] Re: list(factor(1)) yields []: Is this consequent?

2011-09-13 Thread Rolandb
On 13 sep, 22:53, Maarten Derickx wrote: > I think it is consequent. list(factor(n)) just gives a list of tuples (p,e) > where p is a prime dividing n and e is it's exponent. Since there are no > primes dividing 1 the list is empty. Thanks for the swift reply! However, not always one knows tha

[sage-support] Re: list(factor(1)) yields []: Is this consequent?

2011-09-13 Thread Maarten Derickx
I think it is consequent. list(factor(n)) just gives a list of tuples (p,e) where p is a prime dividing n and e is it's exponent. Since there are no primes dividing 1 the list is empty. -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send em

[sage-support] Re: list(factor(1)) yields []: Is this consequent?

2011-09-13 Thread kcrisman
On Sep 13, 4:28 pm, Rolandb wrote: > Hi, > > factor(1) > 1 > list(factor(1)) > [] Well, considered as an integer, this is giving the prime (power) decomposition of 1. And there are no such primes, so the list is empty. I suppose the problem you're encountering is that what is returned isn't a