A380980 Place 2n distinct positive integers on an n-gon, n on the vertices and n on the sides such that the sums of the three values on all sides are equal. a(n) is the minimal sum of all the integers used.
21, 38, 55, 81, 105, 140
Offset: 3
Examples
For n=7 the first 14 positive integers suffice. Their permutation is 1,11,7,8,4,9,6,10,3,14,2,12,5,13 and the sum on each side of the heptagon is 19.
Crossrefs
Cf. A380853.
Programs
-
Mathematica
mod[n_]:=Append[n,First[n]]; plus[n_]:=Table[mod[n][[i]]+mod[n][[i+1]],{i,1,Length[mod[n]]-1}]; goodPermutations[n_]:=Select[Permutations[n],Length[plus[#]]==Length[Union[plus[#]]]&]; min[n_]:=Min[Max/@plus/@goodPermutations[Range[n]]]; bestPermutation[n_]:=Select[goodPermutations[Range[n]],Max[plus[#]]==min[n]&,1]; plusBP[n_]:=plus/@bestPermutation[n]; max[n_]:=Max[Max/@plusBP[n]]; unit[n_]:=max[n]+n+1; sum[n_]:=n*unit[n]-Total@@plusBP[n]+n*(n+1)/2; sum/@Range[3,8]