close
login
A387858
Sum of squares of the multiplicities of pairwise distances among the vertices of a regular n-gon.
1
9, 20, 50, 81, 147, 208, 324, 425, 605, 756, 1014, 1225, 1575, 1856, 2312, 2673, 3249, 3700, 4410, 4961, 5819, 6480, 7500, 8281, 9477, 10388, 11774, 12825, 14415, 15616, 17424, 18785, 20825, 22356, 24642, 26353, 28899, 30800, 33620, 35721, 38829, 41140, 44550, 47081
OFFSET
3,1
COMMENTS
Let f(u) be the number of unordered vertex pairs at distance u in a regular n-gon; then a(n) = sum over u of f(u)^2.
FORMULA
a(n) = n^2*(n-1)/2 for odd n; a(n) = n^2*(2*n-3)/4 for even n.
a(n) = [x^n] x^3*(9 + 11*x + 3*x^2 - 2*x^3 + 3*x^4 + x^5 - x^6)/((x - 1)^4*(x + 1)^3). - Peter Luschny, Sep 16 2025
EXAMPLE
n = 8: distances correspond to chord steps k = 1, 2, 3 with multiplicity 8 each, and the diameter k = 4 with multiplicity 4. Thus a(8) = 8^2 + 8^2 + 8^2 + 4^2 = 208.
MATHEMATICA
a[n_] := n^2 Floor[(n - 1)/2] + If[EvenQ[n], (n/2)^2, 0];
Table[a[n], {n, 3, 30}]
PROG
(Python)
def A387858(n): return n**2*(n-1)>>1 if n&1 else (n>>1)**2*((n<<1)-3) # Chai Wah Wu, Oct 29 2025
CROSSREFS
Bisections give A084367, A103532.
Sequence in context: A109805 A345727 A332372 * A377002 A344818 A341529
KEYWORD
nonn,easy
AUTHOR
Bernat Espigule, Sep 10 2025
STATUS
approved