A305501 Number of connected components of the integer partition y + 1 where y is the integer partition with Heinz number n.
0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 3, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 1, 2, 2, 2, 2, 3, 1, 1, 1, 1, 1, 3, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 2, 1, 1, 1, 2, 1, 2, 3
Offset: 1
Keywords
Examples
The "prime index plus 1" multiset of 7410 is {2,3,4,7,9}, with connected components {{2,4},{3,9},{7}}, so a(7410) = 3.
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[Union[Append[Delete[s,List/@c[[1]]],LCM@@s[[c[[1]]]]]]]]]; Table[Length[zsm[primeMS[n]+1]],{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); }; A305501(n) = { my(cs = apply(p -> 1+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 09 2018
Extensions
More terms from Antti Karttunen, Nov 09 2018
Comments