login
Number of iterations of A253629 needed for n to reach 2.
1

%I #12 Mar 10 2015 18:59:08

%S 0,2,1,3,2,3,2,4,3,4,3,4,3,5,3,5,4,5,4,5,4,5,4,6,4,6,4,6,5,5,4,6,5,6,

%T 5,6,5,6,5,6,5,6,5,7,5,6,5,6,6,7,5,7,6,7,5,7,6,7,6,6,5,7,5,7,6,7,6,7,

%U 6,7,6,7,6,8,6,7,6,7,6,8,6,7,6,8,6,8,6

%N Number of iterations of A253629 needed for n to reach 2.

%C If x or y is odd, then a(xy) = a(x) + a(y).

%C If x and y are both even, then a(xy) = a(x) + a(y) + 1.

%C Equivalently, if we define a function D by D(x) = a(x) if x is odd and D(x) = a(x) + 1 if x is even, then D is completely additive.

%H Colin Defant, <a href="http://arxiv.org/abs/1501.00971">An arithmetic function arising from the Dedekind psi function</a>, arXiv:1501.00971 [math.NT], 2015.

%t L[n_] := If[EvenQ[n], (1/3) If[n > 1, n Times @@ (1 + 1/(Select[Divisors[n], PrimeQ])), 1], If[n > 1, n Times @@ (1 + 1/(Select[Divisors[n], PrimeQ])), 1]]; Table[Length@NestWhileList[L, n, # != 1 &] - 2, {n, 2, 260}]

%o (PARI) a253629(n) = my(f=factor(n)); prod(i=1, #f~, f[i, 1]^(f[i, 2]-1)*if(f[i, 1]>2, f[i, 1]+1, 1)) ;

%o a(n) = my(nb = 0); my(m = n); while(m != 2, m = a253629(m); nb++); nb; \\ _Michel Marcus_, Jan 21 2015

%Y Cf. A253629.

%K nonn

%O 2,2

%A _Colin Defant_, Jan 06 2015