Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
0 points
awwaiid
2y ago
0 comments
Share
Two when you include -2, which I certainly think we should in this circumstance.
undefined | Better HN
0 comments
default
newest
oldest
chaboud
2y ago
Are we including it just to poke the bear? Prime numbers are typically defined as numbers with no positive divisors other than one and the number in question.
TeMPOraL
2y ago
A definition which marks 1 as being prime :).
tuukkah
2y ago
This thread started with AI code whose correctness of is_prime no-one has questioned so far :-D
-1 True 0 True 1 True 2 True 3 True 4 False
1 more reply
squeaky-clean
2y ago
Negatives are not prime.
j
/
k
navigate · click thread line to collapse