A353835 Number of distinct run-sums of the prime indices of n.
0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 1, 2, 2, 2, 2, 1, 2, 2, 1, 1, 3, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 1, 2, 3, 1, 2, 2, 3, 1, 2, 1, 2, 2, 2, 2, 3, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 1, 3, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 3, 1, 2, 3
Offset: 1
Keywords
Examples
The prime indices of 3780 are {1,1,2,2,2,3,4}, with distinct run-sums {2,3,4,6}, so a(3780) = 4. The prime indices of 8820 are {1,1,2,2,3,4,4}, with distinct run-sums {2,3,4,8}, so a(8820) = 4. The prime indices of 13860 are {1,1,2,2,3,4,5}, with distinct run-sums {2,3,4,5}, so a(13860) = 4. The prime indices of 92400 are {1,1,1,1,2,3,3,4,5}, with distinct run-sums {2,4,5,6}, so a(92400) = 4.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
- Mathematics Stack Exchange, What is a sequence run? (answered 2011-12-01)
- Index entries for sequences related to prime indices in the factorization of n.
Crossrefs
Positions of first appearances are A002110.
A version for binary expansion is A165413.
The version for compositions is A353849.
The weak version is A353861.
A005811 counts runs in binary expansion.
A351014 counts distinct runs in standard compositions.
A353832 represents the operation of taking run-sums of a partition.
Programs
-
Mathematica
Table[Length[Union[Cases[If[n==1,{},FactorInteger[n]],{p_,k_}:>PrimePi[p]*k]]],{n,100}]
-
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))); A353835(n) = omega(A353832(n)); \\ Antti Karttunen, Jan 20 2025
Formula
Extensions
Data section extended to a(105) by Antti Karttunen, Jan 20 2025
Comments