#!/usr/bin/ruby

func bernoulli_print {
    var a = []
    range(0, 20).each { |m|
        a << (m+1 -> inv)
        m.downto(1).each { |j|
            (a[j-1] -= a[j]) *= j
        }
        a[0] || next
        printf("B(%2d) = %20s / %s\n", m, a[0].nude)
    }
}

bernoulli_print()
