OFFSET
1,4
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
FORMULA
From Andrew Howroyd, Dec 10 2018:(Start)
a(p) = 1 for prime(p).
a(prime(i)*prime(j)) = min(i,j) + 1.
a(prime(n)^k) = A188392(n,k). (End)
EXAMPLE
The a(12) = 6 set multipartitions of {1,1,2,3}:
{{1},{1,2,3}}
{{1,2},{1,3}}
{{1},{1},{2,3}}
{{1},{2},{1,3}}
{{1},{3},{1,2}}
{{1},{1},{2},{3}}
MATHEMATICA
nrmptn[n_]:=Join@@MapIndexed[Table[#2[[1]], {#1}]&, If[n==1, {}, Flatten[Cases[FactorInteger[n]//Reverse, {p_, k_}:>Table[PrimePi[p], {k}]]]]];
sqfacs[n_]:=If[n<=1, {{}}, Join@@Table[Map[Prepend[#, d]&, Select[sqfacs[n/d], Min@@#>=d&]], {d, Select[Rest[Divisors[n]], SquareFreeQ]}]];
Table[Length[sqfacs[Times@@Prime/@nrmptn[n]]], {n, 80}]
PROG
(PARI)
permcount(v) = {my(m=1, s=0, k=0, t); for(i=1, #v, t=v[i]; k=if(i>1&&t==v[i-1], k+1, 1); m*=t*k; s+=t); s!/m}
sig(n)={my(f=factor(n)); concat(vector(#f~, i, vector(f[i, 2], j, primepi(f[i, 1]))))}
count(sig)={my(n=vecsum(sig), s=0); forpart(p=n, my(q=prod(i=1, #p, 1 + x^p[i] + O(x*x^n))); s+=prod(i=1, #sig, polcoef(q, sig[i]))*permcount(p)); s/n!}
a(n)={if(n==1, 1, my(s=sig(n)); if(#s<=2, if(#s==1, 1, min(s[1], s[2])+1), count(sig(n))))} \\ Andrew Howroyd, Dec 10 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 24 2018
STATUS
approved