Here is my Python implementation:
<a href="https://github.com/shabda/experiments/tree/master/prime_dinos" rel="nofollow">https://github.com/shabda/experiments/tree/master/prime_dino...</a><p>I put up a show HN, but no one liked it :) <a href="https://news.ycombinator.com/item?id=16198861" rel="nofollow">https://news.ycombinator.com/item?id=16198861</a>
The example on <a href="https://github.com/geonnave/primg" rel="nofollow">https://github.com/geonnave/primg</a> shows a binary number ending with zero; doesn't that mean it's even, and therefore divisible by 2?
Not convinced I actually look like<p><pre><code> 179769313486231590772930519078902473361797697894230657273430081157732675805500963132708477322407536021120113879871393357110553379400815780032957688591226535854678434413850350192892043530395436831148532011789232552521569332295554081981793617293526812832242447096911185919439189235252915185597964786711096720343</code></pre>
tbh ;-)
You could probably speed things up a lot using isProbablePrime(), at least to pre-filter candidate numbers. (Assuming you're using this library: <a href="https://www.npmjs.com/package/big-integer#isprobableprimeiterations" rel="nofollow">https://www.npmjs.com/package/big-integer#isprobableprimeite...</a>)
Relevant Numberphile on generating prime pictures: <a href="https://www.youtube.com/watch?v=fQQ8IiTWHhg" rel="nofollow">https://www.youtube.com/watch?v=fQQ8IiTWHhg</a>
These are very neat, but all of these I've seen the last few weeks use the same trick of putting some garbage at the end to make it a prime. I wish people would vary their techniques a bit: like, make it base 10 and make an ascii-art image, and introduce imperceptible noise to make it a prime. Or, vary the number of rows and columns, and maybe scale of the image, to make it prime.<p>We need to disrupt the "images as primes" industry!
Can you use this for encryption? Make the decryption key the prime number generated by this, and you unlock it by pointing the camera at the right thing?
> numberBigInt = numberBigInt.minus(1)<p><a href="https://github.com/geonnave/primg/blob/master/index.html#L82" rel="nofollow">https://github.com/geonnave/primg/blob/master/index.html#L82</a><p>Could go double as fast subtracting 2 instead of 1 (why try the even numbers).
Is this in response to <a href="https://mathwithbaddrawings.files.wordpress.com/2017/10/2017-10-6-odd-number-theorists.jpg" rel="nofollow">https://mathwithbaddrawings.files.wordpress.com/2017/10/2017...</a> ?
This takes a very, very, very long time.<p>20 minutes in, it is up to 13388 in Firefox.<p>Funny enough, I ran the same image through Chrome, it said it was finish at iteration 458. I'm guessing it is not completely deterministic?
Would it not be preferrable to change as little bits as possible? Instead of counting up from your number you should first try to change single bits (one bit, two, three ...)<p>Changing a single out of 32<i>32 bits gives you 1024 variations. Changing two already gives you 1024</i>1023/2 = 523776 variations.