Ta có :
\(\frac{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\)
Mà \(n\left(n+23\right)⋮n+23\)
\(\Rightarrow21n-1⋮n+23\)
\(\Rightarrow21n+483-484⋮n+23\)
\(\Rightarrow21\left(n+23\right)-484⋮n+23\)
,Mà \(21\left(n+23\right)⋮n+23\)
\(\Rightarrow484⋮n+23\)
Vậy n lớn nhất \(\Leftrightarrow n+23=484\)
\(\Leftrightarrow n=461\)