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 A303787 #50 Jan 03 2021 14:37:08 %S A303787 0,1,2,3,4,4,5,6,7,8,8,9,10,11,12,12,13,14,15,16,16,17,18,19,20,16,17, %T A303787 18,19,20,20,21,22,23,24,24,25,26,27,28,28,29,30,31,32,32,33,34,35,36, %U A303787 32,33,34,35,36,36,37,38,39,40,40,41,42,43,44,44,45,46,47,48,48,49,50,51 %N A303787 a(n) = Sum_{i=0..m} d(i)*4^i, where Sum_{i=0..m} d(i)*5^i is the base-5 representation of n. %H A303787 Seiichi Manyama, <a href="/A303787/b303787.txt">Table of n, a(n) for n = 0..10000</a> %e A303787 13 = 23_5, so a(13) = 2*4 + 3 = 11. %e A303787 14 = 24_5, so a(14) = 2*4 + 4 = 12. %e A303787 15 = 30_5, so a(15) = 3*4 + 0 = 12. %e A303787 16 = 31_5, so a(16) = 3*4 + 1 = 13. %o A303787 (Ruby) %o A303787 def f(k, ary) %o A303787 (0..ary.size - 1).inject(0){|s, i| s + ary[i] * k ** i} %o A303787 end %o A303787 def A(k, n) %o A303787 (0..n).map{|i| f(k, i.to_s(k + 1).split('').map(&:to_i).reverse)} %o A303787 end %o A303787 p A(4, 100) %o A303787 (PARI) a(n) = fromdigits(digits(n, 5), 4); \\ _Michel Marcus_, May 02 2018 %o A303787 (Julia) %o A303787 function a(n) %o A303787 m, r, b = n, 0, 1 %o A303787 while m > 0 %o A303787 m, q = divrem(m, 5) %o A303787 r += b * q %o A303787 b *= 4 %o A303787 end %o A303787 r end; [a(n) for n in 0:73] |> println # _Peter Luschny_, Jan 03 2021 %Y A303787 Sum_{i=0..m} d(i)*b^i, where Sum_{i=0..m} d(i)*(b+1)^i is the base (b+1) representation of n: A065361 (b=2), A215090 (b=3), this sequence (b=4), A303788 (b=5), A303789 (b=6). %Y A303787 Cf. A020654, A037459. %K A303787 nonn,base %O A303787 0,3 %A A303787 _Seiichi Manyama_, Apr 30 2018