Skip to main content
The National Cipher Challenge

Reply To: Programming

#98394
robb
Participant

@_madness_ @ByteInBits
I use PARI for various purposes and agree that numtoperm(26,390304790967593360819076481) indeed gives [26, 5, 2, 18, 1, 19, 4, 15, 14, 20, 6, 12, 25, 13, 21, 3, 8, 7, 9, 10, 11, 16, 17, 22, 24, 23].

From the challenge perspective coding increasing loops in python or other languages would generate the last few digits as 17, 22, 23, 24 i.e. the alphabetical arrangement QVWX as required.

When I under took the challenge, I started with a normal ORDERED alphabet, and used PARI to manually find the highest powers of 26, 25, 24 etc below the required number to generate the sequence 26, 5, 2, 18, 1, 19, 4, 15, 14, 20, 6, 12, 25, 13, 21, 3, 8 then removed the corresponding letter from my ordered alphabet. This gave me ZEBRASDONTFLYMUCH and left the ordered letters GIJKPQVWX. To me this was logical and in keeping ciphers like the key substitution order used in the main challenges.

I hope this helps add perspective.

Report a problem