If you insert/delete even a single row,
your formula may not give the results you want.
If you insert a new row above the referenced range the formula I suggested
will account for that. If you delete a row above the referenced range the
formula I suggested will account for that. If you delete or insert a new row
within the referenced range the formula will still calculate the range based
on the interval of n which would be correct.
If you want to lock the formula to *specific rows* regardless of row
insertions/deletions then you'd need to use something like this:
=SUMPRODUCT(N(INDIRECT({"A6","A10","A14","A18","A22"})))