Numbers can be used as labels to represent items. Barcodes are a perfect example. But if you're sending information to someone who doesn't know what the numbers represent, then you can't communicate. So you'll need a numbering system that will work anywhere, irrespective of the system used.
The periodic table (as an example) could use a linear numbering system to identify individual elements: H=1, He=2, Li=3, Be=4, B=5, C=6, N=7, O=8, F=9, Ne=10, etc.
So if you received information about the number "7" you'd know it was referring to Nitrogen. But a linear system is limited to 1 degree of information, it can only represent the elements, not compounds.
A prime numbering system provides 2 degrees of information. It can represent each element as a prime number: H=2, He=3, Li=5, Be=7, B=11, C=13, N=17, O=19, F=23, Ne=29 etc. It can also represent compounds as composite numbers. For example, the factors of 76 are 2, 2 and 19, which equates to "two Hydrogen plus one Oxygen". So if you received information about the number "76" you would know it was refering to H2O. So a prime number system is an easy way of communicating simple chemical formulas.
Note: This system doesn't communicate information about chemical structure. For example, the number "140608" equates to C3H6, but doesn't explain whether it represents Propene or Cyclopropane. To do so, the numbering system would need to provide additional degrees of information.
The rest of the Elements as prime numbers can be found here
How will the other person know you are sending information about chemical formulas? They might think it is a numbering system for something else.
They'll need to work out for themselves what the numbers represent, but if you provide them with examples, or start off an initial sequence, they should work it out fairly quickly. For example,
3, 29, 61, 151, 251, 443 would represent the noble gases, while
191, 433, 439, 443, etc would represent the "radioactive" elements
Technetium (#191) stands out. It should show the numbering system as representing the period table.