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

#Java 10, 120 113 112 109 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.

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=4;     //  Index, starting at 4
      ;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?     //    Increase the index `i` by 1 first with `++i`,
                    //    and if it's 10 or larger now:
          i+55      //     Set `c` to the `i-10`'th (0-indexed) letter of the UC alphabet
         :i>8?      //    Else-if `i` is 9:
          57        //     Set `c` to '9'
         :          //    Else (it's lower than 9):
          ++i+43);  //     Set `c` to either '1' or '3' based on the index `i`
   return r;}       //  Return the result-String
Kevin Cruijssen
  • 131.5k
  • 13
  • 144
  • 384