HACKER Q&A
📣 jelliclesfarm

Gaal Dornick counting primes in Foundation TV series


I haven't read foundation in decades. Did Gaal have this prime counting habit in the books too? I used to count primes many many years ago but I couldn't after a while. Then I'd simply add the digits of any number I see to check if its a prime. I was very disappointed that I couldn't keep up the recitation game with large primes.

Watching the series, I wonder if I picked up the game from the foundation books. I honestly can't recall now. She goes up to 80 something million in the TV series!


  👤 ThePhysicist Accepted Answer ✓
Adding up digits doesn't tell you if a number is prime. You need to factorize it in order to know that for sure, and for that you need to try all suitable factors by hand or use an elimination algorithm like the sieve of Eratosthenes, which would quickly become too unwieldly for large numbers though.

I don't recall the prime number counting from the books. I think they just included it in the show to convey that Dornick is a math genius, as reciting large primes like she does is incredibly hard.