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 A336916 #11 Apr 01 2024 02:39:40 %S A336916 0,0,2,0,3,1,3,0,2,2,4,1,4,2,2,0,5,1,5,1,2,3,5,1,3,3,2,1,5,1,5,0,2,4, %T A336916 2,1,6,4,2,1,6,1,6,2,2,4,6,1,3,2,2,2,6,1,3,1,2,4,6,1,6,4,2,0,3,1,7,3, %U A336916 2,1,7,1,7,5,2,3,3,1,7,1,2,5,7,1,3,5,2,1,7,1,3,3,2,5,3,1,7,2,2,1,7,1,7,1,2 %N A336916 One more than the number of iterations of x -> 2x needed before the result is nondeficient, when starting from x=n; a(n) = 0, when n is a power of 2. %C A336916 See comments in A336915. %H A336916 Antti Karttunen, <a href="/A336916/b336916.txt">Table of n, a(n) for n = 1..65537</a> %t A336916 a[n_] := Module[{e = IntegerExponent[n, 2], s}, If[n == 2^e, 0, s = DivisorSigma[-1, n/2^e]; Max[Ceiling[Log2[s/(s - 1)]] - e, 1]]]; Array[a, 100] (* _Amiram Eldar_, Apr 01 2024 *) %o A336916 (PARI) A336916(n) = if(!bitand(n,n-1), 0, for(i=1,oo,my(n2 = n+n); if(sigma(n) >= n2, return(i)); n = n2)); %Y A336916 One more than A336915. %Y A336916 Cf. also A279048, A336835. %K A336916 nonn %O A336916 1,3 %A A336916 _Antti Karttunen_, Aug 08 2020