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.
A weak run-sum of a sequence is the sum of any consecutive constant subsequence.
LINKS
EXAMPLE
The prime indices of 72 are {1,1,1,2,2}, with weak runs {}, {1}, {1,1}, {1,1,1}, {2}, {2,2}, which have sums 0, 1, 2, 3, 2, 4, of which 5 are distinct, so a(72) = 5.
MATHEMATICA
Table[Length[Union@@Cases[FactorInteger[n], {p_, k_}:>Range[0, k]*PrimePi[p]]], {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); };
A353861(n) = if(1==n, n, my(pruns = pis_to_runs(n), runsum = 0, runsums = List([])); for(i=1, #pruns, listput(runsums, runsum); if((i>1) && pruns[i] == pruns[i-1], runsum += pruns[i], runsum = pruns[i])); listput(runsums, runsum); #Set(runsums)); \\ Antti Karttunen, Jan 20 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 23 2022
EXTENSIONS
Data section extended to a(108) by Antti Karttunen, Jan 20 2025
STATUS
approved