OFFSET
0,7
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..10000
FORMULA
G.f.: Product_{k>=0} (1-x^(7*6^k))/(1-x^(6^k)).
a(0)=1; for k>0, a(6*k) = a(k)+a(k-1) and a(6*k+r) = a(k) with r=1,2,3,4,5.
G.f. A(x) satisfies: A(x) = (1 + x + x^2 + x^3 + x^4 + x^5 + x^6) * A(x^6). - Ilya Gutkovskiy, Jul 09 2019
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<0, 0,
add(b(n-j*6^i, i-1), j=0..min(6, n/6^i))))
end:
a:= n-> b(n, ilog[6](n)):
seq(a(n), n=0..120); # Alois P. Heinz, May 01 2018
MATHEMATICA
m = 100; A[_] = 1;
Do[A[x_] = Total[x^Range[0, 6]] A[x^6] + O[x]^m // Normal, {m}];
CoefficientList[A[x], x] (* Jean-François Alcover, Oct 19 2019 *)
PROG
(Ruby)
def A(k, n)
ary = [1]
(1..n).each{|i|
s = ary[i / k]
s += ary[i / k - 1] if i % k == 0
ary << s
}
ary
end
p A(6, 100)
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, May 01 2018
STATUS
approved