Output Sequence by CyDan

tr = ''\x0d
br = ''\x0d
cr = nil\x0d
(1..100).each do |c| \x0d
  mf = c % 5 == 0\x0d
  mt = c % 3 == 0\x0d
  f = c > 9 ? "  " : " "\x0d
  d = mt && !mf && (c + 1) % 5 != 0 && (c + 2) % 5 != 0\x0d
  \x0d
  if d #done\x0d
    puts tr\x0d
    len = tr.length\x0d
    cr = tr = br + c.to_s\x0d
    br = f + " " * len\x0d
    next\x0d
  else \x0d
    cr = mf ? tr : (mt ? br : cr)\x0d
  end\x0d
  cr == br ? br << c.to_s && tr << f : tr << c.to_s && br << f  \x0d
end\x0d
puts tr + "\n" + br

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

download

return top