login
A334098
a(n) = A334097(n) - A331410(n), where former is the exponent of the eventual power of 2 reached, and the latter is the number of iterations needed to get there, when starting from n and using the map k -> k + k/p, where p can be any odd prime factor of k, for example, the largest.
3
0, 1, 1, 2, 1, 2, 2, 3, 2, 2, 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 3, 3, 3, 4, 2, 3, 3, 4, 2, 3, 4, 5, 3, 3, 3, 4, 2, 3, 3, 4, 3, 4, 3, 4, 3, 4, 4, 5, 4, 3, 3, 4, 3, 4, 3, 5, 3, 3, 3, 4, 4, 5, 4, 6, 3, 4, 3, 4, 4, 4, 4, 5, 2, 3, 3, 4, 4, 4, 4, 5, 4, 4, 4, 5, 3, 4, 3, 5, 3, 4, 4, 5, 5, 5, 3, 6, 4, 5, 4, 4, 3, 4, 4, 5, 4
OFFSET
1,4
COMMENTS
Question: Are there any negative terms?
LINKS
FORMULA
a(n) = A334097(n) - A331410(n).
Totally additive sequence: a(m*n) = a(m)+a(n), for all m, n.
MATHEMATICA
Array[Log2@ Last[#] - (Length[#] - 1) &@ NestWhileList[# + #/FactorInteger[#][[-1, 1]] &, #, ! IntegerQ@ Log2@ # &] &, 105] (* Michael De Vlieger, Apr 30 2020 *)
PROG
(PARI) A334098(n) = { my(k=0); while(bitand(n, n-1), k++; my(f=factor(n)[, 1]); n += (n/f[2-(n%2)])); (valuation(n, 2)-k); };
CROSSREFS
Sequence in context: A188550 A064122 A323424 * A358371 A263922 A057526
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 29 2020
STATUS
approved