DIsclaimer: English is not my first language and this is my first post on Reddit.
While listening to 22, A Million I thought: every song has a number associated with it. Therefore, if we concatenate the digits of every song, we can form a number associated with the album. The number for the original order is: 221,071,533,296,662,184,500,000.
The question that came to my mind was: Is there any order of songs in the album that produces a prime number? Let’s call these orders prime orders.
Before doing any heavy calculations, I estimated how many primes I could expect. First, the number of possible orders is 10!=3,628,800. That’s a big number, so we would be very unlucky if we didn’t find any prime. However, we can be more precise. Using the Prime Number Theorem we expect that about 1.8% of 24-digit numbers and 2.3% of 19-digit numbers are prime.
Why 19-digit numbers? Because if the first song is 00000 Million, the resulting number will have 5 fewer digits. Making a weighted estimate, there should be around 67,056 prime orders. So it is very likely that some reordering will give a prime number.
At first, I thought of doing a random search, since on average it would take about 55 tries to find a prime order. But I decided to go all in and find all of them. It turned out to be quite fast to check if the numbers were prime. Since primes greater than 5 must end in 1, 3, 7, or 9, the last song must be 33 "GOD", 29 #Strafford APTS or 21 M♢♢N WATER. Applying this sieve removes about 70% of the orders, leaving us with 1,088,640 numbers to test. In the end, I found 80,355 prime orders. For example, one of them is
- 21 M♢♢N WATER
- 8 (circle)
- 33 "GOD"
- 10 d E A T h b R E a s T ⊠ ⊠
- 00000 Million
- ____45_____
- 666 ʇ
- 22 (OVER S∞∞N)
- 715 - CRΣΣKS
- 29 #Strafford APTS
which corresponds to 218,331,000,000,456,662,271,529, a prime number.
Having so many options to choose from, I wanted to find a special one: the closest to the original order. But what does "closeness" mean? It could mean numerically closest, or the one requiring the fewest permutations from the original. Interestingly, both definitions gave the same prime order
- 22 (OVER S∞∞N)
- 10 d E A T h b R E a s T ⊠ ⊠
- 715 - CRΣΣKS
- 33 "GOD"
- 29 #Strafford APTS
- 666 ʇ
- 8 (circle)
- ____45_____
- 00000 Million
- 21 M♢♢N WATER
This represents the number 221,071,533,296,668,450,000,021, which is just 6,265,500,021 away from the original. The only difference is that 21 M♢♢N WATER moves from the 7th to the last position. That requires only three permutations and is the fewest possible to make the number odd, since 21 M♢♢N WATER is the last odd song in the album. Any other prime order would need strictly more than three permutations.
Concluiding, not only did we find 80,355 prime orders of the album, we were also able to indetify the closest one to the original. I leave here a link to a playlist with this order. Thank you so much for reading this far.