Output Sequence by CY

m = {1 => ""}\x0d
r = 1\x0d
p = ''\x0d
(1..100).each { |c|\x0d
  mof = c % 5 == 0\x0d
  mot = c % 3 == 0\x0d
  f = c > 9 ? "  " : " "\x0d
  done = mot && !mof && (c + 1) % 5 != 0 && (c + 2) % 5 != 0\x0d
  if mot && !mof    \x0d
    m[r] << f unless done\x0d
    r += 1\x0d
    if m[r].nil?\x0d
      m[r] = ""\x0d
      (m[r-1].to_s.length - c.to_s.length).times { m[r] << " " }\x0d
    end\x0d
  elsif mof && !mot\x0d
    m[r] << f \x0d
    r -= 1\x0d
  end\x0d
  m[r-1] << f if r != 1 &&  !mot \x0d
  m[r+1] << f if !m[r+1].nil? &&  !mof\x0d
  m[r] << c.to_s\x0d
  p += m[r-1].to_s + "\n" if done\x0d
}\x0d
puts p + m[r] + "\n" + m[r+1]

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top