OFFSET
1,3
COMMENTS
See comments in A336915.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
MATHEMATICA
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 *)
PROG
(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));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 08 2020
STATUS
approved