login
Let Dedekind's psi(m) = product of (p+1)p^(e-1) for primes p, where p^e is a factor of m. Iterating psi(m) eventually results in a number of form 2^a*3^b. a(n) is the number of steps to reach such a number.
5

%I #25 Jan 18 2020 08:47:36

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

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

%U 1,1,1,0,4,3,2,2,1,2,2,1,0,2,2,1,1,2,2,1,2,1,2,1,1,1,2,0,3,2,1

%N Let Dedekind's psi(m) = product of (p+1)p^(e-1) for primes p, where p^e is a factor of m. Iterating psi(m) eventually results in a number of form 2^a*3^b. a(n) is the number of steps to reach such a number.

%C a(A019268(n)) = n and a(m) <> n for m < A019268(n). [_Reinhard Zumkeller_, Apr 12 2012]

%D Peter Giblin, "Primes and Programming - an Introduction to Number Theory with Computation", page 118.

%D R. K. Guy, "Unsolved Problems in Number Theory", section B41.

%H Reinhard Zumkeller, <a href="/A019269/b019269.txt">Table of n, a(n) for n = 1..10000</a>

%t psi[n_] := Module[{pp, ee}, {pp, ee} = Transpose[FactorInteger[n]]; If[Max[pp] == 3, n, Times @@ (pp+1)*Times @@ (pp^(ee-1))]];

%t a[n_] := Length[NestWhileList[psi, n, FactorInteger[#][[-1, 1]] > 3&]] - 1;

%t a /@ Range[99] (* _Jean-François Alcover_, Jan 18 2020 *)

%o (Haskell)

%o a019269 n = snd $ until ((== 1) . a065333 . fst)

%o (\(x, i) -> (a001615 x, i+1)) (n, 0)

%o -- _Reinhard Zumkeller_, Apr 12 2012

%Y Cf. A001615, A065333.

%K nonn

%O 1,13

%A _Jud McCranie_