File size: 56 Bytes
1514a0b
 
1
2
def is_nonagonal(n):
    return int(n * (7 * n - 5) / 2)