1.) sum(5)

=5+sum(4)

=5+4+sum(3)

=5+4+3+sum(2)

=5+4+3+2+sum(1)

=5+4+3+2+1

=15


2.) result(5)

= 2*result(4)

=22result(3)

=222*result(2)

=2222result(1)

=22222

=32


3.) mystery(3,2,6)

=6+mystery(2,2,6)

=6+[6+mystery(1,2,6)]

=6+6+2