# “Factor” a number into 1-16 products and sum parts

I have a number N (integer 32 bits) that I need to "factor" into 1-16 product and sum parts. Let me explain:

• For $$N = 256$$, I want: $$(16 \times 16)$$
• For $$N = 257$$, I want: $$(16 \times 16) + 1$$
• For $$N = 512$$, I want: $$(16 \times 16) \times 2$$
• For $$N = 530$$, I want: $$(16 \times 16 \times 2) + (2 \times 9)$$
• For $$N = 531$$, I want: $$(16\times 11 \times 3) + 3$$

The minor number of sums are better, i.e., products should be preferred.

Is there a algorithm for this?

• For 531 why $(16\cdot 16\cdot 2)+(2\cdot 9)+1$ rather than $(16\cdot 11\cdot 3) + 3$? – JMoravitz Jul 15 at 16:51
• You're right, that is what I want. – Adriano dos Santos Fernandes Jul 15 at 16:54
• My best guess would be that you would want to find the largest number whose only prime factors are $2,3,5,7,11,13$ less than your number. That can then be factored and comprise your first term. Now, the difference is smaller than the original number and we repeat the process. It seems costly to do however and is inefficient and greedy and so might not produce optimal results. – JMoravitz Jul 15 at 16:59
• Is $530 = (16\times 11\times 3) + 2$ also acceptable, or do you prefer $530=(16\times 16\times 2) + (2\times 9)$ ? – user326210 Jul 15 at 17:59
• I would use a loop of $x=n-16^2m$, starting from $m=1$ until $16^2m>n$. Then use $y=n-16^2(m-1)$ and so on. Personally, I would just find the fewest numbers of squares, e.g. let $x=\lfloor\sqrt(n)\rfloor$ and then $y=\lfloor\sqrt{n-x^2}\rfloor$ and continue until I found a number that was suitable just to add. For example: $\lfloor\sqrt{530}\rfloor=23\quad 530-23^2=1$ – poetasis Jul 16 at 18:29

I've enclosed a brute-force Python algorithm, below. There are a few tricks that make the algorithm more efficient:

