summaryrefslogtreecommitdiff
path: root/progs/a449.py
blob: 3b5e7a26b58ac9abff436d7df0c8c779fb4cdc64 (plain)
1
2
def centered_hexagonal_number(n):
  return 3 * n * (n - 1) + 1