A353841 Length of the trajectory of the partition run-sum transformation of n, using Heinz numbers; a(1) = 0.
0, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 3, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 3, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 4, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 3
Offset: 1
Keywords
Examples
The trajectory for a(1080) = 4 is the following, with prime indices shown on the right: 1080: {1,1,1,2,2,2,3} 325: {3,3,6} 169: {6,6} 37: {12} The trajectory for a(87780) = 5 is the following, with prime indices shown on the right: 87780: {1,1,2,3,4,5,8} 65835: {2,2,3,4,5,8} 51205: {3,4,4,5,8} 19855: {3,5,8,8} 2915: {3,5,16} The trajectory for a(39960) = 5 is the following, with prime indices shown on the right: 39960: {1,1,1,2,2,2,3,12} 12025: {3,3,6,12} 6253: {6,6,12} 1369: {12,12} 89: {24}
Links
Crossrefs
Positions of 1's are A005117.
Positions of first appearances are A353743.
These are the row-lengths of A353840.
Counting partitions by this statistic gives A353846.
A005811 counts runs in binary expansion.
A318928 gives runs-resistance of binary expansion.
A353832 represents the operation of taking run-sums of a partition.
Programs
-
Mathematica
Table[If[n==1,0,Length[NestWhileList[Times@@Prime/@Cases[If[#==1,{},FactorInteger[#]],{p_,k_}:>PrimePi[p]*k]&,n,!SquareFreeQ[#]&]]],{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))); A353841(n) = if(1==n,0,for(i=1,oo,if(issquarefree(n), return(i), n = A353832(n)))); \\ Antti Karttunen, Jan 20 2025
Formula
a(1) = 0, and for n > 1, if A008966(n) = 1 [n is in A005117], a(n) = 1, otherwise a(n) = 1+a(A353832(n)). [See comments] - Antti Karttunen, Jan 20 2025
Extensions
More terms from Antti Karttunen, Jan 20 2025
Comments