WELCOME Abdennour : Software engineer

Jul 17, 2012

Rule to calculate the number of nested squares

بسم الله الرحمن الرحيم





when I thought about this problem, I concluded this rule :


Nbre of Square= SUM(i²) [i from 1 to j]  ; with j=Nbre of smallest squares which build costa of the large Square


For Example : we have in the picture   j=4
      So : Nbre of Square = 4*4+3*3+2*2+1*1=30 squares


so When we have j=5 .

  NbreOfSq=5*5+4*4+3*3+2*2+1*1=55






if 

No comments:

Post a Comment