OFFSET
0,3
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..10000
EXAMPLE
19 = 25_7, so a(19) = 2*6 + 5 = 17.
20 = 26_7, so a(20) = 2*6 + 6 = 18.
21 = 30_7, so a(21) = 3*6 + 0 = 18.
22 = 31_7, so a(22) = 3*6 + 1 = 19.
PROG
(Ruby)
def f(k, ary)
(0..ary.size - 1).inject(0){|s, i| s + ary[i] * k ** i}
end
def A(k, n)
(0..n).map{|i| f(k, i.to_s(k + 1).split('').map(&:to_i).reverse)}
end
p A(6, 100)
(PARI) a(n) = fromdigits(digits(n, 7), 6); \\ Michel Marcus, May 02 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Seiichi Manyama, Apr 30 2018
STATUS
approved