In the original hint, I understood you were using synonyms - main=prime, order=nth. Don't know what non-periodic alternation was. But the only thing missing for me was how to make the first conversion. I thought it was base-36 and did not know how to use it as base-26.