In my answer here where I suggested Danny Dunn and the Voice from Space, I mentioned the image that the protagonists receive from space via a radio telescope, which was decoded in part because they recognized that the signal consists of 559 "bits", the product of two primes, 13 and 43.
Someone commented on the similarity to the Arecibo message, which used a similar trick of sending out a message that made an image by using dimensions of two primes, and how this was likely an homage, but as per my reply, much to my surprise, the novel was published in 1967, while the Arecibo message wasn't sent until 1974!
I know that Carl Sagan was consulted for the Arecibo message. I assume that the idea of using two primes to increase the likelihood that an intelligent civilization would try interpreting it as a grid image existed somewhere in the scientific literature, which Raymond Abrashkin and Jay Williams, as well as the composers of the Arecibo message, drew upon, but I'm not finding any evidence of that yet. Or did Raymond Abrashkin and Jay Williams come up with it, and then it was used for the Arecibo message?