News for hackers. Stuff that matters.
Re:On Primes and Pluto by wbhart on Thursday March 06, 2014 @02:02PM (#7355821)
For the ordinary natural numbers, 1 is the only number which you can invert, i.e. 1/2, 1/3, 1/4, etc. are not integers, but 1/1 is. If we take in all the integers, positive, negative and zero, then 1 and -1 are invertible. But things become much more complicated in other number rings. For example, in the number ring obtained by adjoining the square root of 7 to the integers (i.e. Z[sqrt(7)]), there are infinitely many invertible values. For example 3 sqrt(7)-8 is invertible. Its inverse is -3 sqrt(7)-8. But any power of this value is also invertible, so in fact there are infinitely many invertible values in this ring. Anyway, the problem with units (invertible values) is that they divide any number in the number ring (after all, by definition, they divide 1, and 1 divides everything). They therefore aren't very useful for unique factorisation (aside: unique factorisation exists for elements of Z[sqrt(7)], though not for every conceivable number ring). Because of this, it is natural to exclude units from being primes.
Re:On Primes and Pluto by Avitas on Thursday March 06, 2014 @02:24PM (#7355961)
Interesting with a side note about toying with Excel.

When I plug in:

    1/(3 sqrt(7)-8)

    and

    -3 sqrt(7)-8
...into Excel, there must be a rounding error. They resolve to:

    -15.9372539331939000

    and

    -15.9372539331938000
...respectively.

Time to plug these into Wolfram. I get:

    -15.93725393319377177150484726091778127713077754924735054110500337760320646969085088328117865942363083184519373501549238...

    and

    -15.93725393319377177150484726091778127713077754924735054110500337760320646969085088328117865942363083184519373501549238...
...respectively.
Re:On Primes and Pluto by hdevalence on Thursday March 06, 2014 @03:08PM (#7356236)
If you want to do exact computations, SAGE is handy, Free, and built on Python:

    sage: k.<a> = QuadraticField(7); k
    Number Field in a with defining polynomial x^2 - 7
    sage: x = 3*a - 8
    sage: x.is_integral()
    True
    sage: 1/x
    -3*a - 8
    sage: x * (1/x)
    1
    sage: (1/x).is_integral()
    True
(Note: the is_integral() is because we define k to be QQ(sqrt(7)), not ZZ(sqrt(7)), so we want to check that our elements are really integers, i.e., lie in ZZ(sqrt(7))).
Re:On Primes and Pluto by pygy_ on Thursday March 06, 2014 @03:06PM (#7356226)
Your large numbers are breaking the page layout.

It would be nice if you could prepend them with four spaces, to place them in code blocks (they have overflow:scroll), or break them into multiple lines (or both).

Re:On Primes and Pluto by Someone on Thursday March 06, 2014 @03:48PM (#7356481)
You don't want to do this kind of stuff in Excel. See http://www.cs.berkeley.edu/~wkahan/Mind1ess.pdf. It shows (a.o.) that adding parentheses around an expression can change its value.
Re:On Primes and Pluto by saraid216 on Thursday March 06, 2014 @03:38PM (#7356405)
Is there any reason that the definition of "prime" hasn't been changed to "a natural number only divisible by 1 and itself and is non-invertible"?
Re:On Primes and Pluto by wbhart on Thursday March 06, 2014 @06:32PM (#7357310)
It's kind of murky because in commutative algebra that is actually not the definition of a prime. It just so happens that the prime numbers are precisely the natural numbers with this property. It's fine to define prime numbers that way, but in more general contexts a prime element is actually an element p which cannot divide a product of two elements a.b without dividing one (or both) of them. It just so happens that the non-invertible natural numbers with this property also aren't able to be written as a product p = c.d such that c != 1 and d != 1. In other number rings this isn't necessarily the same thing.
Re:On Primes and Pluto by thaumasiotes on Friday March 07, 2014 @06:11AM (#7359608)
Is something missing here? As I understand it, that general definition works like this:

6 divides 49, but does not divide either 4 or 9. Therefore, 6 is not prime.

But I'm pretty sure 1 cannot divide the product of two integers m, n* while failing to divide m and n individually. So while that general definition does exclude composite numbers, it doesn't seem to exclude 1?

Re:On Primes and Pluto by pavelrub on Friday March 07, 2014 @08:35AM (#7360054)
The correct "general" definition also requires the prime element to be non-invertible and non-zero, thus 1 is excluded.

It should be noted that this definition excludes "composite numbers" only when the ring is an integral domain. In a general commutative ring this isn't necessarily true.

Re:On Primes and Pluto by pavelrub on Friday March 07, 2014 @08:40AM (#7360081)
For this and the "general" definition to coincide, the ring in question has to be a unique factorization domain, which the integers are an example of. In any bigger subset of rings (integral domains or general commutative rings), there are rings for which this doesn't hold.
Re:On Primes and Pluto by simcop2387 on Thursday March 06, 2014 @02:35PM (#7356036)
Is sqrt[7] special in this regard or does it work for any irrational number?
Re:On Primes and Pluto by lmkg on Thursday March 06, 2014 @02:51PM (#7356132)
The rational roots of integers will cause interesting interactions, because when you multiply them you get back integers. In other words, the fact that sqrt(7) * sqrt(7) is an integer means that sqrt(7) interacts with the integers when you adjoin it. This is not the case for a transcendental number like pi.

More formally: This type of interaction is true for an irrational number if (and only if?) it is the root of a polynomial with integer coefficients. If you adjoin the root of a polynomial P(n) to the integers, the properties of the resulting set of numbers (e.g. factorization being unique) can be related back to properties of P(n). The nature of the connection has to do with the connection between a set of numbers and the set of polynomials of with coefficients from that set, and equivalence relations on that set of polynomials that are induced by P(n).

Re:On Primes and Pluto by simcop2387 on Thursday March 06, 2014 @03:07PM (#7356229)
I see that makes perfect sense. In this particular case because you end up doing multiplying by the compliment of the denominator to get rid of the root there, get a difference of squares that are both integers and easily end up with an integer on the denomiator of the fraction. leaving it all as trivially provable that you'll always end up with a rational number in the end (maybe not an integer).
Re:On Primes and Pluto by wbhart on Thursday March 06, 2014 @06:19PM (#7357234)
It is and it isn't. For example, you can adjoin sqrt(-1). This time there are finitely many units, but still unique factorisation. Instead adjoin sqrt(-17) and you get finitely many units but you also do not get unique factorisation.