UPDATE AS OF 20/9/2026:
With a couple of adjustments I was able to get around castle's 5000 iteration loop limit, pushing the previous limit of 25 million higher. The code will now correctly play a sound every prime up to 2.5 billion and slightly past that.