This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A049115 #33 Aug 28 2021 06:44:59 %S A049115 0,0,1,0,1,1,2,0,2,1,2,1,2,2,1,0,1,2,3,1,2,2,3,1,2,2,3,2,3,1,2,0,2,1, %T A049115 2,2,3,3,2,1,2,2,3,2,2,3,4,1,3,2,1,2,3,3,2,2,3,3,4,1,2,2,3,0,2,2,3,1, %U A049115 3,2,3,2,3,3,2,3,2,2,3,1,4,2,3,2,1,3,3,2,3,2,3,3,2,4,3,1,2,3,2,2,3,1,2,2,2 %N A049115 a(n) is the number of iterations of the Euler phi function needed to reach a power of 2, when starting from n. %C A049115 a(n) = A227944(n) if n is not a power of 2. - _Eric M. Schmidt_, Oct 13 2013 %H A049115 T. D. Noe, <a href="/A049115/b049115.txt">Table of n, a(n) for n = 1..10000</a> %F A049115 The smallest x so that Nest[ EulerPhi, n, x ] = 2^w is just achieved. %F A049115 From _Antti Karttunen_, Aug 28 2021: (Start) %F A049115 If A209229(n) = 1, then a(n) = 0, otherwise a(n) = 1 + a(A000010(n)). %F A049115 a(n) <= A003434(n) and a(n) <= A329697(n) for all n. %F A049115 (End) %e A049115 If n is a power of 2, then a(n)=0 by definition. If n = 59049, then by iterating with phi, we get 59049 -> 39366 -> 13122 -> 4374 -> 1458 -> 486 -> 162 -> 54 -> 18 -> 6 -> 2 -> 1. It took ten steps to reach the first power of 2 (2 in this case), so a(59049) = 10. %t A049115 Table[If[IntegerQ@ Log2@ n, 0, -1 + Length@ NestWhileList[EulerPhi, n, ! IntegerQ@ Log2@ # &]], {n, 105}] (* _Michael De Vlieger_, Aug 01 2017 *) %o A049115 (PARI) A049115(n) = if(!bitand(n,n-1),0,1+A049115(eulerphi(n))); \\ _Antti Karttunen_, Aug 28 2021 %Y A049115 Cf. A000010, A003434, A049113, A057716, A209229, A227944. %Y A049115 Cf. also A064097, A064415, A329697. %K A049115 nonn %O A049115 1,7 %A A049115 _Labos Elemer_ %E A049115 Definition corrected and simplified, example corrected by _Antti Karttunen_, Aug 28 2021