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 A175047 #29 Jul 17 2025 21:45:03 %S A175047 1,4,3,8,9,12,7,16,17,36,19,24,25,28,15,32,33,68,35,72,73,76,39,48,49, %T A175047 100,51,56,57,60,31,64,65,132,67,136,137,140,71,144,145,292,147,152, %U A175047 153,156,79,96,97,196,99,200,201,204,103,112,113,228,115,120,121,124,63,128 %N A175047 Write n in binary, then increase each run of 0's by one 0. a(n) is the decimal equivalent of the result. %C A175047 From _Reinhard Zumkeller_, Dec 12 2009: (Start) %C A175047 A070939(a(n)) = A070939(n) + A033264(n); %C A175047 A171598 and A171599 give record values and where they occur. (End) %H A175047 R. Zumkeller, <a href="/A175047/b175047.txt">Table of n, a(n) for n = 1..10000</a> %F A175047 a(n) = if n<2 then n else 2*(1 + 0^((n+2) mod 4))*a([n/2]) + n mod 2. - _Reinhard Zumkeller_, Jan 20 2010 %F A175047 a(2^n) = 2^(n+1). - _Chai Wah Wu_, Nov 21 2018 %e A175047 12 in binary is 1100. Increase each run of 0 by one digit to get 11000, which is 24 in decimal. So a(12) = 24. %t A175047 f[n_] := Block[{s = Split@ IntegerDigits[n, 2]}, FromDigits[ Flatten@ Insert[s, {0}, Table[{2 i}, {i, Floor[ Length@s/2]} ]], 2]]; Array[ f, 64] (* _Robert G. Wilson v_, Dec 11 2009 *) %o A175047 (Haskell) %o A175047 import Data.List (group) %o A175047 a175047 = foldr (\b v -> 2 * v + b) 0 . concatMap %o A175047 (\bs@(b:_) -> if b == 0 then 0 : bs else bs) . group . a030308_row %o A175047 -- _Reinhard Zumkeller_, Jul 05 2013 %o A175047 (Python) %o A175047 from re import split %o A175047 def A175047(n): %o A175047 return int(''.join(d+'0' if '0' in d else d for d in split('(0+)|(1+)',bin(n)[2:]) if d != '' and d != None),2) # _Chai Wah Wu_, Nov 21 2018 %Y A175047 Cf. A175046, A175048. %Y A175047 Cf. A084471. - _Robert G. Wilson v_, Dec 11 2009 %Y A175047 Cf. A030308, A106151, A007088. %K A175047 base,nonn %O A175047 1,2 %A A175047 _Leroy Quet_, Dec 02 2009 %E A175047 Extended by _Ray Chandler_, Dec 18 2009 %E A175047 a(11) onwards from _Robert G. Wilson v_ and _Reinhard Zumkeller_, Dec 11 2009