OFFSET
1,4
COMMENTS
Also the number of factorizations of n into factors > 1 which form a knapsack partition.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10080
Antti Karttunen, Data supplement: n, a(n) computed for n = 1..100000
EXAMPLE
The a(24) = 7 factorizations are (2*2*2*3), (2*2*6), (2*3*4), (2*12), (3*8), (4*6), (24).
The a(54) = 6 factorizations are (2*3*3*3), (2*3*9), (2*27), (3*18), (6*9), (54).
MATHEMATICA
facs[n_]:=If[n<=1, {{}}, Join@@Table[Map[Prepend[#, d]&, Select[facs[n/d], Min@@#>=d&]], {d, Rest[Divisors[n]]}]];
Table[Length[Select[facs[n], UnsameQ@@Total/@Union[Subsets[#]]&]], {n, 100}]
PROG
(PARI)
primeprodbybits(v, b) = { my(m=1, i=1); while(b>0, if(b%2, m *= prime(v[i])); i++; b >>= 1); (m); };
sumbybits(v, b) = { my(s=0, i=1); while(b>0, s += (b%2)*v[i]; i++; b >>= 1); (s); };
all_distinct_subsets_have_different_sums(v) = { my(m=Map(), s, pp); for(i=0, (2^#v)-1, pp = primeprodbybits(v, i); s = sumbybits(v, i); if(mapisdefined(m, s), if(mapget(m, s)!=pp, return(0)), mapput(m, s, pp))); (1); };
A316365(n, m=n, facs=List([])) = if(1==n, all_distinct_subsets_have_different_sums(Vec(facs)), my(s=0, newfacs); fordiv(n, d, if((d>1)&&(d<=m), newfacs = List(facs); listput(newfacs, d); s += A316365(n/d, d, newfacs))); (s)); \\ Antti Karttunen, Oct 08 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 30 2018
EXTENSIONS
More terms from Antti Karttunen, Oct 08 2018
STATUS
approved