Slashdot Mirror


Fun with Prime Numbers

Steve Litt writes "Fun With Prime Numbers contains a series of prime number finding algorithms starting with the most brute force imaginable, and working up to a paged algorithm capable of finding the first 1,716,050,469 primes in an hour and a half on a commodity machine. There are faster algorithms on the net, but these algorithms are within the reach of mere mortals and are fully explained."

20 of 472 comments (clear)

  1. pist frost by Anonymous Coward · · Score: -1, Offtopic

    yEAH

    1. Re:pist frost by repruhsent · · Score: -1, Offtopic

      OMG I need to poop!

  2. RAH! by Anonymous Coward · · Score: -1, Offtopic

    #DD

    -rel

  3. Nice disclaimer by cmcguffin · · Score: 0, Offtopic

    > User assumes all risk and responsibility for any outcome.

    I sure hope that doesn't include responsibility for brining his web server to its knees. I feel so guilty!

  4. i've just always wanted to say by Anonymous Coward · · Score: -1, Offtopic

    1st post!11

  5. Prime Post!!! by b374 · · Score: -1, Offtopic

    'nuff said!

  6. First (Prime) Post by Anonymous Coward · · Score: -1, Offtopic

    Yeah! Number One!

  7. Frubles by Anonymous Coward · · Score: -1, Offtopic

    ostridge

  8. Fun With... by FunWithHeadlines · · Score: 0, Offtopic
    "Fun With Prime Numbers"?! Hey! That infringes upon Fun With Headlines my intellectual property! I'll sue!

    Naaaah. I'll let them get away with it by leaving this blatant advertising instead.

    (Hint to the clue-challenged: I'm joking. I am not in favor of IP as a concept, which is why I give my feeble jokes away for free, which is about twice what they're worth)

  9. Not slashdotted when I went there... by cmpalmer · · Score: 0, Offtopic

    Either he's got a good server, or no one cared enough to look.

    That's the ultimate insult -- making the front page of Slashdot, then *not* getting Slashdotted as a result...

    --
    -- stream of did I lock the front door consciousness
  10. Imagine... by NiTr|c · · Score: 0, Offtopic

    The author was definately imagining a beowulf cluster of prime number solvers.

    --
    Try actually thinking for yourself. It's quite refreshing.
  11. PGP: A Dangerous Program for a Dangerous Time by Anonymous Coward · · Score: -1, Offtopic

    Hello,

    Recently I noticed that my teenage son Ezekiel had begun to encrypt
    his emails with a program called PGP. I was concerned because I'd
    always covertly monitored their email for any hints of illegal
    activity, drug use or interest in the occult - some of his classmates
    have begun playing Dungeons and Dragons and listening to KISS. Since
    Ezekiel was now using PGP, his activites were hidden from me!

    Additionally, I also overheard him talking of using a program called
    Stegasaurus to embed secret information into normal-looking pictures.
    Terrified that my son might be speaking in some sort of sinful code, I
    immediately grounded him for a month. He was only allowed to go to
    school and Bible study.

    Anyways, I've done several days worth of research on this and
    discovered a few things about PGP that I'd like to share with the
    readers of these newsgroups. To begin with, I realized that many of
    the claims made by the creators of PGP are blatently false. Although I
    do not have a background in mathematics (I have an AA in Photography)
    I was easily able to rebuild Ezekiel's private key via his public key
    and one of his encrypted messages.

    Of course I am above-average in intelligence, but PGP is supposedly
    unbreakable! Perhaps crytogrophers aren't as smart as they believe?
    Fortunately in this case Ezekiel was just discussing a girl he met in
    school - a situation I harshly reprimanded him for. However, while PGP
    may be a program with flaws, it got me thinking about other programs.
    Perhaps someone will construct a PGP-like program that cannot be so
    easily broken; one that would take days of computer time to hack!

    My concern with a program like this is that people who use
    cryptography always do so because they have something to hide. A sense
    of guilt and shame seems to drive them. They know that they are doing
    something wrong and desperately want to hide it from the eyes of the
    world (although hiding it from the eyes of God is another matter!
    LOL!)

    A study recently released by the Institute for Family Computing
    revealed that the top three uses of cryptography were for 1)
    "terrorist-related activity" 2) pedophillia and 3) drug abuse. In fact
    as far as I can tell, no legitimate use was on the top ten at all!

    What scares me about this is that law-enforcement agencies will be
    unable to sift through email to find people who are breaking the law,
    or otherwise engaged in suspicious activity. At a time when our nation
    is under siege, I find it disturbing that people are working on
    developing cryptography that cannot be broken, even by our protectors
    in the FBI and CIA! Only those with something to hide truly need
    cryptography.

    Thus I urge cryptogrophers world wide to refrain from working on such
    programs, until our nation is no longer at war. I would ask those of
    other countries to respect our right to self-defense and aid us in our
    time of trouble. Your cryptographic skills can be better put to use
    trying to find terrorists than to assist them.

  12. fp by Anonymous Coward · · Score: -1, Offtopic

    first post x 11 x 17

  13. First post by Anonymous Coward · · Score: -1, Offtopic

    Judge judy is on tv.

  14. prime numbers by Anonymous Coward · · Score: -1, Offtopic

    not composite

  15. Mhm. by Anonymous Coward · · Score: -1, Offtopic

    Time to put down Halo 2. Prime Numbers, here I come!

  16. Prime posts by Anonymous Coward · · Score: -1, Offtopic

    I prefer Prime posts to First posts.

  17. First post! by Anonymous Coward · · Score: -1, Offtopic

    First post!

  18. Re:a test by dtfinch · · Score: 0, Offtopic

    Sorry, you admitted in public that you use a celeron instead of the required AMD processor.

    I'll go ahead and say more than I need to here, in part because I have nothing better to do, or maybe because of my ADD, since the former is a lie.

    Yes, I'm cheap. Low income. Student budget. No scholarships.

    It's actually a Dell Dimension 2400n. Shipped with no operating system, it was the cheapest they had. I chose to get 512mb ram, an 80gb hd, a 17" monitor (also the cheapest they had), and a dvd drive. No CD burner, but I already have one elsewhere.

    The graphics chipset is an integrated Intel i845GV. I'm sure the GV stands for Great Value, because as expected, it's not only about 1/20th as fast as the middle end 3D cards, it's about 1/3th as fast as its low end integrated competitors. Add to that the Linux driver's buggy, encouraging me to use software rendering. I managed to speed up mesa to make some games quite playable at a severe cost to quality, like bzflag, but I think I forgot to back it up when I last wiped the hard disk.

    My cheap system is currently running Ubuntu 4.10. After editing /etc/apt/sources.list to add some extra repositories, I find it very palatable. Other distributions I've installed on it include Slackware 10, Mandrake 9, Suse 9, Fedora Core 2, and CentOS 3.

    My older system is an eMachine eTower 500ix. It has a 500mhz celeron, 256mb ram, and an 80gb hd. And it has a 64mb ATI Radeon 7500 and a 52x cd burner, both of which I'll probably move to my newer piece of crap one of these days, if I don't just buy a better system. On it I have Windows XP Professional and Visual Studio.NET, both of which were given to me for free for being a student. But not surprisingly, VS.NET started having problems at about the same time the next version came out, so now if I program with .NET I use SharpDevelop. I keep both systems side by side on my desktop, though most days I don't even turn the Windows PC on.

    I buy my games about 3-4 years after they hit the market, when they find their way into the $10 or less racks. I got Quake II for $1.42 on sale at Office Depot and Quake III for $9.95 at WalMart, not that I've played either in the past few months.

    But I'm not entirely cheap. I probably spend around 5-10% of my income on open source related donations. Among that, $60 to GrokLaw to fight SCO fud. And probably 95% of my music collection is stuff I've bought, mostly Weird Al. Also Tom Lehrer, the Beatles, and Ozzy. Some of it as a result of sampling on Kazaa and deciding to buy the CD.

  19. 2 + 2 does = 5 by judowillreturns · · Score: 0, Offtopic

    Let x = y
    Multiply both sides by x:
    x^2 = xy
    Subtract y^2:
    x^2 - y^2 = xy - y^2
    Now we can factorise. The left side is done using the difference of two squares method, the right is a simple factorisation.
    (x + y)(x - y) = y(x - y)
    Now we can cancel out (x - y) i.e. divide both sides by this:
    x + y = y

    So if x = y, then x + y = 2y
    Therefore:
    2y = y

    Give y an arbitary value, e.g. 1:
    2 = 1

    We can also set y to the power of 0 on both sides, also giving us
    2 = 1

    IANAM (I am not a mathematician, nor a great speller).

    *Sanity note: Yes, there IS a flaw with this, how long will it take /. to figure out high school maths?