Can someone gladly explain how this function works?

// I’m not sure how this works, I can assume It’s a recursion which I’m having a hard time with. Please help 🙂

function a(b, c) {

  if(b > c) {
    a = 0; 
  } else {
    a = b + a(b * 2 + 1, c);
  }
  return a
}

console.log(a(1, 2018))