A321455 Number of ways to factor n into factors > 1 all having the same sum of prime indices.
1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3
Offset: 1
Keywords
Examples
The a(1440) = 6 factorizations into factors all having the same sum of prime indices: (10*12*12) (5*6*6*8) (9*10*16) (30*48) (36*40) (1440) The a(900) = 5 multiset partitions with equal block-sums: {{1,1,2,2,3,3}} {{3,3},{1,1,2,2}} {{1,2,3},{1,2,3}} {{1,3},{1,3},{2,2}} {{3},{3},{1,2},{1,2}}
Links
Crossrefs
Programs
-
Mathematica
hwt[n_]:=Total[Cases[FactorInteger[n],{p_,k_}:>PrimePi[p]*k]]; 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],SameQ@@hwt/@#&]],{n,100}]
-
PARI
A056239(n) = if(1==n, 0, my(f=factor(n)); sum(i=1, #f~, f[i, 2] * primepi(f[i, 1]))); all_have_same_sum_of_pis(facs) = if(!#facs, 1, (#Set(apply(A056239,facs)) == 1)); A321455(n, m=n, facs=List([])) = if(1==n, all_have_same_sum_of_pis(facs), my(s=0, newfacs); fordiv(n, d, if((d>1)&&(d<=m), newfacs = List(facs); listput(newfacs,d); s += A321455(n/d, d, newfacs))); (s)); \\ Antti Karttunen, Jan 20 2025
Extensions
Data section extended to a(108) by Antti Karttunen, Jan 20 2025
Comments