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 A334097 #21 May 15 2020 02:11:38 %S A334097 0,1,2,2,3,3,3,3,4,4,4,4,4,4,5,4,5,5,5,5,5,5,5,5,6,5,6,5,6,6,5,5,6,6, %T A334097 6,6,6,6,6,6,6,6,6,6,7,6,6,6,6,7,7,6,7,7,7,6,7,7,7,7,6,6,7,6,7,7,7,7, %U A334097 7,7,7,7,7,7,8,7,7,7,7,7,8,7,7,7,8,7,8,7,8,8,7,7,7,7,8,7,7,7,8,8,8,8,7,7,8 %N A334097 a(n) is the exponent of the eventual power of 2 reached 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. %H A334097 Antti Karttunen, <a href="/A334097/b334097.txt">Table of n, a(n) for n = 1..65537</a> %F A334097 Totally additive sequence: a(2) = 1, a(p) = a(p+1) for odd primes p, a(m*n) = a(m)+a(n) for m, n > 1. %F A334097 If A209229(n) == 1, a(n) = A007814(n), otherwise a(n) = a(n+A052126(n)), or equally, a(n) = a(n+(n/A078701(n))). %F A334097 a(n) = A331410(n) + A334098(n) = A334862(n) + A064415(n). %t A334097 Array[Log2@ NestWhile[# + #/FactorInteger[#][[-1, 1]] &, #, !IntegerQ@ Log2@ # &] &, 105] (* _Michael De Vlieger_, Apr 30 2020 *) %o A334097 (PARI) A334097(n) = if(!bitand(n,n-1),valuation(n,2),my(f=factor(n)[, 1]); A334097(n+(n/f[2-(n%2)]))); %o A334097 (PARI) A334097(n) = if(!bitand(n,n-1),valuation(n,2),A334097(n+(n/vecmax(factor(n)[, 1])))); %o A334097 (PARI) A334097(n) = { my(f=factor(n)); sum(k=1,#f~,if(2==f[k,1],f[k,2],f[k,2]*A334097(1+f[k,1]))); }; %Y A334097 Cf. A007814, A052126, A078701, A209229, A331410, A334098, A334862. %Y A334097 Cf. also A064415 (analogous sequence when using the map k -> k - k/p). %K A334097 nonn %O A334097 1,3 %A A334097 _Antti Karttunen_, Apr 29 2020