TH1: n=3k+1
\(A=n^2+2=9k^2+6k+1+2=9k^2+6k+3⋮3\)
TH2: n=3k+2
\(A=9k^2+12k+4+2=9k^2+12k+6⋮3\)
Nếu n = 3k + 1 ; k ∈ N => n2 + 2 = (3k + 1) (3k + 1) + 2
= 9k2 + 3k + 3k + 1 + 2 = 9k2 + 6k + 3 ; 9k2 ⋮ 3 ; 6k ⋮ 3 ; 3 ⋮ 3
=> (n2 + 2) ⋮ 3
Nếu n = 3k + 2 ; k ∈ N => n2 + 2 = (3k + 2) (3k + 2) + 2
= 9k2 + 6k + 6k + 4 + 2 = 9k2 + 12k + 6 ; 9k2 ⋮ 3 ; 12k2 ⋮ 3 ; 3 ⋮ 3
=> (n2 + 2) ⋮ 3