Neat. Reminds me of illegal primes: https://en.m.wikipedia.org/wiki/Illegal_prime
A prime number whose binary representation looks like a giraffe
11–20 of 82 posts
Re: A prime number whose binary representation looks like a giraffe
#12See also Zachary Abel's Prime Portraits article [3].
[1]: https://news.ycombinator.com/item?id=15208317
[2]: https://www.youtube.com/watch?v=fQQ8IiTWHhg
[3]: http://archive.bridgesmathart.org/2016/bridges2016-359.pdf
Re: A prime number whose binary representation looks like a giraffe
#13Neat. Reminds me of illegal primes: https://en.m.wikipedia.org/wiki/Illegal_prime
It’s pretty much the same thing - take some arbitrary data, and add some bits so that the result is prime. Not surprising from a mathematical point of view since primes are very common, but it’s a fun thing to see.
Isn't it thought that they get more and more rare the further you go away from zero in the positive direction?
By the way I just realized why no negative numbers are prime and that's because -1 is a factor in all of them. Quite obvious but I just never thought about it before.
Re: A prime number whose binary representation looks like a giraffe
#14I think it would look much better had he put a frame around it with binary ones. It would not only hint about how to decode it, but it would also make it more likely to be prime (ending with huge number of 1s) and hide the ugly noise. I would also like to conjecture that there is infinitely many primes that look like a giraffe in binary, so it's nothing that unusual.
Re: A prime number whose binary representation looks like a giraffe
#15I think the more interesting way to do this would be to create a border that's roughly circular to frame the giraffe, and fill that border with noise. Then do the incrementing thing, and your 12 or so bits of noise at the end will blend in better, making it harder for the average person to reverse engineer. I'm imaging something like this, but with a giraffe instead: https://6d4be195623157e28848-7697ece4918e0a73861de…
111010101111001000110101111111001001000010000
000000000000000000000000000000000000000000001
000000000000000001110111111100000000000000001
100000000000011110000000000011010000000000001
000000000011100000000000000000011100000000000
100000000100000000000000000000000011000000001
100000011000000000000000000000000000100000001
100000110000000001000000001000000000011000001
100000100000000001000000001000000000001100000
000001000000000001000000001000000000000100001
100010000000000001000000001000000000000010000
000010000000000001000000001000000000000010001
000010000000000001000000001000000000000010000
000010000000000000000000000000000000000010000
100010000001100000000000000000001100000010001
000001000000110000000000000000011000000100000
000000100000011000000000000000110000001100001
100000110000001111000000000111100000011000000
000000011000000001111111111100000000100000000
100000000100000000000000000000000011000000001
000000000011100000000000000000011100000000000
100000000000011110000000000011010000000000000
100000000000000001110111111100000000000000000
100000000000000000000000000000000000000000001
111011110010001011101100010110111111110011001
As a number, it's 418286130038247526051590581692998429049634527936177232676862400134230223310124567196900044669909574838414882468188159808593146618824409867113710174334769625185535031892647808338085451521099179358299885075661065903947563499117521951858387121272237585876050870984471996640946451287415573046990997289875221396633775785411121263373993999302553.
This took 487 random border attempts to find, which seems pretty small!Note that efficient primality tests are probabilistic, so there's a small chance this isn't actually prime. I expect it's the same with the giraffe one in the link.
Edit: Here's the code (improved a bit over what made the picture above): https://gitlab.com/snippets/1694391
Re: A prime number whose binary representation looks like a giraffe
#16I think the more interesting way to do this would be to create a border that's roughly circular to frame the giraffe, and fill that border with noise. Then do the incrementing thing, and your 12 or so bits of noise at the end will blend in better, making it harder for the average person to reverse engineer. I'm imaging something like this, but with a giraffe instead: https://6d4be195623157e28848-7697ece4918e0a73861de…
I had the same sort of idea, and just implemented it in Python using gmpy2 for the primality check. Here's a prime smiley face: 111010101111001000110101111111001001000010000 000000000000000000000000000000000000000000001 000000000000000001110111111100000000000000001 100000000000011110000000000011010000000000001 000000000011100000000000000000011100000000000 100000000100000000000000000000000011000000001 1000000110000000…
Re: A prime number whose binary representation looks like a giraffe
#17Earlier quoted context omitted.
It’s pretty much the same thing - take some arbitrary data, and add some bits so that the result is prime. Not surprising from a mathematical point of view since primes are very common, but it’s a fun thing to see.
> primes are very common Isn't it thought that they get more and more rare the further you go away from zero in the positive direction? By the way I just realized why no negative numbers are prime and that's because -1 is a factor in all of them. Quite obvious but I just never thought about it before.
In number theory we define primes as a subset of the natural numbers, which excludes negative integers. But when you move on to abstract algebra, the definition of a prime element in a commutative ring is an element p, such that p|ab implies p|a or p|b. Using this definition, we can conclude that the prime elements in the ring of integers are both the positive and negative primes.
Re: A prime number whose binary representation looks like a giraffe
#18Earlier quoted context omitted.
It’s pretty much the same thing - take some arbitrary data, and add some bits so that the result is prime. Not surprising from a mathematical point of view since primes are very common, but it’s a fun thing to see.
> primes are very common Isn't it thought that they get more and more rare the further you go away from zero in the positive direction? By the way I just realized why no negative numbers are prime and that's because -1 is a factor in all of them. Quite obvious but I just never thought about it before.
Re: A prime number whose binary representation looks like a giraffe
#19Earlier quoted context omitted.
It’s pretty much the same thing - take some arbitrary data, and add some bits so that the result is prime. Not surprising from a mathematical point of view since primes are very common, but it’s a fun thing to see.
> primes are very common Isn't it thought that they get more and more rare the further you go away from zero in the positive direction? By the way I just realized why no negative numbers are prime and that's because -1 is a factor in all of them. Quite obvious but I just never thought about it before.