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 A329249 #31 Feb 28 2020 02:05:05 %S A329249 0,2,2,6,4,20,6,24,8,28,20,22,22,26,24,60,26,64,28,68,20,42,22,46,24, %T A329249 200,26,204,28,208,60,62,62,66,64,240,66,244,68,248,40,82,42,86,44, %U A329249 280,46,284,48,288,200,202,202,206,204,220,206,224,208,228,60,222 %N A329249 Starting from n: as long as the decimal representation starts with an odd number, multiply the largest such prefix by 2; a(n) corresponds to the final value. %C A329249 As long as we have a number whose decimal representation is the concatenation of odd number, say u, and a possibly empty string of even digits allowing leading zeros, say v, we replace this number with the concatenation of u*2 and v; eventually only even digits remain. %H A329249 Rémy Sigrist, <a href="/A329249/b329249.txt">Table of n, a(n) for n = 0..10000</a> %F A329249 a(n) >= n with equality iff n belongs to A014263. %F A329249 a(2*n+1) = a(4*n+2). %F A329249 a(10*k + v) = 10*a(k) + v for any k >= 0 and v in {0, 2, 4, 6, 8}. %F A329249 a(5^k) = 2*10^k for any k >= 0 (the ratio a(n)/n is unbounded). %e A329249 For n = 127: %e A329249 - 127 gives 127*2 = 254, %e A329249 - 254 gives 25*2 followed by 4 = 504, %e A329249 - 504 gives 5*2 followed by 04 = 1004, %e A329249 - 1004 gives 1*2 followed by 004 = 2004, %e A329249 - 2004 has only even digits, so a(127) = 2004. %t A329249 {0}~Join~Array[FixedPoint[If[AllTrue[#, EvenQ], FromDigits@ #, FromDigits@ Flatten@ Join[2 IntegerDigits@ FromDigits[First[#]], Last[#]] &@ TakeDrop[#, Position[#, _?OddQ][[-1, -1]] ] ] &@ IntegerDigits[#] &, #] &, 61] (* _Michael De Vlieger_, Dec 01 2019 *) %o A329249 (PARI) a(n) = if (n==0, 0, n%2, a(2*n), 10*a(n\10)+(n%10)) %Y A329249 See A327539 for similar sequences. %Y A329249 Cf. A014263. %K A329249 nonn,base %O A329249 0,2 %A A329249 _Rémy Sigrist_, Nov 30 2019