[HN Gopher] Is This Prime? ___________________________________________________________________ Is This Prime? Author : jordigh Score : 77 points Date : 2021-07-15 18:23 UTC (4 hours ago) (HTM) web link (isthisprime.com) (TXT) w3m dump (isthisprime.com) | koolba wrote: | I was expecting an Amazon product search / review site and was | pleasantly surprised that it is in fact a math game. | Kluny wrote: | I love it, but the game doesn't work for me! No response when I | click Yes or No, or using the keyboard y and n. Just the clock | ticking down. Chrome Version 91.0.4472.114 (Official Build) | (64-bit) on Windows 10 Enterprise. | lalaithion wrote: | This reminds me of my favorite in-person magic trick to do. | | First, memorize all the two-digit primes. 25 numbers isn't that | hard to memorize. | | Then, tell someone "Oh, I can instantly tell whether a number is | prime or not. Give me a number, I'll tell you whether it's | prime." | | If they tell you a number between 1 and 100, use your memorized | list. Otherwise, it's a game of cold reading; if they just | generated a random string of many digits, there's a low chance | that the number actually is prime. "21923847" is a keysmash, and | it's almost certainly not prime, because the frequency of primes | goes down as numbers get bigger. And most people will ask you a | number, hear "no", and then go check the number's primality. | Eventually, they'll look up a number in advance; that number is | almost certainly prime. | the_arun wrote: | After 8 attempts, I ran into "Game Over". Was just thinking | about the satisfaction for the author of this site. There is | just enormous fun in saying - Game Over - to another human :) | [deleted] | float4 wrote: | And then one day, somebody asks you calmly: "what about | 2^31-1"? Better memorise the small Mersenne exponents as well! | | https://oeis.org/A000043 | Igelau wrote: | Why do I feel like I'm solving someone else's CAPTCHA? | __michaelg wrote: | Finally a way to sort out candidates that's even cheaper than | making them implement B-trees. | HeavenFox wrote: | When I was a fifth grader in China, we were required to memorize | all prime numbers below 100. | | Curious if that is common in other countries? | faeyanpiraat wrote: | How is that useful? | healthysurf wrote: | Vast majority of my school experience wasn't useful | Zababa wrote: | I don't think that was a thing in France (at least where I went | to school) but we often used them indirectly to simplify | fractions, so all in all maybe we had to know all primes under | 25 I think? | antman wrote: | I don't think so. Remember any other interesting numbers list | you needed to memorize? | tokamak-teapot wrote: | I learned all the integers. | munchbunny wrote: | It isn't standard in the US, although at some point I memorized | them to prepare for buzzer races in math competitions. It was | in no way reflective of anything useful in real life, but it | was fun. | | There were a few sets of common numbers, formulas, and mental | calculation tricks that were useful to just always have in the | back of your head. Perfect squares and cubes under 1000, powers | of 2 and 3, prime numbers below 100, interior angles of regular | polygons up to 10 sides, binomial coefficients, Pythagorean | triples, factorials up to 9!, common roots out to 3-4 decimal | places, and a few others that I've no longer needed for almost | 20 years at this point. | slmjkdbtl wrote: | Would pay to for more chances | ridiculous_fish wrote: | Here is a "theorem" I learned: every number up to 100 which looks | prime, is prime, except 91. Does anyone recall its name? | tshaddox wrote: | 49 looks prime to me. Another commentator says it doesn't count | because it's a square number, but square numbers don't really | have a particular "look" to me in the same way that 2-digit | numbers ending in 5 or with digits summing to a multiple of 3 | do. | nilstycho wrote: | This is a great "theorem", thank you! | | It's easy to determine divisibility by 2, 3, 5, and 11. 72 is | also easy because it's a square. 7x13=91 is the only composite | number under 100 that isn't caught by these rules. | bbx wrote: | I agree. And I would add 51 to that. | TheDong wrote: | 51's an easy one because 5+1=6, and 6 is divisible by 3, so | it must be divisible by 3. | | It's easy to try 'divisible by 5' (ends in 5 or 0) and | 'divisible by 3' (sum of digits is divisible by 3). 91 isn't | found as prime by those two tests, so it needs the extra | exceptional rule. | [deleted] | jkingsbery wrote: | I think it's called "The Ridiculous Fish Theorem." | | +1... I lost two games in a row, both times on 91. | [deleted] | gerbler wrote: | I really like it. | | I wonder if the text could be dropped once it starts. I found | myself reading it each time which ended up distracting me a | little and sometimes I would rush and tapped the opposite of what | I intended. | davjhan wrote: | I love these simple web games! Great idea. One way to improve it | is to add some more juice when you answer a question. Right now, | the text in the number just swaps to the next question, so any | sort of small visual feedback will help first time players get it | more. | | I also like to make these small web mini games on the side. | Here's one where you guess the year that famous events happened: | https://guess-the-year.davjhan.com/ | exo-pla-net wrote: | Good practice for learning divisibility rules | https://en.m.wikipedia.org/wiki/Divisibility_rule | nonfamous wrote: | I've always wondered: how feasible is it to implement an | "isprime" function, via lookup table? If such methods are used, | is cryptography getting weaker and weaker in practice as more | large primes are discovered? | jkingsbery wrote: | Great game! | | Keyboard short cuts would make it a bit better. | progval wrote: | you can use left and right arrows | mcintyre1994 wrote: | The help text says y and n work, I'm on mobile and haven't | tried though. | hughdbrown wrote: | Y and N for yes and no. | whoomp12342 wrote: | man, these tech screenings are getting out of control | optimalsolver wrote: | Is there a reason we're obsessed with primes beyond aesthetics? | Why does this set of numbers garner all the headlines as opposed | to some other arbitrary integer sequence like the Recaman numbers | [0] ? | | If tomorrow someone discovered a closed-form equation for the nth | prime, how would mathematics/the world change? | | [0] https://en.wikipedia.org/wiki/Recaman%27s_sequence | johnday wrote: | The prime numbers are critical in cryptography. Almost all of | our current digital security infrastructure is based on the | concept of multiplying large numbers together modulo suitably | big prime numbers. | | Any major step towards understanding them (such as a closed- | form equation for primes) would have major mathematical knock- | on effects which may or may not undermine these methods, or | provide us with a basis for even stronger cryptographic | mechanisms to make use of in the future. | Jtsummers wrote: | Your original link 404'd on me (you seem to have replaced it | with a different one though). Here's the working Wikipedia | link: | | https://en.wikipedia.org/wiki/Recaman%27s_sequence | optimalsolver wrote: | Thanks. I've edited the link. | X6S1x6Okd1st wrote: | I'm not sure about a closed-form equation for the nth prime, | but if integer factorization can be done in linear time then | much of applied cryptography needs to be replaced. | kstrauser wrote: | 78. Who did better? | X6S1x6Okd1st wrote: | They've included 1 as not a prime. That was a fairly recent | decision. | drdec wrote: | One is not a prime number. If you allow one to be a prime | number, then you can no longer say that each natural number has | a unique prime factorization. | | This makes the concept of prime numbers much more useful when | one is excluded. | Igelau wrote: | > If you allow one to be a prime number, then you can no | longer say that each natural number has a unique prime | factorization. | | I don't dispute that, by definition, 1 is not prime, but I | don't see how this statement would follow if we considered it | prime. | | Edit: it seems more like it would be that every factorization | would implicitly have 1^n tacked onto it, and while that | isn't exactly useful, it doesn't break the game. | Jtsummers wrote: | It's not a recent decision. It's a (low grade) debate that's | spanned thousands of years now. | copperx wrote: | Who's they? Is this a mathematical consensus? | squeaky-clean wrote: | "they" is the game developers of this game. | sebzim4500 wrote: | I'm not sure why but having 'yes' be on the left is really | messing me up. | bla3 wrote: | You must be a macOS or iOS user. ___________________________________________________________________ (page generated 2021-07-15 23:01 UTC)