human
Write a function to find the nth octagonal number. Here is a solution in Python:
Can you provide a Python program to find the nth octagonal number?
assistant
#Here is Python program to find the nth octagonal number.
 def is_octagonal(n): 
	return 3 * n * n - 2 * n