Find an expression for the number of squares in the nth pattern of the sequence. I noticed that the number of squares you add in each pattern it depends on the pattern number (see image) but I don't know how to get the expression.

The answer is T(n)=5(n-1)+n+1
because = T(4)=5(4-1)+4+1
=T4=5(3)+5
=T4=15+5
=T4=20
this took me half an hour