Lets take a number 12 as an example .
It can be partitoned into three integer summands in 12 ways:
12=1+1+10
12=1+2+9
12=1+3+8
12=1+4+7
12=1+5+6
12=2+2+8
12=2+3+7
12=2+4+6
12=2+5+5
12=3+3+6
12=3+4+5
12=4+4+4
Multiplying the 3 members of each partitions results in 12 distinct numbers: 10,18,...60,64.
On the other hand the same treatment applied to number 13 produces a pair of equal results: 13=1+6+6=2+2+9 and 1*6*6=2*2*9=36 (a well known problem of children's ages).
Find the smallest number which has 3 distinct partitions into 3 parts, each of them with the same product.
Bonus: list all numbers below 1000 boasting this feature.
Actually, I'll list the numbers through 1000 that
do not exhibit this feature. First of all 1, 2, 3, 4 and 5
do not exhibit the feature. The program below lists the remaining integers that do not exhibit the feature, and these are:
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 * 40 41 42 43 44 * 46 47 48 * 50 51 52 * 54 55 56 57 58 59 60 61 * 63 * * 66 67 68 69 * * 72 73 * * * * * * 80 * * * * * 86 * * * * * * * * * 96 * * * * * 102
The above modified to show an asterisk placeholder for each number below 102 that does exhibit the feature.
This still leaves open my conjecture that 102 is the largest integer not having the feature.
For n = 6 To 1000
ReDim prd(79999999)
lg = 0
good = 0
For a = 1 To n / 3
For b = a To (n  a) / 2
c = n  a  b
If c > 0 Then
p = a * b * c
If p > lg Then lg = p
prd(p) = prd(p) + 1
If prd(p) >= 3 Then good = 1: Exit For
End If
Next
If good Then Exit For
Next
If good = 0 Then Text1.Text = Text1.Text & Str(n)
DoEvents
Next
Edited on November 22, 2018, 3:06 pm

Posted by Charlie
on 20181121 13:57:27 