OFFSET
1,2
COMMENTS
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).
EXAMPLE
The terms together with their prime indices begin:
1: {}
2: {1}
9: {2,2}
54: {1,2,2,2}
100: {1,1,3,3}
120: {1,1,1,2,3}
125: {3,3,3}
135: {2,2,2,3}
168: {1,1,1,2,4}
180: {1,1,2,2,3}
189: {2,2,2,4}
240: {1,1,1,1,2,3}
For example, the prime indices of 336 are {1,1,1,1,2,4} with median 1 and multiplicities {1,1,4} with median 1, so 336 is in the sequence.
MATHEMATICA
prix[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Select[Range[1000], Median[prix[#]]==Median[Length/@Split[prix[#]]]&]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Feb 10 2023
STATUS
approved