n=2
0110
1111
0110
n=3
0011100
0111110
1111111
0111110
0011100
P(n) = ( n+2·(n+(-1)) )·( 1+2·(n+(-1)) )+(-2)·n(n+(-1))
P(n) = ( n+(n+1)·2·(n+(-1))+4·(n+(-1))^{2} )+(-2)·n(n+(-1))
P(n) = ( n+2·(n^{2}+(-1))+4·(n^{2}+(-2)n+1) )+(-2)·n(n+(-1))
P(n) = 4n^{2}+(-5)n+2
P(2) = 8
P(3) = 23
No hay comentarios:
Publicar un comentario