A325355 One plus the number of steps applying A325351 (Heinz number of augmented differences of reversed prime indices) to reach a fixed point.
1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 4, 1, 1, 1, 2, 1, 2, 1, 1, 3, 1, 1, 5, 1, 4, 2, 1, 1, 6, 1, 1, 4, 1, 1, 3, 1, 1, 1, 2, 2, 7, 1, 1, 2, 3, 1, 8, 1, 1, 3, 1, 1, 4, 1, 5, 5, 1, 1, 9, 4, 1, 2, 1, 1, 3, 1, 5, 6, 1, 1, 2, 1, 1, 4, 4, 1, 10, 1, 1, 3, 5, 1, 11, 1, 6, 1, 1, 2, 5, 2, 1, 7, 1, 1, 3
Offset: 1
Keywords
Examples
Repeatedly applying A325351 starting with 78 gives 78 -> 66 -> 42 -> 30 -> 18 -> 12, and 12 is a fixed point, so a(78) = 6.
Links
Crossrefs
Programs
-
Mathematica
primeptn[n_]:=If[n==1,{},Reverse[Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]]; aug[y_]:=Table[If[i
-
PARI
augdiffs(n) = { my(diffs=List([]), f=factor(n), prevpi, pi=0, i=#f~); while(i, prevpi=pi; pi = primepi(f[i, 1]); if(prevpi, listput(diffs, 1+(prevpi-pi))); if(f[i, 2]>1, f[i, 2]--, i--)); if(pi, listput(diffs,pi)); Vec(diffs); }; A325351(n) = factorback(apply(prime,augdiffs(n))); A325355(n) = { my(u=A325351(n)); if(u==n,1,1+A325355(u)); }; \\ Antti Karttunen, Nov 16 2019
Extensions
More terms from Antti Karttunen, Nov 16 2019
Comments