Now prove it for n = k + 1:
LHS=12+22+32+...+k2+(k+1)2
Using the induction hypothesis:
=6k(k+1)(2k+1)+(k+1)2
Combine the terms:
=6k(k+1)(2k+1)+6(k+1)2
Factor out (k + 1):
=6(k+1)(k(2k+1)+6(k+1))
Simplifying further:
=6(k+1)(2k2+7k+6)
Recognizing that (2k^2 + 7k + 6 = (k+2)(2k+3)$$, we can write:
LHS=6(k+1)(k+2)(2k+3)=RHS