Live data from Hacker News

Is This Prime?

isthisprime.com

41–50 of 139 posts

Re: Is This Prime?

#42

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 stri…

[deleted]

Re: Is This Prime?

#44
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?

Re: Is This Prime?

#45

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?

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.

Re: Is This Prime?

#47

Here is a "theorem" I learned: every number up to 100 which looks prime, is prime, except 91. Does anyone recall its name?

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.

Re: Is This Prime?

#49

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?

No, at the cryptographic scale of prime numbers the lookup table would need to be far too big in terms of both time to generate and storage required.

For smaller numbers see various prime sieves (Atkin, Eratosthenes)

Re: Is This Prime?

#50

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?

How is that useful?

It is very useful in the context of Chinese grade school. There are a lot of exam problems that require factorization, and calculators are banned. Having a list of primes memorized comes really handy.
Post reply on HN