Perimeter of Two to the n Sided Polygon

To find the perimeter of a polygon with two to the n sides, we can use this recursive where r is the radius of the polygon, is the number of sides, and the square root expression is the length of one side.