Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #19 Jan 20 2025 16:22:24
%S 1,2,3,3,5,6,7,5,7,10,11,9,13,14,15,7,17,14,19,15,21,22,23,15,13,26,
%T 13,21,29,30,31,11,33,34,35,21,37,38,39,25,41,42,43,33,35,46,47,21,19,
%U 26,51,39,53,26,55,35,57,58,59,45,61,62,49,13,65,66,67,51,69,70,71,35,73,74,39,57,77,78,79,35,19
%N Heinz number of the multiset of run-sums of the prime indices of n.
%C The sequence of runs of a sequence consists of its maximal consecutive constant subsequences when read left-to-right. For example, the runs of (2,2,1,1,1,3,2,2) are (2,2), (1,1,1), (3), (2,2), with sums (4,3,3,4).
%C The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
%C This sequence represents the transformation f(P) described by Kimberling at A237685.
%H Antti Karttunen, <a href="/A353832/b353832.txt">Table of n, a(n) for n = 1..20000</a>
%H Mathematics Stack Exchange, <a href="https://math.stackexchange.com/q/87559">What is a sequence run? (answered 2011-12-01)</a>
%H <a href="/index/Pri#prime_indices">Index entries for sequences related to prime indices in the factorization of n</a>.
%F A001222(a(n)) = A001221(n).
%F A001221(a(n)) = A353835(n).
%F A061395(a(n)) = A353862(n).
%e The prime indices of 1260 are {1,1,2,2,3,4}, with run-sums (2,4,3,4), and the multiset {2,3,4,4} has Heinz number 735, so a(1260) = 735.
%t Table[Times@@Prime/@Cases[If[n==1,{},FactorInteger[n]],{p_,k_}:>PrimePi[p]*k],{n,100}]
%o (PARI)
%o pis_to_runs(n) = { my(runs=List([]), f=factor(n)); for(i=1,#f~,while(f[i,2], listput(runs,primepi(f[i,1])); f[i,2]--)); (runs); };
%o A353832(n) = if(1==n,n,my(pruns = pis_to_runs(n), m=1, runsum=pruns[1]); for(i=2,#pruns,if(pruns[i] == pruns[i-1], runsum += pruns[i], m *= prime(runsum); runsum = pruns[i])); (m*prime(runsum))); \\ _Antti Karttunen_, Jan 20 2025
%Y The number of distinct prime factors of a(n) is A353835, weak A353861.
%Y The version for compositions is A353847, listed A353932.
%Y The greatest prime factor of a(n) has index A353862, least A353931.
%Y A001222 counts prime factors, distinct A001221.
%Y A056239 adds up prime indices, row sums of A112798 and A296150.
%Y A300273 ranks collapsible partitions, counted by A275870.
%Y A353833 ranks partitions with all equal run-sums, counted by A304442.
%Y A353838 ranks partitions with all distinct run-sums, counted by A353837.
%Y A353840-A353846 pertain to partition run-sum trajectory.
%Y A353851 counts compositions w/ all equal run-sums, ranked by A353848.
%Y A353864 counts rucksack partitions, ranked by A353866.
%Y A353865 counts perfect rucksack partitions, ranked by A353867.
%Y Cf. A005811, A047966, A071625, A073093, A181819, A182850, A182857, A304660, A323014, A353834, A353839, A353841 (1 + iterations needed to reach a squarefree number).
%K nonn,changed
%O 1,2
%A _Gus Wiseman_, May 23 2022
%E More terms from _Antti Karttunen_, Jan 20 2025