Last updated 4 years ago
Was this helpful?
const SeriesSum = (n, sum = 0) => { if (n) { return SeriesSum(n - 1, sum + (1 / ((n - 1) * 3 + 1))); } return sum.toFixed(2); };