5 ms·
yeah that's weird - its kind of a pointless comment without an included algorithm or something
by 38 2y ago
yeah that's weird - its kind of a pointless comment without an included algorithm or something
- madcaptenor 2y agoThere’s probably a smart way to rule out a lot of cases so you only have to check a relatively small number of candidates. It would be good to know what it is.
- taneq 2y agoI guess the margin was too small to contain it.
- vhcr 2y agoHere's a really dumb algorithm: for i in range(1, 10**10): for k in range(1, 5): s = str(pow(2, i, 10**(10**k))) if '1' in s or '3' in s or '5' in s or '7' in s or '9' in s: break else: print(2**i) It's really easily to parallelize, I was able to run it up to 10**8 in about 15min, so you would be able to run it up to 10**10 in a few hours with parallelization.
- toxik 2y agoIt's not 10^10 ≈ 2^33 though, it's 2^(10^10) = 2^10000000000, or about 9 999 999 967 orders of magnitude more.
- showerst 2y agoJust by sheer numbers, the comment you're replying to must be one of the provably wrong-est comments in history of hacker news =).
- shiandow 2y agoYou only need to check the actual powers of two. Checking about 10^10 of them is just about doable as vhcr correctly showed. (I mean it wasn't optimal, but 'leave this running for 400 hours' is far from impossible)
- theamk 2y agoIt is 10^10 cases, checking numbers up to 2^(10^10). The numbers themselves are pretty big (~9 gigabytes each if you want to write full binary representation), but nothing that modern computers can't handle.
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]