Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
awwaiid
2y ago
0 comments
Save
Share
Two when you include -2, which I certainly think we should in this circumstance.
0 comments
4 comments · 2 top-level
top
newest
oldest
chaboud
2y ago
· 2 in thread
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