Hacker GitHub

← All repos

geonnave/primg

View on GitHub ↗ ★ 112 HTML

Generate prime numbers whose binary representation looks like any image.

7 mentions on Hacker News by 5 people: 0 stories, 7 comments · first 2018-01-29 · latest 2018-01-30

Mentions per year 7 mentions · busiest year 2018 (7)
20082026
  1. …Are you putting your code on github or such? (edit: disregard the question. Its obviously at: https://github.com/geonnave/primg/ )
  2. Actually it's decrementing: https://github.com/geonnave/primg/blob/master/index.html#L82 I guess it could change the whole image if the last pixels are "000...000", which happens when the top-left corner has an opposite color to the…
  3. > numberBigInt = numberBigInt.minus(1) https://github.com/geonnave/primg/blob/master/index.html#L82 Could go double as fast subtracting 2 instead of 1 (why try the even numbers).
  4. If you decrease the binary number by 1, it becomes prime. Perhaps it's this bug: https://github.com/geonnave/primg/commit/7ec6cfaa4b581902ea1...
  5. https://github.com/geonnave/primg links to https://www.reddit.com/r/math/comments/7qpfls/does_there_exi... .
  6. The example on https://github.com/geonnave/primg shows a binary number ending with zero; doesn't that mean it's even, and therefore divisible by 2?
  7. Source: https://github.com/geonnave/primg