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 A063012 #46 Apr 04 2025 11:56:12 %S A063012 0,1,20,21,400,401,420,421,8000,8001,8020,8021,8400,8401,8420,8421, %T A063012 160000,160001,160020,160021,160400,160401,160420,160421,168000, %U A063012 168001,168020,168021,168400,168401,168420,168421,3200000,3200001,3200020,3200021,3200400,3200401 %N A063012 Sum of distinct powers of 20; i.e., numbers with digits in {0,1} base 20; i.e., write n in base 2 and read as if written in base 20. %H A063012 Harry J. Smith, <a href="/A063012/b063012.txt">Table of n, a(n) for n = 0..1000</a> %H A063012 Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, <a href="https://arxiv.org/abs/2210.10968">Identities and periodic oscillations of divide-and-conquer recurrences splitting at half</a>, arXiv:2210.10968 [cs.DS], 2022, p. 45. %F A063012 a(n) = a(n-2^floor(log_2(n))) + 20^floor(log_2(n)). a(2n) = 20*a(n); a(2n+1) = a(2n)+1 = 20*a(n)+1. %F A063012 a(n) = Sum_{k>=0} A030308(n,k)*A009964(k). - _Philippe Deléham_, Oct 15 2011 %F A063012 G.f.: (1/(1 - x))*Sum_{k>=0} 20^k*x^(2^k)/(1 + x^(2^k)). - _Ilya Gutkovskiy_, Jun 04 2017 %e A063012 a(5) = 401 since 5 written in base 2 is 101 so a(5) = 1*20^2 + 0*20^1 + 1*20^0 = 400 + 0 + 1 = 401. %p A063012 a:= proc(n) `if`(n<2, n, irem(n, 2, 'r')+20*a(r)) end: %p A063012 seq(a(n), n=0..37); # _Alois P. Heinz_, Apr 04 2025 %t A063012 Table[FromDigits[IntegerDigits[n,2],20],{n,0,40}] (* _Harvey P. Dale_, Jul 21 2014 *) %o A063012 (PARI) baseE(x, b)= { local(d, e, f); e=0; f=1; while (x>0, d=x-b*(x\b); x\=b; e+=d*f; f*=10); return(e) } %o A063012 baseI(x, b)= { local(d, e, f); e=0; f=1; while (x>0, d=x-10*(x\10); x\=10; e+=d*f; f*=b); return(e) } %o A063012 { for (n=0, 1000, write("b063012.txt", n, " ", baseI(baseE(n, 2), 20)) ) } \\ _Harry J. Smith_, Aug 15 2009 %o A063012 (Python) %o A063012 def A063012(n): return int(bin(n)[2:],20) # _Chai Wah Wu_, Apr 04 2025 %Y A063012 A001477, A005836, A000695, A033042, A033043, A033044, A033045, A033046, A007088, A033047, A033048, A033049, A033050, A033051, A033052 are similar sequences for 2-16. %Y A063012 A063013 is similar in a different way. %K A063012 easy,nonn,base %O A063012 0,3 %A A063012 _Henry Bottomley_, Jul 04 2001 %E A063012 Edited by _Charles R Greathouse IV_, Aug 02 2010