Skip to main content
7 of 11
added 42 characters in body
Kevin Cruijssen
  • 131.5k
  • 13
  • 144
  • 384

#Java 10, 120 113 112 109 107 bytes

n->{var r="|";for(char c,i=0;n++>0;r=n%3<1?c+r:n%3>1?r+c:r,n/=3)c=(char)(i++<1?49:i<3?51:i<4?57:i+61);return r;}

-3 bytes by using part of the trick of @Arnauld's JavaScript (ES6) answer,
changing i=0 and i++<1?49:i<3?51:i<4?57:i+61 to i=4 and ++i>9?i+55:i>8?57:++i+43.
-2 bytes thanks to @Arnauld directly,
changing i=4 and ++i>9?i+55:i>8?57:++i+43 to i=7 and i++>9?i+54:i*6%13%9+49.

Order of output: Highest-to-lowest, |-delimiter, lowest-to-highest.

Explanation:

Try it online.

n->{              // Method with integer parameter and String return-type
  var r="|";      //  Result-String, starting at the delimiter "|"
  for(char c=64,  //  Character
           i=7;   //  Index, starting at 7
      ;n++>0      //  Loop as long as `n` is larger than 0
                  //  Increasing it by 1 with `n++` at the start of every iteration
      ;           //    After every iteration:
       r=         //     Change the result to:
         n%3<1?   //      If `n` modulo-3 is 0:
          c+r     //       Prepend the character to the result
         :n%3>1?  //      Else-if `n` modulo-3 is 2:
          r+c     //       Append the character to the result
         :        //      Else:
          r,      //       Leave `r` unchanged
       n/=3)      //     Integer-divide `n` by 3
     c=(char)(    //   Set the character `c` to:
         i++>9?   //    If the index `i` is 10 or larger:
                  //    (and increase `i` by 1 with `i++` after checking)
          i+54    //     Set `c` to the `i-11`'th (0-indexed) letter of the UC alphabet
         :        //    Else (it's lower than 9):
          i*6%13%9+49);
                  //     Set `c` to either '1', '3' or '9' based on the index `i`
   return r;}     //  Return the result-String
Kevin Cruijssen
  • 131.5k
  • 13
  • 144
  • 384