A305079 Number of connected components of the integer partition with Heinz number n.
0, 1, 1, 2, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 2, 4, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 3, 1, 5, 2, 2, 2, 3, 1, 2, 1, 4, 1, 2, 1, 3, 2, 2, 1, 5, 1, 2, 2, 3, 1, 2, 2, 4, 1, 2, 1, 4, 1, 2, 1, 6, 1, 3, 1, 3, 2, 3, 1, 4, 1, 2, 2, 3, 2, 2, 1, 5, 1, 2, 1, 3, 2, 2, 1
Offset: 1
Keywords
Examples
The a(315) = 2 connected components of {2,2,3,4} are {{3},{2,2,4}}.
Links
Crossrefs
Programs
-
Mathematica
primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]; zsm[s_]:=With[{c=Select[Tuples[Range[Length[s]],2],And[Less@@#,GCD@@s[[#]]]>1&]},If[c=={},s,zsm[Sort[Append[Delete[s,List/@c[[1]]],LCM@@s[[c[[1]]]]]]]]]; Table[Length[zsm[primeMS[n]]],{n,100}]
-
PARI
zero_first_elem_and_connected_elems(ys) = { my(cs = List([ys[1]]), i=1); ys[1] = 0; while(i<=#cs, for(j=2,#ys,if(ys[j]&&(1!=gcd(cs[i],ys[j])), listput(cs,ys[j]); ys[j] = 0)); i++); (ys); }; A007814(n) = valuation(n,2); A000265(n) = (n/2^A007814(n)); A305079(n) = if(!(n%2),A007814(n)+A305079(A000265(n)), my(cs = apply(p -> primepi(p),factor(n)[,1]~), s=0); while(#cs, cs = select(c -> c, zero_first_elem_and_connected_elems(cs)); s++); (s)); \\ Antti Karttunen, Nov 10 2018
Formula
For all n, k > 0, we have a(2^n * k) = n + a(k).
For all x, y > 0, we have a(x * y) <= a(x) + a(y).
For x, y > 0 strongly coprime, we have a(x * y) = a(x) + a(y). Strongly coprime means every prime index of x is coprime to every prime index of y, where a prime index of n is a number m such that prime(m) divides n.
Extensions
Terms and Mathematica program corrected by Gus Wiseman, Nov 10 2018
Comments