Hacker News new | past | comments | ask | show | jobs | submit login

I'm sure it depends on the definition of prime. I've always been partial to "Any integer with exactly 2 divisors". Short, simple, and it excludes 1 and negative numbers.



> I'm sure it depends on the definition of prime. I've always been partial to "Any integer with exactly 2 divisors". Short, simple, and it excludes 1 and negative numbers.

Depending on your definition of divisor, it excludes everything except 1 and -1, whose two integer divisors are 1 and -1. But then, if you specify that "divisor" means "positive integer divisor", it no longer automatically excludes the negative numbers, since the two positive integer divisors of -2 are 1 and 2. (Incidentally, plenty of algebraists, myself included, are perfectly comfortable with including -2 as a prime.)




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: