import { naturalNumbersSequenceSum } from 'mz-math';
// n = the number of terms to be added
const n = 4;
// a = the first term in the sequence
const a = 2;
// d = the constant value between terms
const d = 2;
// 2 + 4 + 6 + 8
const sum = naturalNumbersSequenceSum(n, a, d); // 20