Could you please elaborate on the mystery surrounding prime numbers? What sets them apart from other numbers, and what makes them so intriguing to mathematicians and cryptographers alike? Is there a hidden formula or pattern that governs their distribution, or are they truly random occurrences within the vast expanse of the number line? And if so, what implications does this have for the security of our digital transactions and the foundations of modern cryptography?