Question: 
Write a function to find the nth octagonal number.


Model's Code:
def is_octagonal(n):
    return n * (3 * n - 2)



Sample Correct Code:
def is_octagonal(n): 
	return 3 * n * n - 2 * n 


Asserts:
assert is_octagonal(5) == 65
assert is_octagonal(10) == 280
assert is_octagonal(15) == 645


Tests:
Test 1 of 3: PASS
Test 2 of 3: PASS
Test 3 of 3: PASS

Test 59 of 974: 45/59 (76.27118644067797%): success