login
Greatest sum of run-compression of a permutation of the prime indices of n.
7

%I #9 Jul 08 2024 08:53:22

%S 0,1,2,1,3,3,4,1,2,4,5,4,6,5,5,1,7,5,8,5,6,6,9,4,3,7,2,6,10,6,11,1,7,

%T 8,7,6,12,9,8,5,13,7,14,7,7,10,15,4,4,7,9,8,16,5,8,6,10,11,17,7,18,12,

%U 8,1,9,8,19,9,11,8,20,7,21,13,8,10,9,9,22,5

%N Greatest sum of run-compression of a permutation of the prime indices of n.

%C We define the run-compression of a sequence to be the anti-run obtained by reducing each run of repeated parts to a single part. Alternatively, run-compression removes all parts equal to the part immediately to their left. For example, (1,1,2,2,1) has run-compression (1,2,1).

%C 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.

%F a(n) = A056239(n) iff n belongs to A335433 (the separable case), complement A335448.

%e The prime indices of 24 are {1,1,1,2}, with permutations such as (1,1,2,1) whose run-compression sums to 4, so a(24) = 4.

%e The prime indices of 216 are {1,1,1,2,2,2}, with permutations such as (1,2,1,2,1,2) whose run-compression sums to 9, so a(216) = 9.

%t prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];

%t Table[Max@@(Total[First/@Split[#]]&/@Permutations[prix[n]]),{n,100}]

%Y Positions of first appearances are 1 followed by the primes A000040.

%Y Positions of 1 are A000079 (powers of two) except 1.

%Y Positions of 2 are A000244 (powers of three) except 1.

%Y Positions of 3 are {6} U A000351 (six or powers of five) except 1.

%Y For number of runs instead of sum of run-compression we have A373957.

%Y For prime factors instead of indices we have A374250.

%Y A001221 counts distinct prime factors, A001222 with multiplicity.

%Y A003242 counts run-compressed compositions, i.e., anti-runs.

%Y A007947 (squarefree kernel) represents run-compression of multisets.

%Y A008480 counts permutations of prime factors (or prime indices).

%Y A056239 adds up prime indices, row sums of A112798.

%Y A116861 counts partitions by sum of run-compression.

%Y A304038 lists run-compression of prime indices, sum A066328.

%Y A335433 lists numbers whose prime indices are separable, complement A335448.

%Y A373949 counts compositions by sum of run-compression, opposite A373951.

%Y A374251 run-compresses standard compositions, sum A373953, rank A373948.

%Y Cf. A001223, A001414, A037201, A116608, A124767, A316413, A333755, A340387, A344415, A373954, A374246, A374247.

%K nonn

%O 1,3

%A _Gus Wiseman_, Jul 06 2024