OFFSET
0,3
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..10000
EXAMPLE
16 = 24_6, so a(16) = 2*5 + 4 = 14.
17 = 25_6, so a(17) = 2*5 + 5 = 15.
18 = 30_6, so a(18) = 3*5 + 0 = 15.
19 = 31_6, so a(19) = 3*5 + 1 = 16.
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(5, 100)
(PARI) a(n) = fromdigits(digits(n, 6), 5); \\ Michel Marcus, May 02 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Seiichi Manyama, Apr 30 2018
STATUS
approved