Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. When (or not) did you learn about the Sieve of Eratosthenes

When (or not) did you learn about the Sieve of Eratosthenes

Scheduled Pinned Locked Moved The Lounge
javascriptpythoncomalgorithmsquestion
23 Posts 18 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Marc Clifton
    wrote on last edited by
    #1

    Was it in a computer class in high school or college? Did you implement an algorithm? [Sieve of Eratosthenes - Wikipedia](https://en.wikipedia.org/wiki/Sieve\_of\_Eratosthenes) I actually first learned about it from my father when I was 10 or so, and worked it out on paper, haha, for the first 100 or so.

    Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

    OriginalGriffO P G R P 16 Replies Last reply
    0
    • M Marc Clifton

      Was it in a computer class in high school or college? Did you implement an algorithm? [Sieve of Eratosthenes - Wikipedia](https://en.wikipedia.org/wiki/Sieve\_of\_Eratosthenes) I actually first learned about it from my father when I was 10 or so, and worked it out on paper, haha, for the first 100 or so.

      Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      School I think, certainly well before I met my first computer, or even programmable calculator!

      Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      D 1 Reply Last reply
      0
      • M Marc Clifton

        Was it in a computer class in high school or college? Did you implement an algorithm? [Sieve of Eratosthenes - Wikipedia](https://en.wikipedia.org/wiki/Sieve\_of\_Eratosthenes) I actually first learned about it from my father when I was 10 or so, and worked it out on paper, haha, for the first 100 or so.

        Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #3

        I learned about the Sieve of Eratosthenes shortly after I was asked to drain the Pasta of Eratosthenes.

        This space for rent

        1 Reply Last reply
        0
        • M Marc Clifton

          Was it in a computer class in high school or college? Did you implement an algorithm? [Sieve of Eratosthenes - Wikipedia](https://en.wikipedia.org/wiki/Sieve\_of\_Eratosthenes) I actually first learned about it from my father when I was 10 or so, and worked it out on paper, haha, for the first 100 or so.

          Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

          G Offline
          G Offline
          Gary Wheeler
          wrote on last edited by
          #4

          I never saw it in high school or college. Of course, that was back before Eratosthenes was even born. We did computing on punch cards made from antelope skin where we punched the holes using an awl made from the jawbone of a yak. You don't even want to know what it was like when the reader jammed...

          Software Zen: delete this;

          D 1 Reply Last reply
          0
          • M Marc Clifton

            Was it in a computer class in high school or college? Did you implement an algorithm? [Sieve of Eratosthenes - Wikipedia](https://en.wikipedia.org/wiki/Sieve\_of\_Eratosthenes) I actually first learned about it from my father when I was 10 or so, and worked it out on paper, haha, for the first 100 or so.

            Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

            R Offline
            R Offline
            raddevus
            wrote on last edited by
            #5

            Found it on my own reading as I learned about the necessity of prime number use in public/private key cryptography.

            1 Reply Last reply
            0
            • M Marc Clifton

              Was it in a computer class in high school or college? Did you implement an algorithm? [Sieve of Eratosthenes - Wikipedia](https://en.wikipedia.org/wiki/Sieve\_of\_Eratosthenes) I actually first learned about it from my father when I was 10 or so, and worked it out on paper, haha, for the first 100 or so.

              Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

              P Offline
              P Offline
              peterkmx
              wrote on last edited by
              #6

              In my case it was a book - Algorithms in C++ (Bryan Flamig) ... around 1995 ... :)

              1 Reply Last reply
              0
              • M Marc Clifton

                Was it in a computer class in high school or college? Did you implement an algorithm? [Sieve of Eratosthenes - Wikipedia](https://en.wikipedia.org/wiki/Sieve\_of\_Eratosthenes) I actually first learned about it from my father when I was 10 or so, and worked it out on paper, haha, for the first 100 or so.

                Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                M Offline
                M Offline
                Maximilien
                wrote on last edited by
                #7

                I just had to google it. That means something, no ?

                I'd rather be phishing!

                D 1 Reply Last reply
                0
                • M Marc Clifton

                  Was it in a computer class in high school or college? Did you implement an algorithm? [Sieve of Eratosthenes - Wikipedia](https://en.wikipedia.org/wiki/Sieve\_of\_Eratosthenes) I actually first learned about it from my father when I was 10 or so, and worked it out on paper, haha, for the first 100 or so.

                  Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                  P Offline
                  P Offline
                  PIEBALDconsult
                  wrote on last edited by
                  #8

                  Yes. And how many learned the process (if not the name) from Stephen King? For me, it was due to a Pascal class (circa 1985?), but I had to go to the library to find a book that understood it better than the teacher.

                  1 Reply Last reply
                  0
                  • G Gary Wheeler

                    I never saw it in high school or college. Of course, that was back before Eratosthenes was even born. We did computing on punch cards made from antelope skin where we punched the holes using an awl made from the jawbone of a yak. You don't even want to know what it was like when the reader jammed...

                    Software Zen: delete this;

                    D Offline
                    D Offline
                    Daniel Pfeffer
                    wrote on last edited by
                    #9

                    Gary Wheeler wrote:

                    You don't even want to know what it was like when the reader jammed...

                    Where did you get the jam? Surely this was BS (Before Supermarkets)

                    Ad astra - both ways!

                    G 1 Reply Last reply
                    0
                    • M Maximilien

                      I just had to google it. That means something, no ?

                      I'd rather be phishing!

                      D Offline
                      D Offline
                      Daniel Pfeffer
                      wrote on last edited by
                      #10

                      It means that your knowledge of the Classics could be better...

                      Ad astra - both ways!

                      1 Reply Last reply
                      0
                      • OriginalGriffO OriginalGriff

                        School I think, certainly well before I met my first computer, or even programmable calculator!

                        Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                        D Offline
                        D Offline
                        Daniel Pfeffer
                        wrote on last edited by
                        #11

                        Ditto. IIRC, this was not long after we learnt division.

                        Ad astra - both ways!

                        1 Reply Last reply
                        0
                        • M Marc Clifton

                          Was it in a computer class in high school or college? Did you implement an algorithm? [Sieve of Eratosthenes - Wikipedia](https://en.wikipedia.org/wiki/Sieve\_of\_Eratosthenes) I actually first learned about it from my father when I was 10 or so, and worked it out on paper, haha, for the first 100 or so.

                          Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                          L Offline
                          L Offline
                          Lost User
                          wrote on last edited by
                          #12

                          Hmmm, I don't know but for many years from around ~1997-2004 I had about a dozen workstations running the distributed GIMPS client[^]. Best Wishes, -David Delaune

                          1 Reply Last reply
                          0
                          • M Marc Clifton

                            Was it in a computer class in high school or college? Did you implement an algorithm? [Sieve of Eratosthenes - Wikipedia](https://en.wikipedia.org/wiki/Sieve\_of\_Eratosthenes) I actually first learned about it from my father when I was 10 or so, and worked it out on paper, haha, for the first 100 or so.

                            Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                            Kornfeld Eliyahu PeterK Offline
                            Kornfeld Eliyahu PeterK Offline
                            Kornfeld Eliyahu Peter
                            wrote on last edited by
                            #13

                            Ages ago in school. I remember it was among the first algorithm we implemented when the new Commodore Plus/4 computers arrived at school... After the VIC 20 it was a huge improvement, so we did a lot of graphical presentations of anything in math and physics... But then I got my personal C64...

                            "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018

                            "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

                            1 Reply Last reply
                            0
                            • M Marc Clifton

                              Was it in a computer class in high school or college? Did you implement an algorithm? [Sieve of Eratosthenes - Wikipedia](https://en.wikipedia.org/wiki/Sieve\_of\_Eratosthenes) I actually first learned about it from my father when I was 10 or so, and worked it out on paper, haha, for the first 100 or so.

                              Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                              C Offline
                              C Offline
                              CPallini
                              wrote on last edited by
                              #14

                              Eratosthenes told me when I was a little child. However I didn't pay attention to him, playing with marbles was far more fun.

                              P 1 Reply Last reply
                              0
                              • C CPallini

                                Eratosthenes told me when I was a little child. However I didn't pay attention to him, playing with marbles was far more fun.

                                P Offline
                                P Offline
                                PIEBALDconsult
                                wrote on last edited by
                                #15

                                And now you've lost your marbles as well?

                                C 1 Reply Last reply
                                0
                                • P PIEBALDconsult

                                  And now you've lost your marbles as well?

                                  C Offline
                                  C Offline
                                  CPallini
                                  wrote on last edited by
                                  #16

                                  I miss them.

                                  1 Reply Last reply
                                  0
                                  • M Marc Clifton

                                    Was it in a computer class in high school or college? Did you implement an algorithm? [Sieve of Eratosthenes - Wikipedia](https://en.wikipedia.org/wiki/Sieve\_of\_Eratosthenes) I actually first learned about it from my father when I was 10 or so, and worked it out on paper, haha, for the first 100 or so.

                                    Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                                    D Offline
                                    D Offline
                                    dan sh
                                    wrote on last edited by
                                    #17

                                    About 4 of years back while solving Project Euler problems. I ended up writing this: public class NthPrimeNumber { public string GetNumber() { long number = 0; // All prime numbers are denoted by 6n+1 or 6n-1 format. So, assumming for // 10001st number, n is 100000 (in fact it will be lesser than this) bool[] isComposite = new bool[1000002]; // Since this method will find more than 10001 prime numbers, track how many have been // found already and once we have 10001 as the count, stop int primeNumberCount = 0; int upperBoundRoot = (int)Math.Sqrt(1000001); for (int i = 2; i <= upperBoundRoot; i++) { if (!isComposite[i]) { primeNumberCount++; if (primeNumberCount == 10001) { number = i; break; } for (int k = i * i; k <= 1000001; k += i) isComposite[k] = true; } } // if the count is not 10001 yet, there are more numbers to find for (int i = upperBoundRoot; i < 1000001; i++) { if (!isComposite[i]) { primeNumberCount++; if (primeNumberCount == 10001) { number = i; break; } } } return number.ToString(); } }

                                    "It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[^]

                                    1 Reply Last reply
                                    0
                                    • M Marc Clifton

                                      Was it in a computer class in high school or college? Did you implement an algorithm? [Sieve of Eratosthenes - Wikipedia](https://en.wikipedia.org/wiki/Sieve\_of\_Eratosthenes) I actually first learned about it from my father when I was 10 or so, and worked it out on paper, haha, for the first 100 or so.

                                      Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                                      A Offline
                                      A Offline
                                      Alexander DiMauro
                                      wrote on last edited by
                                      #18

                                      Learned it in Math class. I'm way too old to remember when exactly. :sigh:

                                      The world is going to laugh at you anyway, might as well crack the 1st joke! My code has no bugs, it runs exactly as it was written.

                                      1 Reply Last reply
                                      0
                                      • D Daniel Pfeffer

                                        Gary Wheeler wrote:

                                        You don't even want to know what it was like when the reader jammed...

                                        Where did you get the jam? Surely this was BS (Before Supermarkets)

                                        Ad astra - both ways!

                                        G Offline
                                        G Offline
                                        Gary Wheeler
                                        wrote on last edited by
                                        #19

                                        The reader was a wooly mammoth in a perpetually bad mood.

                                        Software Zen: delete this;

                                        1 Reply Last reply
                                        0
                                        • M Marc Clifton

                                          Was it in a computer class in high school or college? Did you implement an algorithm? [Sieve of Eratosthenes - Wikipedia](https://en.wikipedia.org/wiki/Sieve\_of\_Eratosthenes) I actually first learned about it from my father when I was 10 or so, and worked it out on paper, haha, for the first 100 or so.

                                          Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                                          S Offline
                                          S Offline
                                          sandyson
                                          wrote on last edited by
                                          #20

                                          5th grade math class (1964) what's a computer class? I liked it so much that I would do it to 100 on a blank sheet during idle moments. My other numbers game was doubling from 1 to get powers of 2. That would have been a couple of years earlier.

                                          In theory, theory agrees perfectly with practice. In practice, this is virtually never the case. "*the {VOiCE} says: The truth is analog - not digital." - jonathan HICKMAN

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups