A363942 High median in the multiset of prime indices of n.
0, 1, 2, 1, 3, 2, 4, 1, 2, 3, 5, 1, 6, 4, 3, 1, 7, 2, 8, 1, 4, 5, 9, 1, 3, 6, 2, 1, 10, 2, 11, 1, 5, 7, 4, 2, 12, 8, 6, 1, 13, 2, 14, 1, 2, 9, 15, 1, 4, 3, 7, 1, 16, 2, 5, 1, 8, 10, 17, 2, 18, 11, 2, 1, 6, 2, 19, 1, 9, 3, 20, 1, 21, 12, 3, 1, 5, 2, 22, 1, 2
Offset: 1
Keywords
Examples
The prime indices of 90 are {1,2,2,3}, with high median 2, so a(90) = 2. The prime indices of 150 are {1,2,3,3}, with high median 3, so a(150) = 3.
Crossrefs
Programs
-
Mathematica
prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]; merr[y_]:=If[Length[y]==0,0, If[OddQ[Length[y]],y[[(Length[y]+1)/2]],y[[1+Length[y]/2]]]]; Table[merr[prix[n]],{n,100}]
Comments