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 A347387 #14 Jan 30 2022 23:04:04 %S A347387 0,1,2,2,2,2,3,3,2,2,2,2,3,3,2,4,2,2,2,2,5,2,2,2,2,3,2,3,2,2,5,5,2,2, %T A347387 2,2,2,2,3,2,5,5,2,2,2,2,2,2,3,2,2,3,2,2,2,3,2,2,2,2,5,5,2,6,5,2,2,2, %U A347387 2,2,2,2,2,2,2,2,2,3,2,2,2,5,5,5,2,2,2,2,2,2,3,2,7,2,2,2,3,3,2,2,2,2,3,3,2 %N A347387 The exponent of the first power of 2 reached when starting iterating A347385 from n, where A347385 is Dedekind psi function applied to the odd part of n. %H A347387 Antti Karttunen, <a href="/A347387/b347387.txt">Table of n, a(n) for n = 1..65537</a> %F A347387 a(2^k) = k, and for numbers with A209229(n) = 0, a(n) = a(A001615(A000265(n))). %t A347387 f[p_, e_] := If[p == 2, 1, (p + 1)*p^(e - 1)]; psiOdd[1] = 1; psiOdd[n_] := Times @@ f @@@ FactorInteger[n]; a[n_] := IntegerExponent[NestWhile[psiOdd, n, # != 2^IntegerExponent[#, 2] &], 2]; Array[a, 100] (* _Amiram Eldar_, Aug 31 2021 *) %o A347387 (PARI) %o A347387 A347385(n) = if(1==n,n, my(f=factor(n>>valuation(n, 2))); prod(i=1, #f~, f[i, 1]^f[i, 2] + f[i, 1]^(f[i, 2]-1))); %o A347387 A347387(n) = if(!bitand(n, n-1), valuation(n, 2), A347387(A347385(n))); %Y A347387 Cf. A000265, A001615, A007814, A209229, A347385, A347386. %Y A347387 Cf. also A049113, A347388. %K A347387 nonn %O A347387 1,3 %A A347387 _Antti Karttunen_, Aug 31 2021