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
20082026
-
…Are you putting your code on github or such? (edit: disregard the question. Its obviously at: https://github.com/geonnave/primg/ )
comment by shabda · 2018-01-30 · in Primg – Generate prime numbers whose binary representation looks like any image -
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…
comment by esnard · 2018-01-30 · in Primg – Generate prime numbers whose binary representation looks like any image -
> 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).
comment by ot · 2018-01-30 · in Primg – Generate prime numbers whose binary representation looks like any image -
If you decrease the binary number by 1, it becomes prime. Perhaps it's this bug: https://github.com/geonnave/primg/commit/7ec6cfaa4b581902ea1...
comment by jwilk · 2018-01-30 · in Primg – Generate prime numbers whose binary representation looks like any image -
https://github.com/geonnave/primg links to https://www.reddit.com/r/math/comments/7qpfls/does_there_exi... .
comment by jwilk · 2018-01-30 · in Primg – Generate prime numbers whose binary representation looks like any image -
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?
comment by knodi123 · 2018-01-30 · in Primg – Generate prime numbers whose binary representation looks like any image -
Source: https://github.com/geonnave/primg
comment by jwilk · 2018-01-29 · in Primg – Generate prime numbers whose binary representation looks like any image