1. To find a minimal sum for $$n$$, find every $$k that can be written as a product of factors less than 16. (It's enough to check that all of the prime factors are less than 16).

2. Use the following dynamic programming principle: if the minimal sum for $$n$$ includes $$k$$ as a term, then the other terms in the sum are the minimal sum for $$n-k$$. (You can cache the minimal sums if you plan to find the minimal sums for a lot of numbers.)

3. Return the combination of $$k$$, minimal_sum($$n-k)$$ with the fewest terms.

def minimal_sum(n) :
best_sum = None

if n == 0 :
return []

if sum_cache.get(n) :
return sum_cache[n]

for summand in range(n,0,-1) :

fs = factors(summand)

if any([f > 16 for f in fs.keys()]) :
continue

other_factors = minimal_sum(n-summand)
if best_sum is None or len(best_sum) > len(other_factors)+1 :
best_sum = [summand] + other_factors
if len(best_sum) == 1 :
# short circuit
sum_cache[n] = best_sum
return best_sum

sum_cache[n] = best_sum
return best_sum



def factorize(n, limit=16, as_string=True) :
"""Write the number n as a product of factors less than limit."""
factor_map = factors(n)

if any(x > limit for x in factor_map.keys()) :
return None

fs = []
for f in sorted(factor_map.keys()) :
fs += [f] * factor_map[f]

ret = []
while fs :

k = fs.pop()
term = [k]

while fs and reduce(lambda a,b:a*b, term, fs[0]) < limit :
term += [fs.pop(0)]
ret += [term]

if not ret :
ret = [[1]]

if not as_string :
return [reduce(lambda a,b:a*b, q) for q in reversed(ret)]

else :
pp = "x".join([str(reduce(lambda a,b:a*b, q)) for q in reversed(ret)])
return pp if len(ret) == 1 else "("+pp+")"


First few results:

n minimal_sum(n)
----------------
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 12
13 13
14 14
15 15
16 (2x8)
17 (2x8)+1
18 (3x6)
19 (3x6)+1
20 (2x10)
21 (3x7)
22 (2x11)
23 (2x11)+1
24 (2x12)
25 (5x5)
26 (2x13)
27 (3x9)
28 (2x14)
29 (2x14)+1
30 (3x10)
31 (3x10)+1
32 (4x8)
33 (3x11)
34 (3x11)+1
35 (5x7)
36 (3x12)
37 (3x12)+1
38 (3x12)+2
39 (3x13)
40 (4x10)
41 (4x10)+1
42 (3x14)
43 (3x14)+1
44 (4x11)
45 (3x15)
46 (3x15)+1
47 (3x15)+2
48 (4x12)
49 (7x7)
50 (5x10)
51 (5x10)+1
52 (4x13)
53 (4x13)+1
54 (9x6)
55 (5x11)
56 (4x14)
57 (4x14)+1
58 (4x14)+2
59 (4x14)+3
60 (6x10)
61 (6x10)+1
62 (6x10)+2
63 (9x7)
64 (8x8)
65 (5x13)
66 (6x11)
67 (6x11)+1
68 (6x11)+2
69 (6x11)+3
70 (5x14)
71 (5x14)+1
72 (6x12)
73 (6x12)+1
74 (6x12)+2
75 (5x15)
76 (5x15)+1
77 (7x11)
78 (6x13)
79 (6x13)+1
80 (8x10)
81 (9x9)
82 (9x9)+1
83 (9x9)+2
84 (6x14)
85 (6x14)+1
86 (6x14)+2
87 (6x14)+3
88 (8x11)
89 (8x11)+1
90 (9x10)
91 (7x13)
92 (7x13)+1
93 (7x13)+2
94 (7x13)+3
95 (7x13)+4
96 (8x12)
97 (8x12)+1
98 (7x14)
99 (9x11)
100 (10x10)
101 (10x10)+1
102 (10x10)+2
103 (10x10)+3
104 (8x13)
105 (15x7)
106 (15x7)+1
107 (15x7)+2
108 (9x12)
109 (9x12)+1
110 (10x11)
111 (10x11)+1
112 (8x14)
113 (8x14)+1
114 (8x14)+2
115 (8x14)+3
116 (8x14)+4
117 (9x13)
118 (9x13)+1
119 (9x13)+2
120 (12x10)
121 (11x11)
122 (11x11)+1
123 (11x11)+2
124 (11x11)+3
125 (5x5x5)
126 (9x14)
127 (9x14)+1
128 (2x8x8)
129 (2x8x8)+1
130 (10x13)
131 (10x13)+1
132 (12x11)
133 (12x11)+1
134 (12x11)+2
135 (9x15)
136 (9x15)+1
137 (9x15)+2
138 (9x15)+3
139 (9x15)+4
140 (10x14)
141 (10x14)+1
142 (10x14)+2
143 (11x13)
144 (12x12)
145 (12x12)+1
146 (12x12)+2
147 (3x7x7)
148 (3x7x7)+1
149 (3x7x7)+2
150 (15x10)
151 (15x10)+1
152 (15x10)+2
153 (15x10)+3
154 (14x11)
155 (14x11)+1
156 (12x13)
157 (12x13)+1
158 (12x13)+2
159 (12x13)+3
160 (2x8x10)
161 (2x8x10)+1
162 (3x9x6)
163 (3x9x6)+1
164 (3x9x6)+2
165 (15x11)
166 (15x11)+1
167 (15x11)+2
168 (12x14)
169 (13x13)
170 (13x13)+1
171 (13x13)+2
172 (13x13)+3
173 (13x13)+4
174 (13x13)+5
175 (5x5x7)
176 (2x8x11)
177 (2x8x11)+1
178 (2x8x11)+2
179 (2x8x11)+3
180 (3x6x10)
181 (3x6x10)+1
182 (14x13)
183 (14x13)+1
184 (14x13)+2
185 (14x13)+3
186 (14x13)+4
187 (14x13)+5
188 (14x13)+6
189 (3x9x7)
190 (3x9x7)+1
191 (3x9x7)+2
192 (2x8x12)
193 (2x8x12)+1
194 (2x8x12)+2
195 (15x13)
196 (14x14)
197 (14x14)+1
198 (3x6x11)
199 (3x6x11)+1
200 (2x10x10)
201 (2x10x10)+1
202 (2x10x10)+2
203 (2x10x10)+3
204 (2x10x10)+4
205 (2x10x10)+5
206 (2x10x10)+6
207 (2x10x10)+7
208 (2x8x13)
209 (2x8x13)+1
210 (15x14)
211 (15x14)+1
212 (15x14)+2
213 (15x14)+3
214 (15x14)+4
215 (15x14)+5
216 (3x6x12)
217 (3x6x12)+1
218 (3x6x12)+2
219 (3x6x12)+3
220 (2x10x11)
221 (2x10x11)+1
222 (2x10x11)+2
223 (2x10x11)+3
224 (2x8x14)
225 (15x15)
226 (15x15)+1
227 (15x15)+2
228 (15x15)+3
229 (15x15)+4
230 (15x15)+5
231 (3x7x11)
232 (3x7x11)+1
233 (3x7x11)+2
234 (3x6x13)
235 (3x6x13)+1
236 (3x6x13)+2
237 (3x6x13)+3
238 (3x6x13)+4
239 (3x6x13)+5
240 (2x12x10)
241 (2x12x10)+1
242 (2x11x11)
243 (3x9x9)
244 (3x9x9)+1
245 (5x7x7)
246 (5x7x7)+1
247 (5x7x7)+2
248 (5x7x7)+3
249 (5x7x7)+4
250 (5x5x10)
251 (5x5x10)+1
252 (3x6x14)
253 (3x6x14)+1
254 (3x6x14)+2
255 (3x6x14)+3
256 (4x8x8)
257 (4x8x8)+1
258 (4x8x8)+2
259 (4x8x8)+3
260 (2x10x13)
261 (2x10x13)+1
262 (2x10x13)+2
263 (2x10x13)+3
264 (2x12x11)
265 (2x12x11)+1
266 (2x12x11)+2
267 (2x12x11)+3
268 (2x12x11)+4
269 (2x12x11)+5
270 (3x9x10)
271 (3x9x10)+1
272 (3x9x10)+2
273 (3x7x13)
274 (3x7x13)+1
275 (5x5x11)
276 (5x5x11)+1
277 (5x5x11)+2
278 (5x5x11)+3
279 (5x5x11)+4
280 (2x10x14)
281 (2x10x14)+1
282 (2x10x14)+2
283 (2x10x14)+3
284 (2x10x14)+4
285 (2x10x14)+5
286 (2x11x13)
287 (2x11x13)+1
288 (2x12x12)
289 (2x12x12)+1
290 (2x12x12)+2
291 (2x12x12)+3
292 (2x12x12)+4
293 (2x12x12)+5
294 (3x7x14)
295 (3x7x14)+1
296 (3x7x14)+2
297 (3x9x11)
298 (3x9x11)+1
299 (3x9x11)+2
300 (3x10x10)
301 (3x10x10)+1
302 (3x10x10)+2
303 (3x10x10)+3
304 (3x10x10)+4
305 (3x10x10)+5
306 (3x10x10)+6
307 (3x10x10)+7
308 (2x14x11)
309 (2x14x11)+1
310 (2x14x11)+2
311 (2x14x11)+3
312 (2x12x13)
313 (2x12x13)+1
314 (2x12x13)+2
315 (3x15x7)
316 (3x15x7)+1
317 (3x15x7)+2
318 (3x15x7)+3
319 (3x15x7)+4
320 (4x8x10)
321 (4x8x10)+1
322 (4x8x10)+2
323 (4x8x10)+3
324 (3x9x12)
325 (5x5x13)
326 (5x5x13)+1
327 (5x5x13)+2
328 (5x5x13)+3
329 (5x5x13)+4
330 (3x10x11)
331 (3x10x11)+1
332 (3x10x11)+2
333 (3x10x11)+3
334 (3x10x11)+4
335 (3x10x11)+5
336 (2x12x14)
337 (2x12x14)+1
338 (2x13x13)
339 (2x13x13)+1
340 (2x13x13)+2
341 (2x13x13)+3
342 (2x13x13)+4
343 (7x7x7)
344 (7x7x7)+1
345 (7x7x7)+2
346 (7x7x7)+3
347 (7x7x7)+4
348 (7x7x7)+5
349 (7x7x7)+6
350 (5x5x14)
351 (3x9x13)
352 (4x8x11)
353 (4x8x11)+1
354 (4x8x11)+2
355 (4x8x11)+3
356 (4x8x11)+4
357 (4x8x11)+5
358 (4x8x11)+6
359 (4x8x11)+7
360 (3x12x10)
361 (3x12x10)+1
362 (3x12x10)+2
363 (3x11x11)
364 (2x14x13)
365 (2x14x13)+1
366 (2x14x13)+2
367 (2x14x13)+3
368 (2x14x13)+4
369 (2x14x13)+5
370 (2x14x13)+6
371 (2x14x13)+7
372 (2x14x13)+8
373 (2x14x13)+9
374 (2x14x13)+10
375 (5x5x15)
376 (5x5x15)+1
377 (5x5x15)+2
378 (3x9x14)
379 (3x9x14)+1
380 (3x9x14)+2
381 (3x9x14)+3
382 (3x9x14)+4
383 (3x9x14)+5
384 (4x8x12)
385 (5x7x11)
386 (5x7x11)+1
387 (5x7x11)+2
388 (5x7x11)+3
389 (5x7x11)+4
390 (3x10x13)
391 (3x10x13)+1
392 (2x14x14)
393 (2x14x14)+1
394 (2x14x14)+2
395 (2x14x14)+3
396 (3x12x11)
397 (3x12x11)+1
398 (3x12x11)+2
399 (3x12x11)+3
400 (4x10x10)
401 (4x10x10)+1
402 (4x10x10)+2
403 (4x10x10)+3
404 (4x10x10)+4
405 (3x9x15)
406 (3x9x15)+1
407 (3x9x15)+2
408 (3x9x15)+3
409 (3x9x15)+4
410 (3x9x15)+5
411 (3x9x15)+6
412 (3x9x15)+7
413 (3x9x15)+8
414 (3x9x15)+9
415 (3x9x15)+10
416 (4x8x13)
417 (4x8x13)+1
418 (4x8x13)+2
419 (4x8x13)+3
420 (3x10x14)
421 (3x10x14)+1
422 (3x10x14)+2
423 (3x10x14)+3
424 (3x10x14)+4
425 (3x10x14)+5
426 (3x10x14)+6
427 (3x10x14)+7
428 (3x10x14)+8
429 (3x11x13)
430 (3x11x13)+1
431 (3x11x13)+2
432 (3x12x12)
433 (3x12x12)+1
434 (3x12x12)+2
435 (3x12x12)+3
436 (3x12x12)+4
437 (3x12x12)+5
438 (3x12x12)+6
439 (3x12x12)+7
440 (4x10x11)
441 (9x7x7)
442 (9x7x7)+1
443 (9x7x7)+2
444 (9x7x7)+3
445 (9x7x7)+4
446 (9x7x7)+5
447 (9x7x7)+6
448 (4x8x14)
449 (4x8x14)+1
450 (3x15x10)
451 (3x15x10)+1
452 (3x15x10)+2
453 (3x15x10)+3
454 (3x15x10)+4
455 (5x7x13)
456 (5x7x13)+1
457 (5x7x13)+2
458 (5x7x13)+3
459 (5x7x13)+4
460 (5x7x13)+5
461 (5x7x13)+6
462 (3x14x11)
463 (3x14x11)+1
464 (3x14x11)+2
465 (3x14x11)+3
466 (3x14x11)+4
467 (3x14x11)+5
468 (3x12x13)
469 (3x12x13)+1
470 (3x12x13)+2
471 (3x12x13)+3
472 (3x12x13)+4
473 (3x12x13)+5
474 (3x12x13)+6
475 (3x12x13)+7
476 (3x12x13)+8
477 (3x12x13)+9
478 (3x12x13)+10
479 (3x12x13)+11
480 (4x12x10)
481 (4x12x10)+1
482 (4x12x10)+2
483 (4x12x10)+3
484 (4x11x11)
485 (4x11x11)+1
486 (9x9x6)
487 (9x9x6)+1
488 (9x9x6)+2
489 (9x9x6)+3
490 (5x7x14)
491 (5x7x14)+1
492 (5x7x14)+2
493 (5x7x14)+3
494 (5x7x14)+4
495 (3x15x11)
496 (3x15x11)+1
497 (3x15x11)+2
498 (3x15x11)+3
499 (3x15x11)+4
500 (5x10x10)
501 (5x10x10)+1
502 (5x10x10)+2
503 (5x10x10)+3
504 (3x12x14)
505 (3x12x14)+1
506 (3x12x14)+2
507 (3x13x13)
508 (3x13x13)+1
509 (3x13x13)+2
510 (3x13x13)+3
511 (3x13x13)+4
512 (8x8x8)
513 (8x8x8)+1
514 (8x8x8)+2
515 (8x8x8)+3
516 (8x8x8)+4
517 (8x8x8)+5
518 (8x8x8)+6
519 (8x8x8)+7
520 (4x10x13)
521 (4x10x13)+1
522 (4x10x13)+2
523 (4x10x13)+3
524 (4x10x13)+4
525 (5x15x7)
526 (5x15x7)+1
527 (5x15x7)+2
528 (4x12x11)
529 (4x12x11)+1
530 (4x12x11)+2
531 (4x12x11)+3
532 (4x12x11)+4
533 (4x12x11)+5
534 (4x12x11)+6
535 (4x12x11)+7
536 (4x12x11)+8
537 (4x12x11)+9
538 (4x12x11)+10
539 (7x7x11)
540 (9x6x10)
541 (9x6x10)+1
542 (9x6x10)+2
543 (9x6x10)+3
544 (9x6x10)+4
545 (9x6x10)+5
546 (3x14x13)
547 (3x14x13)+1
548 (3x14x13)+2
549 (3x14x13)+3
550 (5x10x11)
551 (5x10x11)+1
552 (5x10x11)+2
553 (5x10x11)+3
554 (5x10x11)+4
555 (5x10x11)+5
556 (5x10x11)+6
557 (5x10x11)+7
558 (5x10x11)+8
559 (5x10x11)+9
560 (4x10x14)
561 (4x10x14)+1
562 (4x10x14)+2
563 (4x10x14)+3
564 (4x10x14)+4
565 (4x10x14)+5
566 (4x10x14)+6
567 (9x9x7)
568 (9x9x7)+1
569 (9x9x7)+2
570 (9x9x7)+3
571 (9x9x7)+4
572 (4x11x13)
573 (4x11x13)+1
574 (4x11x13)+2
575 (4x11x13)+3
576 (4x12x12)
577 (4x12x12)+1
578 (4x12x12)+2
579 (4x12x12)+3
580 (4x12x12)+4
581 (4x12x12)+5
582 (4x12x12)+6
583 (4x12x12)+7
584 (4x12x12)+8
585 (3x15x13)
586 (3x15x13)+1
587 (3x15x13)+2
588 (3x14x14)
589 (3x14x14)+1
590 (3x14x14)+2
591 (3x14x14)+3
592 (3x14x14)+4
593 (3x14x14)+5
594 (9x6x11)
595 (9x6x11)+1
596 (9x6x11)+2
597 (9x6x11)+3
598 (9x6x11)+4
599 (9x6x11)+5
600 (6x10x10)
601 (6x10x10)+1
602 (6x10x10)+2
603 (6x10x10)+3
604 (6x10x10)+4
605 (5x11x11)
606 (5x11x11)+1
607 (5x11x11)+2
608 (5x11x11)+3
609 (5x11x11)+4
610 (5x11x11)+5
611 (5x11x11)+6
612 (5x11x11)+7
613 (5x11x11)+8
614 (5x11x11)+9
615 (5x11x11)+10
616 (4x14x11)
617 (4x14x11)+1
618 (4x14x11)+2
619 (4x14x11)+3
620 (4x14x11)+4
621 (4x14x11)+5
622 (4x14x11)+6
623 (4x14x11)+7
624 (4x12x13)
625 (5x5x5x5)
626 (5x5x5x5)+1
627 (5x5x5x5)+2
628 (5x5x5x5)+3
629 (5x5x5x5)+4
630 (3x15x14)
631 (3x15x14)+1
632 (3x15x14)+2
633 (3x15x14)+3
634 (3x15x14)+4
635 (3x15x14)+5
636 (3x15x14)+6
637 (7x7x13)
638 (7x7x13)+1
639 (7x7x13)+2
640 (8x8x10)
641 (8x8x10)+1
642 (8x8x10)+2
643 (8x8x10)+3
644 (8x8x10)+4
645 (8x8x10)+5
646 (8x8x10)+6
647 (8x8x10)+7
648 (9x6x12)
649 (9x6x12)+1
650 (5x10x13)
651 (5x10x13)+1
652 (5x10x13)+2
653 (5x10x13)+3
654 (5x10x13)+4
655 (5x10x13)+5
656 (5x10x13)+6
657 (5x10x13)+7
658 (5x10x13)+8
659 (5x10x13)+9
660 (6x10x11)
661 (6x10x11)+1
662 (6x10x11)+2
663 (6x10x11)+3
664 (6x10x11)+4
665 (6x10x11)+5
666 (6x10x11)+6
667 (6x10x11)+7
668 (6x10x11)+8
669 (6x10x11)+9
670 (6x10x11)+10
671 (6x10x11)+11
672 (4x12x14)
673 (4x12x14)+1
674 (4x12x14)+2
675 (3x15x15)
676 (4x13x13)
677 (4x13x13)+1
678 (4x13x13)+2
679 (4x13x13)+3
680 (4x13x13)+4
681 (4x13x13)+5
682 (4x13x13)+6
683 (4x13x13)+7
684 (4x13x13)+8
685 (4x13x13)+9
686 (7x7x14)
687 (7x7x14)+1
688 (7x7x14)+2
689 (7x7x14)+3
690 (7x7x14)+4
691 (7x7x14)+5
692 (7x7x14)+6
693 (9x7x11)
694 (9x7x11)+1
695 (9x7x11)+2
696 (9x7x11)+3
697 (9x7x11)+4
698 (9x7x11)+5
699 (9x7x11)+6
700 (5x10x14)
701 (5x10x14)+1
702 (9x6x13)
703 (9x6x13)+1
704 (8x8x11)
705 (8x8x11)+1
706 (8x8x11)+2
707 (8x8x11)+3
708 (8x8x11)+4
709 (8x8x11)+5
710 (8x8x11)+6
711 (8x8x11)+7
712 (8x8x11)+8
713 (8x8x11)+9
714 (8x8x11)+10
715 (5x11x13)
716 (5x11x13)+1
717 (5x11x13)+2
718 (5x11x13)+3
719 (5x11x13)+4
720 (6x12x10)
721 (6x12x10)+1
722 (6x12x10)+2
723 (6x12x10)+3
724 (6x12x10)+4
725 (6x12x10)+5
726 (6x11x11)
727 (6x11x11)+1
728 (4x14x13)
729 (9x9x9)
730 (9x9x9)+1
731 (9x9x9)+2
732 (9x9x9)+3
733 (9x9x9)+4
734 (9x9x9)+5
735 (15x7x7)
736 (15x7x7)+1
737 (15x7x7)+2
738 (15x7x7)+3
739 (15x7x7)+4
740 (15x7x7)+5
741 (15x7x7)+6
742 (15x7x7)+7
743 (15x7x7)+8
744 (15x7x7)+9
745 (15x7x7)+10
746 (15x7x7)+11
747 (15x7x7)+12
748 (15x7x7)+13
749 (15x7x7)+14
750 (5x15x10)
751 (5x15x10)+1
752 (5x15x10)+2
753 (5x15x10)+3
754 (5x15x10)+4
755 (5x15x10)+5
756 (9x6x14)
757 (9x6x14)+1
758 (9x6x14)+2
759 (9x6x14)+3
760 (9x6x14)+4
761 (9x6x14)+5
762 (9x6x14)+6
763 (9x6x14)+7
764 (9x6x14)+8
765 (9x6x14)+9
766 (9x6x14)+10
767 (9x6x14)+11
768 (8x8x12)
769 (8x8x12)+1
770 (5x14x11)
771 (5x14x11)+1
772 (5x14x11)+2
773 (5x14x11)+3
774 (5x14x11)+4
775 (5x14x11)+5
776 (5x14x11)+6
777 (5x14x11)+7
778 (5x14x11)+8
779 (5x14x11)+9
780 (6x10x13)
781 (6x10x13)+1
782 (6x10x13)+2
783 (6x10x13)+3
784 (4x14x14)
785 (4x14x14)+1
786 (4x14x14)+2
787 (4x14x14)+3
788 (4x14x14)+4
789 (4x14x14)+5
790 (4x14x14)+6
791 (4x14x14)+7
792 (6x12x11)
793 (6x12x11)+1
794 (6x12x11)+2
795 (6x12x11)+3
796 (6x12x11)+4
797 (6x12x11)+5
798 (6x12x11)+6
799 (6x12x11)+7
800 (8x10x10)
801 (8x10x10)+1
802 (8x10x10)+2
803 (8x10x10)+3
804 (8x10x10)+4
805 (8x10x10)+5
806 (8x10x10)+6
807 (8x10x10)+7
808 (8x10x10)+8
809 (8x10x10)+9
810 (9x9x10)
811 (9x9x10)+1
812 (9x9x10)+2
813 (9x9x10)+3
814 (9x9x10)+4
815 (9x9x10)+5
816 (9x9x10)+6
817 (9x9x10)+7
818 (9x9x10)+8
819 (9x7x13)
820 (9x7x13)+1
821 (9x7x13)+2
822 (9x7x13)+3
823 (9x7x13)+4
824 (9x7x13)+5
825 (5x15x11)
826 (5x15x11)+1
827 (5x15x11)+2
828 (5x15x11)+3
829 (5x15x11)+4
830 (5x15x11)+5
831 (5x15x11)+6
832 (8x8x13)
833 (8x8x13)+1
834 (8x8x13)+2
835 (8x8x13)+3
836 (8x8x13)+4
837 (8x8x13)+5
838 (8x8x13)+6
839 (8x8x13)+7
840 (6x10x14)
841 (6x10x14)+1
842 (6x10x14)+2
843 (6x10x14)+3
844 (6x10x14)+4
845 (5x13x13)
846 (5x13x13)+1
847 (7x11x11)
848 (7x11x11)+1
849 (7x11x11)+2
850 (7x11x11)+3
851 (7x11x11)+4
852 (7x11x11)+5
853 (7x11x11)+6
854 (7x11x11)+7
855 (7x11x11)+8
856 (7x11x11)+9
857 (7x11x11)+10
858 (6x11x13)
859 (6x11x13)+1
860 (6x11x13)+2
861 (6x11x13)+3
862 (6x11x13)+4
863 (6x11x13)+5
864 (6x12x12)
865 (6x12x12)+1
866 (6x12x12)+2
867 (6x12x12)+3
868 (6x12x12)+4
869 (6x12x12)+5
870 (6x12x12)+6
871 (6x12x12)+7
872 (6x12x12)+8
873 (6x12x12)+9
874 (6x12x12)+10
875 (5x5x5x7)
876 (5x5x5x7)+1
877 (5x5x5x7)+2
878 (5x5x5x7)+3
879 (5x5x5x7)+4
880 (8x10x11)
881 (8x10x11)+1
882 (9x7x14)
883 (9x7x14)+1
884 (9x7x14)+2
885 (9x7x14)+3
886 (9x7x14)+4
887 (9x7x14)+5
888 (9x7x14)+6
889 (9x7x14)+7
890 (9x7x14)+8
891 (9x9x11)
892 (9x9x11)+1
893 (9x9x11)+2
894 (9x9x11)+3
895 (9x9x11)+4
896 (8x8x14)
897 (8x8x14)+1
898 (8x8x14)+2
899 (8x8x14)+3
900 (9x10x10)
901 (9x10x10)+1
902 (9x10x10)+2
903 (9x10x10)+3
904 (9x10x10)+4
905 (9x10x10)+5
906 (9x10x10)+6
907 (9x10x10)+7
908 (9x10x10)+8
909 (9x10x10)+9
910 (5x14x13)
911 (5x14x13)+1
912 (5x14x13)+2
913 (5x14x13)+3
914 (5x14x13)+4
915 (5x14x13)+5
916 (5x14x13)+6
917 (5x14x13)+7
918 (5x14x13)+8
919 (5x14x13)+9
920 (5x14x13)+10
921 (5x14x13)+11
922 (5x14x13)+12
923 (5x14x13)+13
924 (6x14x11)
925 (6x14x11)+1
926 (6x14x11)+2
927 (6x14x11)+3
928 (6x14x11)+4
929 (6x14x11)+5
930 (6x14x11)+6
931 (6x14x11)+7
932 (6x14x11)+8
933 (6x14x11)+9
934 (6x14x11)+10
935 (6x14x11)+11
936 (6x12x13)
937 (6x12x13)+1
938 (6x12x13)+2
939 (6x12x13)+3
940 (6x12x13)+4
941 (6x12x13)+5
942 (6x12x13)+6
943 (6x12x13)+7
944 (6x12x13)+8
945 (9x15x7)
946 (9x15x7)+1
947 (9x15x7)+2
948 (9x15x7)+3
949 (9x15x7)+4
950 (9x15x7)+5
951 (9x15x7)+6
952 (9x15x7)+7
953 (9x15x7)+8
954 (9x15x7)+9
955 (9x15x7)+10
956 (9x15x7)+11
957 (9x15x7)+12
958 (9x15x7)+13
959 (9x15x7)+14
960 (8x12x10)
961 (8x12x10)+1
962 (8x12x10)+2
963 (8x12x10)+3
964 (8x12x10)+4
965 (8x12x10)+5
966 (8x12x10)+6
967 (8x12x10)+7
968 (8x11x11)
969 (8x11x11)+1
970 (8x11x11)+2
971 (8x11x11)+3
972 (9x9x12)
973 (9x9x12)+1
974 (9x9x12)+2
975 (5x15x13)
976 (5x15x13)+1
977 (5x15x13)+2
978 (5x15x13)+3
979 (5x15x13)+4
980 (5x14x14)
981 (5x14x14)+1
982 (5x14x14)+2
983 (5x14x14)+3
984 (5x14x14)+4
985 (5x14x14)+5
986 (5x14x14)+6
987 (5x14x14)+7
988 (5x14x14)+8
989 (5x14x14)+9
990 (9x10x11)
991 (9x10x11)+1
992 (9x10x11)+2
993 (9x10x11)+3
994 (9x10x11)+4
995 (9x10x11)+5
996 (9x10x11)+6
997 (9x10x11)+7
998 (9x10x11)+8
999 (9x10x11)+9
1000 (10x10x10)
1001 (7x11x13)
1002 (7x11x13)+1
1003 (7x11x13)+2
1004 (7x11x13)+3
1005 (7x11x13)+4
1006 (7x11x13)+5
1007 (7x11x13)+6
1008 (6x12x14)
1009 (6x12x14)+1
1010 (6x12x14)+2
1011 (6x12x14)+3
1012 (6x12x14)+4
1013 (6x12x14)+5
1014 (6x13x13)
1015 (6x13x13)+1
1016 (6x13x13)+2
1017 (6x13x13)+3
1018 (6x13x13)+4
1019 (6x13x13)+5
1020 (6x13x13)+6
1021 (6x13x13)+7
1022 (6x13x13)+8
1023 (6x13x13)+9
1024 (2x8x8x8)
1025 (2x8x8x8)+1
1026 (2x8x8x8)+2
1027 (2x8x8x8)+3
1028 (2x8x8x8)+4
1029 (3x7x7x7)
1030 (3x7x7x7)+1
1031 (3x7x7x7)+2
1032 (3x7x7x7)+3
1033 (3x7x7x7)+4
1034 (3x7x7x7)+5
1035 (3x7x7x7)+6
1036 (3x7x7x7)+7
1037 (3x7x7x7)+8
1038 (3x7x7x7)+9
1039 (3x7x7x7)+10
1040 (8x10x13)
1041 (8x10x13)+1
1042 (8x10x13)+2
1043 (8x10x13)+3
1044 (8x10x13)+4
1045 (8x10x13)+5
1046 (8x10x13)+6
1047 (8x10x13)+7
1048 (8x10x13)+8
1049 (8x10x13)+9
1050 (5x15x14)
1051 (5x15x14)+1
1052 (5x15x14)+2
1053 (9x9x13)
1054 (9x9x13)+1
1055 (9x9x13)+2
1056 (8x12x11)
1057 (8x12x11)+1
1058 (8x12x11)+2
1059 (8x12x11)+3
1060 (8x12x11)+4
1061 (8x12x11)+5
1062 (8x12x11)+6
1063 (8x12x11)+7
1064 (8x12x11)+8
1065 (8x12x11)+9
1066 (8x12x11)+10
1067 (8x12x11)+11
1068 (8x12x11)+12
1069 (8x12x11)+13
1070 (8x12x11)+14
1071 (8x12x11)+15
1072 (8x12x11)+(2x8)
1073 (8x12x11)+(2x8)+1
1074 (8x12x11)+(3x6)
1075 (8x12x11)+(3x6)+1
1076 (8x12x11)+(2x10)
1077 (8x12x11)+(3x7)
1078 (7x14x11)
1079 (7x14x11)+1
1080 (9x12x10)
1081 (9x12x10)+1
1082 (9x12x10)+2
1083 (9x12x10)+3
1084 (9x12x10)+4
1085 (9x12x10)+5
1086 (9x12x10)+6
1087 (9x12x10)+7
1088 (9x12x10)+8
1089 (9x11x11)
1090 (9x11x11)+1
1091 (9x11x11)+2
1092 (6x14x13)
1093 (6x14x13)+1
1094 (6x14x13)+2
1095 (6x14x13)+3
1096 (6x14x13)+4
1097 (6x14x13)+5
1098 (6x14x13)+6
1099 (6x14x13)+7
1100 (10x10x11)
1101 (10x10x11)+1
1102 (10x10x11)+2
1103 (10x10x11)+3
1104 (10x10x11)+4
1105 (10x10x11)+5
1106 (10x10x11)+6
1107 (10x10x11)+7
1108 (10x10x11)+8
1109 (10x10x11)+9
1110 (10x10x11)+10
1111 (10x10x11)+11
1112 (10x10x11)+12
1113 (10x10x11)+13
1114 (10x10x11)+14
1115 (10x10x11)+15
1116 (10x10x11)+(2x8)
1117 (10x10x11)+(2x8)+1
1118 (10x10x11)+(3x6)
1119 (10x10x11)+(3x6)+1
1120 (8x10x14)
1121 (8x10x14)+1
1122 (8x10x14)+2
1123 (8x10x14)+3
1124 (8x10x14)+4
1125 (5x15x15)
1126 (5x15x15)+1
1127 (5x15x15)+2
1128 (5x15x15)+3
1129 (5x15x15)+4
1130 (5x15x15)+5
1131 (5x15x15)+6
1132 (5x15x15)+7
1133 (5x15x15)+8
1134 (9x9x14)
1135 (9x9x14)+1
1136 (9x9x14)+2
1137 (9x9x14)+3
1138 (9x9x14)+4
1139 (9x9x14)+5
1140 (9x9x14)+6
1141 (9x9x14)+7
1142 (9x9x14)+8
1143 (9x9x14)+9
1144 (8x11x13)
1145 (8x11x13)+1
1146 (8x11x13)+2
1147 (8x11x13)+3
1148 (8x11x13)+4
1149 (8x11x13)+5
1150 (8x11x13)+6
1151 (8x11x13)+7
1152 (8x12x12)
1153 (8x12x12)+1
1154 (8x12x12)+2
1155 (15x7x11)
1156 (15x7x11)+1
1157 (15x7x11)+2
1158 (15x7x11)+3
1159 (15x7x11)+4
1160 (15x7x11)+5
1161 (15x7x11)+6
1162 (15x7x11)+7
1163 (15x7x11)+8
1164 (15x7x11)+9
1165 (15x7x11)+10
1166 (15x7x11)+11
1167 (15x7x11)+12
1168 (15x7x11)+13
1169 (15x7x11)+14
1170 (9x10x13)
1171 (9x10x13)+1
1172 (9x10x13)+2
1173 (9x10x13)+3
1174 (9x10x13)+4
1175 (9x10x13)+5
1176 (6x14x14)
1177 (6x14x14)+1
1178 (6x14x14)+2
1179 (6x14x14)+3
1180 (6x14x14)+4
1181 (6x14x14)+5
1182 (6x14x14)+6
1183 (7x13x13)
1184 (7x13x13)+1
1185 (7x13x13)+2
1186 (7x13x13)+3
1187 (7x13x13)+4
1188 (9x12x11)
1189 (9x12x11)+1
1190 (9x12x11)+2
1191 (9x12x11)+3
1192 (9x12x11)+4
1193 (9x12x11)+5
1194 (9x12x11)+6
1195 (9x12x11)+7
1196 (9x12x11)+8
1197 (9x12x11)+9
1198 (9x12x11)+10
1199 (9x12x11)+11
1200 (12x10x10)
1201 (12x10x10)+1
1202 (12x10x10)+2
1203 (12x10x10)+3
1204 (12x10x10)+4
1205 (12x10x10)+5
1206 (12x10x10)+6
1207 (12x10x10)+7
1208 (12x10x10)+8
1209 (12x10x10)+9
1210 (10x11x11)
1211 (10x11x11)+1
1212 (10x11x11)+2
1213 (10x11x11)+3
1214 (10x11x11)+4
1215 (9x9x15)
1216 (9x9x15)+1
1217 (9x9x15)+2
1218 (9x9x15)+3
1219 (9x9x15)+4
1220 (9x9x15)+5
1221 (9x9x15)+6
1222 (9x9x15)+7
1223 (9x9x15)+8
1224 (9x9x15)+9
1225 (5x5x7x7)
1226 (5x5x7x7)+1
1227 (5x5x7x7)+2
1228 (5x5x7x7)+3
1229 (5x5x7x7)+4
1230 (5x5x7x7)+5
1231 (5x5x7x7)+6
1232 (8x14x11)
1233 (8x14x11)+1
1234 (8x14x11)+2
1235 (8x14x11)+3
1236 (8x14x11)+4
1237 (8x14x11)+5
1238 (8x14x11)+6
1239 (8x14x11)+7
1240 (8x14x11)+8
1241 (8x14x11)+9
1242 (8x14x11)+10
1243 (8x14x11)+11
1244 (8x14x11)+12
1245 (8x14x11)+13
1246 (8x14x11)+14
1247 (8x14x11)+15
1248 (8x12x13)
1249 (8x12x13)+1
1250 (5x5x5x10)
1251 (5x5x5x10)+1
1252 (5x5x5x10)+2
1253 (5x5x5x10)+3
1254 (5x5x5x10)+4
1255 (5x5x5x10)+5
1256 (5x5x5x10)+6
1257 (5x5x5x10)+7
1258 (5x5x5x10)+8
1259 (5x5x5x10)+9
1260 (9x10x14)
1261 (9x10x14)+1
1262 (9x10x14)+2
1263 (9x10x14)+3
1264 (9x10x14)+4
1265 (9x10x14)+5
1266 (9x10x14)+6
1267 (9x10x14)+7
1268 (9x10x14)+8
1269 (9x10x14)+9
1270 (9x10x14)+10
1271 (9x10x14)+11
1272 (9x10x14)+12
1273 (9x10x14)+13
1274 (7x14x13)
1275 (7x14x13)+1
1276 (7x14x13)+2
1277 (7x14x13)+3
1278 (7x14x13)+4
1279 (7x14x13)+5
1280 (2x8x8x10)
1281 (2x8x8x10)+1
1282 (2x8x8x10)+2
1283 (2x8x8x10)+3
1284 (2x8x8x10)+4
1285 (2x8x8x10)+5
1286 (2x8x8x10)+6
1287 (9x11x13)
1288 (9x11x13)+1
1289 (9x11x13)+2
1290 (9x11x13)+3
1291 (9x11x13)+4
1292 (9x11x13)+5
1293 (9x11x13)+6
1294 (9x11x13)+7
1295 (9x11x13)+8
1296 (9x12x12)
1297 (9x12x12)+1
1298 (9x12x12)+2
1299 (9x12x12)+3
1300 (10x10x13)
1301 (10x10x13)+1
1302 (10x10x13)+2
1303 (10x10x13)+3
1304 (10x10x13)+4
1305 (10x10x13)+5
1306 (10x10x13)+6
1307 (10x10x13)+7
1308 (10x10x13)+8
1309 (10x10x13)+9
1310 (10x10x13)+10
1311 (10x10x13)+11
1312 (10x10x13)+12
1313 (10x10x13)+13
1314 (10x10x13)+14
1315 (10x10x13)+15
1316 (10x10x13)+(2x8)
1317 (10x10x13)+(2x8)+1
1318 (10x10x13)+(3x6)
1319 (10x10x13)+(3x6)+1
1320 (12x10x11)
1321 (12x10x11)+1
1322 (12x10x11)+2
1323 (3x9x7x7)
1324 (3x9x7x7)+1
1325 (3x9x7x7)+2
1326 (3x9x7x7)+3
1327 (3x9x7x7)+4
1328 (3x9x7x7)+5
1329 (3x9x7x7)+6
1330 (3x9x7x7)+7
1331 (11x11x11)
1332 (11x11x11)+1
1333 (11x11x11)+2
1334 (11x11x11)+3
1335 (11x11x11)+4
1336 (11x11x11)+5
1337 (11x11x11)+6
1338 (11x11x11)+7
1339 (11x11x11)+8
1340 (11x11x11)+9
1341 (11x11x11)+10
1342 (11x11x11)+11
1343 (11x11x11)+12
1344 (8x12x14)
1345 (8x12x14)+1
1346 (8x12x14)+2
1347 (8x12x14)+3
1348 (8x12x14)+4
1349 (8x12x14)+5
1350 (9x15x10)
1351 (9x15x10)+1
1352 (8x13x13)
1353 (8x13x13)+1
1354 (8x13x13)+2
1355 (8x13x13)+3
1356 (8x13x13)+4
1357 (8x13x13)+5
1358 (8x13x13)+6
1359 (8x13x13)+7
1360 (8x13x13)+8
1361 (8x13x13)+9
1362 (8x13x13)+10
1363 (8x13x13)+11
1364 (8x13x13)+12
1365 (15x7x13)
1366 (15x7x13)+1
1367 (15x7x13)+2
1368 (15x7x13)+3
1369 (15x7x13)+4
1370 (15x7x13)+5
1371 (15x7x13)+6
1372 (7x14x14)
1373 (7x14x14)+1
1374 (7x14x14)+2
1375 (5x5x5x11)
1376 (5x5x5x11)+1
1377 (5x5x5x11)+2
1378 (5x5x5x11)+3
1379 (5x5x5x11)+4
1380 (5x5x5x11)+5
1381 (5x5x5x11)+6
1382 (5x5x5x11)+7
1383 (5x5x5x11)+8
1384 (5x5x5x11)+9
1385 (5x5x5x11)+10
1386 (9x14x11)
1387 (9x14x11)+1
1388 (9x14x11)+2
1389 (9x14x11)+3
1390 (9x14x11)+4
1391 (9x14x11)+5
1392 (9x14x11)+6
1393 (9x14x11)+7
1394 (9x14x11)+8
1395 (9x14x11)+9
1396 (9x14x11)+10
1397 (9x14x11)+11
1398 (9x14x11)+12
1399 (9x14x11)+13
1400 (10x10x14)
1401 (10x10x14)+1
1402 (10x10x14)+2
1403 (10x10x14)+3
1404 (9x12x13)
1405 (9x12x13)+1
1406 (9x12x13)+2
1407 (9x12x13)+3
1408 (2x8x8x11)
1409 (2x8x8x11)+1
1410 (2x8x8x11)+2
1411 (2x8x8x11)+3
1412 (2x8x8x11)+4
1413 (2x8x8x11)+5
1414 (2x8x8x11)+6
1415 (2x8x8x11)+7
1416 (2x8x8x11)+8
1417 (2x8x8x11)+9
1418 (2x8x8x11)+10
1419 (2x8x8x11)+11
1420 (2x8x8x11)+12
1421 (2x8x8x11)+13
1422 (2x8x8x11)+14
1423 (2x8x8x11)+15
1424 (2x8x8x11)+(2x8)
1425 (2x8x8x11)+(2x8)+1
1426 (2x8x8x11)+(3x6)
1427 (2x8x8x11)+(3x6)+1
1428 (2x8x8x11)+(2x10)
1429 (2x8x8x11)+(3x7)
1430 (10x11x13)
1431 (10x11x13)+1
1432 (10x11x13)+2
1433 (10x11x13)+3
1434 (10x11x13)+4
1435 (10x11x13)+5
1436 (10x11x13)+6
1437 (10x11x13)+7
1438 (10x11x13)+8
1439 (10x11x13)+9
1440 (12x12x10)
1441 (12x12x10)+1
1442 (12x12x10)+2
1443 (12x12x10)+3
1444 (12x12x10)+4
1445 (12x12x10)+5
1446 (12x12x10)+6
1447 (12x12x10)+7
1448 (12x12x10)+8
1449 (12x12x10)+9
1450 (12x12x10)+10
1451 (12x12x10)+11
1452 (12x11x11)
1453 (12x11x11)+1
1454 (12x11x11)+2
1455 (12x11x11)+3
1456 (8x14x13)
1457 (8x14x13)+1
1458 (3x9x9x6)
1459 (3x9x9x6)+1
1460 (3x9x9x6)+2
1461 (3x9x9x6)+3
1462 (3x9x9x6)+4
1463 (3x9x9x6)+5
1464 (3x9x9x6)+6
1465 (3x9x9x6)+7
1466 (3x9x9x6)+8
1467 (3x9x9x6)+9
1468 (3x9x9x6)+10
1469 (3x9x9x6)+11
1470 (15x7x14)
1471 (15x7x14)+1
1472 (15x7x14)+2
1473 (15x7x14)+3
1474 (15x7x14)+4
1475 (15x7x14)+5
1476 (15x7x14)+6
1477 (15x7x14)+7
1478 (15x7x14)+8
1479 (15x7x14)+9
1480 (15x7x14)+10
1481 (15x7x14)+11
1482 (15x7x14)+12
1483 (15x7x14)+13
1484 (15x7x14)+14
1485 (9x15x11)
1486 (9x15x11)+1
1487 (9x15x11)+2
1488 (9x15x11)+3
1489 (9x15x11)+4
1490 (9x15x11)+5
1491 (9x15x11)+6
1492 (9x15x11)+7
1493 (9x15x11)+8
1494 (9x15x11)+9
1495 (9x15x11)+10
1496 (9x15x11)+11
1497 (9x15x11)+12
1498 (9x15x11)+13
1499 (9x15x11)+14
1500 (15x10x10)
1501 (15x10x10)+1
1502 (15x10x10)+2
1503 (15x10x10)+3
1504 (15x10x10)+4
1505 (15x10x10)+5
1506 (15x10x10)+6
1507 (15x10x10)+7
1508 (15x10x10)+8
1509 (15x10x10)+9
1510 (15x10x10)+10
1511 (15x10x10)+11
1512 (9x12x14)
1513 (9x12x14)+1
1514 (9x12x14)+2
1515 (9x12x14)+3
1516 (9x12x14)+4
1517 (9x12x14)+5
1518 (9x12x14)+6
1519 (9x12x14)+7
1520 (9x12x14)+8
1521 (9x13x13)
1522 (9x13x13)+1
1523 (9x13x13)+2
1524 (9x13x13)+3
1525 (9x13x13)+4
1526 (9x13x13)+5
1527 (9x13x13)+6
1528 (9x13x13)+7
1529 (9x13x13)+8
1530 (9x13x13)+9
1531 (9x13x13)+10
1532 (9x13x13)+11
1533 (9x13x13)+12
1534 (9x13x13)+13
1535 (9x13x13)+14
1536 (2x8x8x12)
1537 (2x8x8x12)+1
1538 (2x8x8x12)+2
1539 (2x8x8x12)+3
1540 (10x14x11)
1541 (10x14x11)+1
1542 (10x14x11)+2
1543 (10x14x11)+3
1544 (10x14x11)+4
1545 (10x14x11)+5
1546 (10x14x11)+6
1547 (10x14x11)+7
1548 (10x14x11)+8
1549 (10x14x11)+9
1550 (10x14x11)+10
1551 (10x14x11)+11
1552 (10x14x11)+12
1553 (10x14x11)+13
1554 (10x14x11)+14
1555 (10x14x11)+15
1556 (10x14x11)+(2x8)
1557 (10x14x11)+(2x8)+1
1558 (10x14x11)+(3x6)
1559 (10x14x11)+(3x6)+1
1560 (12x10x13)

• Your output does not match the problem. The numbers returned should all be between 1 and 16. – Adriano dos Santos Fernandes Jul 16 at 15:14
• @AdrianodosSantosFernandes They are all specifically numbers that can be factored into products of numbers between 1..16. I'll adjust the output to show this. – user326210 Jul 16 at 16:43