I would like to generate a sequence of letters i.e. \"A\", \"DE\" \"GJE\", etc. that correspond to a number. The first 26 are pretty easy so 3 returns \"C\", 26 returns \"Z\
class Numeric Alph = ("a".."z").to_a def alph s, q = "", self (q, r = (q - 1).divmod(26)); s.prepend(Alph[r]) until q.zero? s end end 3.alph # => "c" 26.alph # => "z" 27.alph # => "aa" 4123.alph # => "fbo"