1. \(\frac{2a+b+c+d}{a}=\frac{a+2b+c+d}{b}=\frac{a+b+2c+d}{c}=\frac{a+b+c+2d}{d}\)
\(\Rightarrow\frac{2a+b+c+d}{a}-1=\frac{a+2b+c+d}{b}-1\)\(=\frac{a+b+2c+d}{c}-1=\frac{a+b+c+2d}{d}-1\)
\(=\frac{a+b+c+d}{a}=\frac{a+b+c+d}{b}=\frac{a+b+c+d}{c}=\frac{a+b+c+d}{d}\)(1)
TH1: \(a+b+c+d=0\)
\(\Rightarrow a+b=-\left(c+d\right)\); \(b+c=-\left(d+a\right)\); \(c+d=-\left(a+b\right)\); \(d+a=-\left(b+c\right)\)
\(\Rightarrow M=\left(-1\right)+\left(-1\right)+\left(-1\right)+\left(-1\right)+2017=-4+2017=2013\)
TH2: \(a+b+c+d\ne0\)
Từ (1) \(\Rightarrow a=b=c=d\)\(\Rightarrow M=1+1+1+1+2017=4+2017=2021\)
Vậy \(M=2013\)hoặc \(M=2021\)
2. \(2n-5=2n+2-7=2\left(n+1\right)-7\)
Vì \(2\left(n+1\right)⋮n+1\)\(\Rightarrow\)Để \(2n-5⋮n+1\)thì \(7⋮n+1\)
\(\Rightarrow n+1\inƯ\left(7\right)=\left\{\pm1;\pm7\right\}\)\(\Rightarrow n\in\left\{-8;-2;0;6\right\}\)
Vậy \(n\in\left\{-8;-2;0;6\right\}\)