Rust Shape Area
fn shape_area(n: i64) -> i64 {
if n > 1 {
shape_area(n - 1) + 4 * (n - 1)
} else {
1
}
}
This returns the area of the growing n-interesting polygon using the direct formula instead of building the shape.