# make seven products equal along sides of heptagon

Inspired by question 126115 Make the three products equal and as large as possible

in case someone or 126115 author feels this is plagiarism, be kind and feel free to close

Assign natural numbers $$1 2 3 4 5 6 8 9$$ (note $$7$$ is missing) to points $$A...G,H...N$$ and find different remaining $$6$$ of total $$14$$ natural numbers to make all $$7$$ products of heptagon sides $$AHB ... GNA$$ (listed counter clock wise starting from bottom) equal.

What is the minimal common product ?

bonus

same for assigning numbers $$1 2 3 4 5 6 7$$ and finding different remaining $$7$$ natural numbers

extra challenge: try to keep the natural numbers small.

• I posted question 126115. Your variation is NOT plagiarism. Thanks for acknowledging your inspiration. Commented May 9 at 2:55
• Without restriction on the remaining numbers, there are hundreds of solutions. The common product is not the same among all solutions. Commented May 9 at 4:00
• There are not only hundreds, but infinitely many solutions. It is possible to construct a heptagon with common product $360x$ for any positive integer $x$. In my construction, any $x$ other than 1, 2, 8 gives a heptagon with 14 distinct numbers. Commented May 9 at 4:27
• Thanks for comments, I adjusted OP, also note: I ask for minimal product. Commented May 9 at 11:53

Bonus with extra challenge:

It is possible to form a heptagon with product 420 using numbers up to 28.

1 ---- 15 --- 7 ---- 5 --- 14 --- 10 --- 21 ---- (1)
28      4     12     6      3      2      20

This is the theoretical minimum because 28 is the 14th divisor of 420. The product of seven corners must be $$2^2 3^2 5^3 7^3$$, and the only possible combination is (1, 5, 10, 15, 7, 14, 21). The multiples of 5 and the multiples of 7 must appear alternatively to satisfy the side product of 420. At this point, I could find a solution with trial and error by hand.

Main puzzle with extra challenge:

The same analysis is possible but there are many more possibilities for the choice of corners. The theoretical minimum (the 14th divisor of 360) is 24, but I failed to find a solution for ~30 minutes. Then I wrote a program, and indeed a solution for 24 does not exist.

The next divisor of 360 is 30, and there is a solution using numbers up to 30 (again found by my program):

15 ---- 1 ---- 30 --- 2 ---- 10 --- 9 --- 8 --- (15)
24     12      6     18      4     5     3

The program I wrote can be found here.

• I spotted same unique solutions, up to symmetry, coincidentally, while programming. In fact, there are even more challenging puzzles like position numbers $2$ and $4$ somewhere and fill the heptagon. But I guess impossible to do by hand. If one is only allowed to use numbers in range $[1...24]$ such solution moreover is unique. That puzzle could be hinted by giving the positions for $2$ and $4$. There are only a few equivalent such puzzles. I may wants to add this story and example hidden into OP unless you think that's not a good idea. Commented May 10 at 12:58
• If you think the 'only given 2 and 4' is worth a separate post, let me know. Then, I suppose, perhaps it rather turns into a programming challenge. Commented May 10 at 13:10

Firstly

The LCM of 1,2,3,4,5,6,8,9 is 360 so the product must at least be divisible by 360 and we can achieve the minimum of 360 as follows

Bonus

Here the LCM of 1,2,3,4,5,6,7 is 420 so the product must be divisible by that. Here is how we can achieve the minimum of 420

Bonus with a smaller maximum

• I up-voted your answer as your solutions answer both questions with correct minimum side product. However, $60$ and $140$ are rather large. Solutions do exist with all numbers in smaller ranges $1...N$ Commented May 9 at 15:56
• @FirstNameLastName Reducing the maximum is a tricky problem, I've posted another example with a smaller maximum for the bonus. Playing around a bit, it seems to be hard to get away from putting the small numbers at the vertices (you run out of options quickly) although I feel that both numbers could be reduced. If I get some time, I will look a bit more into this extension. Commented May 9 at 22:19
• Perhaps a computer program is only way out. In fact, unlike a 'no-computer' there is no 'computer' tag which otherwise I would have tagged it. So I guess no 'no-computer' means : computer allowed. Commented May 10 at 13:08
• As touched in my answer to puzzle #126115 it is feasible to find equations to help find numbers on triangles, quadrilaterals, pentagons an hexagons and their sides having common side product. But I had never found some very helpful equations for heptagons. Which is why I wondered if anyone on exchange would find some, for example in these two 'minimal' cases. Commented May 20 at 22:57

You will have the product of each defined by the side and two corners that border it. That product

must have enough factors to be divided by the products of each pair of neighboring vertices. It must include $$5,8,9$$ so we get all the highest factors, so the product is $$360$$. After that you can do anything you wish as the product of any pair of the numbers given divides into $$360$$.

The bonus question

The product must include $$4\cdot 5 \cdot 3 \cdot 7=420$$ as a factor. If we put $$1$$ at a corner we can succeed with $$1,210,2,70,3,35,4,21,5,14,6,10,7,60$$ around the heptagon.

• In the bonus question, there won't necessarily be three on the same side, right? Commented May 9 at 10:52
• @hexomino: the illustration shows three points on each side. Commented May 9 at 10:59
• I mean three of the original subset. Commented May 9 at 11:03
• @hexomino: you are right. I didn't think about the fact that we were only given $7$ numbers this time. Good point. Commented May 9 at 11:15
• @hexomino: there is no restriction on where to place given number Commented May 9 at 15:53

Assign the specified eight numbers to any seven vertices of the heptagon and one side midpoint. Compute that side's product. Compute what number needs to be placed at the midpoint of each remaining side to yield the same product. Done.

(Note that this is not the only possible solution.)

• This is not sufficient. If two corners are $2,3$ and the side between them is $1$ you get a product of $6$. You cannot make the other products $6$ using natural numbers. Commented May 9 at 10:22
• @RossMillikan When this answer was posted, the question did not specify natural numbers.
– fljx
Commented May 9 at 11:12
• MY BAD ... sorry question 126115 was about natural numbers and so is this one. ButI forgot to mention, On the other hand @msh210 thanks for algoritme. Commented May 9 at 15:51