# The challenge

Given positive integer input n (n>1), calculate the array of unique factorizations of n, not including 1. Order does not matter.

## Test cases

2 => [[2]]
3 => [[3]]
4 => [[4],[2,2]]
5 => [[5]]
6 => [[6],[2,3]]
7 => [[7]]
8 => [[8],[2,2,2],[2,4]]
9 => [[9],[3,3]]
10 => [[10],[2,5]]
11 => [[11]]
12 => [[12],[3,4],[3,2,2],[2,6]]


## Scoring

This is code-golf, so lowest byte count wins!

## marked as duplicate by nimi code-golf StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Aug 20 '17 at 5:15

• Shouldn't 8 have [2, 4]? – notjagan Aug 20 '17 at 1:04
• Yeah, I was dumb. It should also have [2,2,2] – Zacharý Aug 20 '17 at 1:04
• Oddly enough this is quite useful for solving a kenken puzzle – Conor O'Brien Aug 20 '17 at 3:15
• I never saw the problem this was a duplicate of, but it still isn't an exact duplicate: this doesn't require 1, but it IS close enough to be a dupe, now that I see it. – Zacharý Aug 20 '17 at 12:09

# Jelly, 10 bytes

ÆfŒṖP€€Ṣ€Q


Try it online!

ÆfŒṖP€€Ṣ€Q
Æf          - prime factorization
ŒṖ        - all partitions
P€€     - Product of each sub-partition
Ṣ€   - Sort each
Q  - Remove duplicates

• Accepted, since the post is closed anyways. – Zacharý Aug 23 '17 at 21:06

# Pyth, 9 14 bytes

{mS*Mds./M.pP


Try it online!

### How it works

{mS*Mds./M.pP
P    Prime factorization of [the input]
.p     All permutations of the prime factorization
./M       All partitions of each permutation
s          Flattened by one level
m               For each partition:
*Md               Take the product of each piece
S                  Sort the products
{                De-duplicate.

• I don't grok Pyth, could you provide an explanation? – Zacharý Aug 20 '17 at 1:07
• @Zacharý Added. – notjagan Aug 20 '17 at 1:10
• This fails on the input 30, since Pyth's ./ only gives sequential partitions. ([3, 10] is absent). I should add something that works like this. – isaacg Aug 20 '17 at 2:34
• @isaacg Aw, that's unfortunate. Fixed for 5 bytes. – notjagan Aug 20 '17 at 2:45