Stories
Slash Boxes
Comments

SoylentNews is people

posted by Fnord666 on Monday November 05 2018, @02:29PM   Printer-friendly
from the it-means-it's-composite dept.

Submitted via IRC for Bytram

What Is an "Almost Prime" Number?

When I saw a math paper with the phrase "almost prime" in the title, I thought it sounded pretty funny. It reminded me of the joke about how you can't be a little bit pregnant. On further thought, though, it seems like someone whose pregnancy is 6 weeks along and who hasn't yet noticed a missed period is meaningfully less pregnant that someone rounding the bend at 39 weeks who can balance a dinner plate on their belly. Perhaps "almost prime" could make sense too.

A number is prime if its only factors are 1 and itself. By convention, the number 1 is not considered to be prime, so the primes start 2, 3, 5, 7, 11, and so on. Hence, a prime number has one prime factor. A number with two prime factors, like 4 (where the two factors are both 2) or 6 (2×3) is definitely less prime than a prime number, but it kind of seems more prime than 8 or 30, both of which have three prime factors (2×2×2 and 2×3×5, respectively). The notion of almost primes is a way of quantifying how close a number is to being prime.


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 0) by Anonymous Coward on Monday November 05 2018, @11:30PM (1 child)

    by Anonymous Coward on Monday November 05 2018, @11:30PM (#758262)

    "I think a good example of almost prime could be negative prime numbers."

    Negative numbers get messy due to -1; if you allow negative numbers you pretty much have to make -1 prime. (its only factors are 1 and itself right? :) but if you make -1 prime then all the numbers now have infinite factorizations involving -1

    Ring theorists sorted out the generalization of prime numbers to arbitrary commutative rings ages ago.

    Primes are by definition non-zero and non-units (units are elements with multiplicative inverses in the ring). For the ring of integers both -1 and 1 have inverses, therefore they are units, therefore they are not primes. Specifically, for a commutative ring R, a non-zero, non-unit element p ∈ R is prime if, whenever p divides ab for some a, b ∈ R, then p divides a or p divides b.

    A related concept is an irreducible element. A non-zero, non-unit element is irreducible if it cannot be expressed as the product of two non-units. This definition is most similar to the definition of "prime number" that is often taught in grade school. For the integers, there is no difference between these two definitions: in a unique factorization domain (such as the integers) an element is prime if and only if it is irreducible.

    You will note that in either case, were units not specifically excluded they would trivially satisfy both definitions. The only reason to exclude them is convention: because unique factorization is such an important property, it is simpler to exclude units from the definition of prime than to write "non-unit prime" everywhere.

  • (Score: 2) by vux984 on Tuesday November 06 2018, @10:32PM

    by vux984 (5045) on Tuesday November 06 2018, @10:32PM (#758724)

    Agreed. And thanks for the contribution of the ring theoretic angle!

    The only reason to exclude them is convention: because unique factorization is such an important property, it is simpler to exclude units from the definition of prime than to write "non-unit prime" everywhere.

    Heh, pretty much exactly what I said in a different sub-thread :)

    "The main reason 1 isn't considered prime is due to the fact that unique prime factorizations* are really useful. If 1 is allowed to be prime, then each positive number > 1 would not have a unique prime factorization; since you could repeat the 1 factor any number of times.
    And yes, that does come from the fact that 1 is the multiplicative identity; so we exclude 1.
    We could have just defined unique prime factorizations to only include prime numbers greater than 1; but since factorization is the most important application of primes, including 1 in the set, and then excluding it every time you used the set doesn't make a lot of sense.

    https://soylentnews.org/comments.pl?sid=28427&cid=758145 [soylentnews.org]