Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #34 Jun 29 2019 01:39:12
%S 0,1,2,3,4,5,6,6,7,8,9,10,11,12,12,13,14,15,16,17,18,18,19,20,21,22,
%T 23,24,24,25,26,27,28,29,30,30,31,32,33,34,35,36,36,37,38,39,40,41,42,
%U 36,37,38,39,40,41,42,42,43,44,45,46,47,48,48,49,50,51,52,53,54,54,55
%N a(n) = Sum_{i=0..m} d(i)*6^i, where Sum_{i=0..m} d(i)*7^i is the base-7 representation of n.
%H Seiichi Manyama, <a href="/A303789/b303789.txt">Table of n, a(n) for n = 0..10000</a>
%e 19 = 25_7, so a(19) = 2*6 + 5 = 17.
%e 20 = 26_7, so a(20) = 2*6 + 6 = 18.
%e 21 = 30_7, so a(21) = 3*6 + 0 = 18.
%e 22 = 31_7, so a(22) = 3*6 + 1 = 19.
%o (Ruby)
%o def f(k, ary)
%o (0..ary.size - 1).inject(0){|s, i| s + ary[i] * k ** i}
%o end
%o def A(k, n)
%o (0..n).map{|i| f(k, i.to_s(k + 1).split('').map(&:to_i).reverse)}
%o end
%o p A(6, 100)
%o (PARI) a(n) = fromdigits(digits(n, 7), 6); \\ _Michel Marcus_, May 02 2018
%Y 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), A303787 (b=4), A303788 (b=5), this sequence (b=6).
%Y Cf. A037470.
%K nonn,base
%O 0,3
%A _Seiichi Manyama_, Apr 30 2018