Ta có: \(\dfrac{n^2+2n+1}{n+23}\in Z\Rightarrow n^2+2n+1⋮n+23\)
\(\Rightarrow n^2+23n-\left(21n-1\right)⋮n+23\)
\(\Rightarrow n\left(n+23\right)-\left(21n-1\right)⋮n+23\)
\(\Rightarrow21n-1⋮n+23\)
\(\Rightarrow21n+483-484⋮n+23\)
\(\Rightarrow21\left(n+23\right)-484⋮n+23\)
\(\Rightarrow484⋮n+23\)
Để n lớn nhất thì n + 23 = 484
\(\Rightarrow n=461\)
Vậy n = 461