input: Write a python function to calculate the nth triangular number using recursion.
  assert triangle_num(1) == 1
  assert triangle_num(3) == 6
  assert triangle_num(5) == 15
output: def triangle_num(n):
      if n == 1:
          return 1
      else:
          return n + triangle_num(n - 1)