Re:Show HN: Tiny logic and number games I built for my kids
by getnormality on Monday August 04, 2025 @12:09PM
(#44787809)
Prime Hunter sometimes generates sets with no prime numbers.
[ Parent
| on HN ]
Re:Show HN: Tiny logic and number games I built for my kids
by kevinventullo on Monday August 04, 2025 @12:52PM
(#44788415)
Also, tiny nit but the text at the end says the largest known prime number has over 24 million digits. While technically true, the current largest prime number in fact has over 41 million digits!
(Also, I love this. I hope you’re still hosting it once I have kids)
Re:Show HN: Tiny logic and number games I built for my kids
by jldugger on Monday August 04, 2025 @01:20PM
(#44788813)
> the current largest prime number in fact has over 41 million digits!
Because there's an infinite number of primes?
Re:Show HN: Tiny logic and number games I built for my kids
by kevinventullo on Monday August 04, 2025 @01:36PM
(#44789022)
*largest known :)
Re:Show HN: Tiny logic and number games I built for my kids
by gjm11 on Monday August 04, 2025 @02:03PM
(#44789385)
In the few games I tried, it always ended up that way. You start with a few prime numbers (if you're lucky). Each time you click on one, it gets replaced with another number that usually isn't prime. After a short while, there are no primes left and then there's nothing to do but sit and wait for the game to end.
Perhaps all the numbers should have a finite lifetime, after which they evaporate and a random new one replaces them.
Re:Show HN: Tiny logic and number games I built for my kids
by kevinventullo on Monday August 04, 2025 @02:49PM
(#44789916)
Or maybe right click to identify a number as composite.
Re:Show HN: Tiny logic and number games I built for my kids
by ethan_smith on Monday August 04, 2025 @08:27PM
(#44792975)
I can confirm this bug - your random number generation algorithm should ensure at least one prime appears in each set, perhaps by maintaining a pre-computed list of primes within your range and guaranteeing inclusion of at least one.
Re:Show HN: Tiny logic and number games I built for my kids
by min2bro on Wednesday August 06, 2025 @01:59AM
(#44808217)
Sure, I will take care of it. Thanks for the feedback
Re:Show HN: Tiny logic and number games I built for my kids
by mrgoldenbrown on Tuesday August 05, 2025 @02:58PM
(#44802618)
Yep, got stuck with this too.