Live data from Hacker News

Is This Prime?

isthisprime.com

101–110 of 139 posts

Re: Is This Prime?

#101
post #13

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 Recamán 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/Recamán%27s_sequence

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

>Almost all of our current digital security infrastructure is based on the concept of multiplying large numbers together modulo suitably big prime numbers.

That's not true of elliptic curves.

Re: Is This Prime?

#102
post #98

If I click start, then paste some quick and dirty browser automation in the console: function c(){is_prime(document.getElementById('n').textContent)==="prime"?yes.click():no.click();window.setTimeout(c,1)};c() My old laptop can guess right 16k times and get up to 4172973243025599, but then the http post to do the stats (record.php) bombs with a MySql error "Out of range value for column 'end' at row 1" :)

I guess it wouldn’t be HN if your side project’s database didn’t crash because you didn’t choose the right data type, haha. Looks like it gracefully failed though, could be worse. I’m afraid that the stats page is too easy to DDOS though.

look at the entries lol, looks like it had an injection heyday back when first released

Re: Is This Prime?

#104
post #25

They've included 1 as not a prime. That was a fairly recent decision.

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.

and there will be no prime numbers above 1 if 1 is considered a prime (based on existing definitions) Though if you think about it they can just modify the definition in that case

Re: Is This Prime?

#105
post #65

Earlier quoted context omitted.

I learned all the integers.

What is the highest integer you know?

If I were able to count them out loud, in order? 999 nonillion, 999 octillion, 999 septillion, 999 sextillion, 999 quintillion, 999 quadrillion, 999 trillion, 999 million, 999 thousand, 999.

That is (after consulting a table), 1 decillion - 1.

I clearly come from from a short scale culture. If I switched to the long scale and Chuquet names I could, of course, go to 999 nonilliard, 999 nonnillion, 999 octilliard, etc.

Re: Is This Prime?

#107

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…

I hope the twin prime conjecture holds, since it would be pretty incredible to think that, despite what you said, there are infinitely many twin primes.

Re: Is This Prime?

#108

> 1 is non-prime by definition. This made me sad :(

In practice, it turns out to be more convenient if the definition excludes 1, rather than put a qualifier in every place which uses the term "prime".

For example, it's more convenient to write "every integer greater than 1 is a unique product of prime numbers" than to say "every integer greater than 1 is a unique product of {prime numbers excluding 1}"

(That's the fundamental theorem of arithmetic https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithme... .)

Re: Is This Prime?

#109

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…

Somehow I've memorised 10243 in order to have a "big prime" that most people can't just determine. Note its the lowest 5 digits.

Re: Is This Prime?

#110
post #64

Earlier quoted context omitted.

This is a great "theorem", thank you! It's easy to determine divisibility by 2, 3, 5, and 11. 7² is also easy because it's a square. 7×13=91 is the only composite number under 100 that isn't caught by these rules.

A trick for remembering that 91 is composite is that it's of the form x² - y² (specifically 10² - 3²), so it's (x+y)(x-y) or 13 * 7.

[deleted]
Post reply on HN