OFFSET
1,2
COMMENTS
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).
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.
This sequence represents the transformation f(P) described by Kimberling at A237685.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
Mathematics Stack Exchange, What is a sequence run? (answered 2011-12-01)
EXAMPLE
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.
MATHEMATICA
Table[Times@@Prime/@Cases[If[n==1, {}, FactorInteger[n]], {p_, k_}:>PrimePi[p]*k], {n, 100}]
PROG
(PARI)
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); };
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
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Gus Wiseman, May 23 2022
EXTENSIONS
More terms from Antti Karttunen, Jan 20 2025
STATUS
approved