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

I intuited a probably-inaccurate trick with exponentially raising a small prime (e.g 7*7*7etc), doubling the multiple (*2), and subtracting 1 (to get an odd number).

That got me two substantially-different primes and narrowed my numbers a lot, which then became guesswork.

My guesses in the end:

  -?---
  ?---!
  ?-??!
  ?!??!
  !!!!!



The number you come up with in that way is at least guaranteed to not be divisible by 2 or 7. Obviously that doesn't mean it's prime but it definitely helps your odds.


Also usefully, (2(a+1)^n-1) % a = (2a(a+1)^(n-1) + 2(a+1)^(n-1) - 1) % a = 1. So if you choose one of the 3k+1 primes, it's also guaranteed not divisible by 3.


lol this would not help me at all

by the way am I supposed to take some meaning from the italicized '7' or was that just a typo?


He probably had 7x7x7, but with asterisks instead of the "x"s.


correct, thanks for the heads up. Fixed




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

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

Search: