login
A360555
Two times the median of the first differences of the 0-prepended prime indices of n > 1.
20
2, 4, 1, 6, 2, 8, 0, 2, 3, 10, 2, 12, 4, 3, 0, 14, 2, 16, 2, 4, 5, 18, 1, 3, 6, 0, 2, 20, 2, 22, 0, 5, 7, 4, 1, 24, 8, 6, 1, 26, 2, 28, 2, 2, 9, 30, 0, 4, 2, 7, 2, 32, 1, 5, 1, 8, 10, 34, 2, 36, 11, 4, 0, 6, 2, 38, 2, 9, 2, 40, 0, 42, 12, 2, 2, 5, 2, 44, 0, 0
OFFSET
2,1
COMMENTS
The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length). Since the denominator is always 1 or 2, the median can be represented as an integer by multiplying by 2.
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.
EXAMPLE
The 0-prepended prime indices of 1617 are {0,2,4,4,5}, with sorted differences {0,1,2,2}, with median 3/2, so a(1617) = 3.
MATHEMATICA
prix[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Table[2*Median[Differences[Prepend[prix[n], 0]]], {n, 2, 100}]
CROSSREFS
The version for divisors is A063655.
Differences of 0-prepended prime indices are listed by A287352.
The version for prime indices is A360005.
The version for distinct prime indices is A360457.
The version for distinct prime factors is A360458.
The version for prime factors is A360459.
The version for prime multiplicities is A360460.
Positions of even terms are A360556
Positions of odd terms are A360557
Positions of 0's are A360558, counted by A360254.
For mean instead of two times median we have A360614/A360615.
A112798 lists prime indices, length A001222, sum A056239.
A325347 counts partitions with integer median, complement A307683.
A326567/A326568 gives mean of prime indices.
A359893 and A359901 count partitions by median, odd-length A359902.
Sequence in context: A171233 A362004 A096907 * A249146 A225679 A375494
KEYWORD
nonn
AUTHOR
Gus Wiseman, Feb 14 2023
STATUS
approved