Recreational Mathematics · Combinatorics

Magic Polygon Generator

Solutions and Designs

n-sided polygons · k additional points on every side · distinct consecutive numbers · one common magic sum

Created by Inder J. Taneja

A magic n-gon has n core vertices (each shared by two adjacent sides, forming the polygon itself) and k extra (non-shared) numbers on each side. With n core vertices and k extras per side, that's n×(1+k) numbers total, placed once each, so every side — core[i] + (k extra numbers) + core[i+1] — sums to the same constant. k=1 is the original, simplest case (one extra number per side); pentagon (n=5) with k=2 uses numbers 1–15. In the diagram, one extra number per side sticks out as a leaf, and the rest sit inline on the polygon's edge. The sums listed below are arithmetically admissible candidate sums; the solver then tests whether an actual polygon arrangement can be constructed.
Step 1 — choose n and k, see which sums are arithmetically admissible
Created by Inder J. Taneja