login
Number of steps to reach a fixed point starting with n and repeatedly taking the quotient by the maximum stable divisor (A327393, A327402).
2

%I #13 Jan 28 2025 16:55:02

%S 0,1,1,1,1,2,1,1,1,2,1,2,1,2,1,1,1,2,1,2,2,2,1,2,1,2,1,2,1,2,1,1,1,2,

%T 1,2,1,2,2,2,1,3,1,2,1,2,1,2,1,2,1,2,1,2,1,2,2,2,1,2,1,2,2,1,2,2,1,2,

%U 1,2,1,2,1,2,1,2,1,3,1,2,1,2,1,3,1,2,2,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,2

%N Number of steps to reach a fixed point starting with n and repeatedly taking the quotient by the maximum stable divisor (A327393, A327402).

%C 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 number is stable if its distinct prime indices are pairwise indivisible. Stable numbers are listed in A316476. The maximum stable divisor of n is A327393(n).

%H Antti Karttunen, <a href="/A327403/b327403.txt">Table of n, a(n) for n = 1..20000</a>

%H Gus Wiseman, <a href="https://docs.google.com/document/d/e/2PACX-1vSX9dPMGJhxB8rOknCGvOs6PiyhupdWNpqLsnphdgU6MEVqFBnWugAXidDhwHeKqZe_YnUqYeGOXsOk/pub">Sequences counting and encoding certain classes of multisets</a>

%H <a href="/index/Pri#prime_indices">Index entries for sequences related to prime indices in the factorization of n</a>.

%e We have 798 -> 42 -> 6 -> 2 -> 1, so a(798) = 4.

%t stableQ[u_,Q_]:=!Apply[Or,Outer[#1=!=#2&&Q[#1,#2]&,u,u,1],{0,1}];

%t Table[Length[FixedPointList[#/Max[Select[Divisors[#],stableQ[PrimePi/@First/@FactorInteger[#],Divisible]&]]&,n]]-2,{n,100}]

%o (PARI) A327403(n) = for(k=0,oo,my(nextn=A327402(n)); if(nextn==n,return(k)); n = nextn); \\ _Antti Karttunen_, Jan 28 2025

%Y See link for additional cross-references.

%Y Positions of first appearance of each integer are A325782.

%Y Cf. A000005, A303362, A323014, A327393, A327402.

%K nonn

%O 1,6

%A _Gus Wiseman_, Sep 15 2019

%E Data section extended to a(105) by _Antti Karttunen_, Jan 28 2025