use strict;
use warnings;
use List::Util qw(max);
use Math::BigRat;

my $one = Math::BigRat->new(1);
sub bernoulli_print {
	my @a;
	for my $m ( 0 .. 60 ) {
		push @a, $one / ($m + 1);
		for my $j ( reverse 1 .. $m ) {
				
				( $a[$j-1] -= $a[$j] ) *= $j;
				
				
				
		}
		next unless $a[0];
		printf "B(%2d) =%44s/%s\n", $m, $a[0]->parts;
	}
}

bernoulli_print();