In Broadmann and Sharp's book, Local Cohomology: An Algebraic Introduction with Geometric Applications, the exercise $3.2.4$ is about an exact sequence of the form $\DeclareMathOperator{\Hom}{Hom}$

$$0\rightarrow \Hom_R(a+b,M)\rightarrow \Hom_R(a,M)\oplus \Hom_R(b,M)\rightarrow \Hom_R(a\cap b,M)$$

where $R$ is a commutative unitary ring, $a$ and $b$ ideals of $R$ and $M$ an $R$-module (all $R$-homomorphisms are restrictions, up to signs).

I would like to know if one may extends this result for more than two ideals. Precisely, if $a_1,...,a_n$ are ideals of $R$ and $M$ an $R$-module then there exists exact sequence

$$0\rightarrow \Hom_R(a_1+...+a_n,M)\rightarrow\bigoplus_i \Hom_R(a_i,M)\rightarrow\bigoplus_{i,j}\Hom_R\left(a_i\cap a_j,M\right).$$

1more comment