Comment

Comment by lalaithion

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.

parent lalaithion 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton