A381995 Number of ways to partition the prime indices of n into constant blocks with a common sum.
1, 1, 1, 2, 1, 0, 1, 2, 2, 0, 1, 1, 1, 0, 0, 3, 1, 0, 1, 0, 0, 0, 1, 0, 2, 0, 2, 0, 1, 0, 1, 2, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 4, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 3, 0, 1, 0, 0, 0, 0
Offset: 1
Keywords
Examples
The prime indices of 144 are {1,1,1,1,2,2}, with the following 2 multiset partitions into constant blocks with a common sum: {{2,2},{1,1,1,1}} {{2},{2},{1,1},{1,1}} so a(144) = 2.
Crossrefs
Programs
-
Mathematica
prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]; sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]& /@ sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}]; mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]& /@ sps[Range[Length[set]]]]; Table[Length[Select[mps[prix[n]], SameQ@@Total/@#&&And@@SameQ@@@#&]],{n,100}]
Comments