login

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”).

A303825
Number of ways of writing n as a sum of powers of 7, each power being used at most seven times.
2
1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 3, 2, 2, 2, 2, 2, 2, 3, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 3, 2, 2, 2, 2, 2, 2, 3
OFFSET
0,8
LINKS
FORMULA
G.f.: Product_{k>=0} (1-x^(8*7^k))/(1-x^(7^k)).
a(0)=1; for k>0, a(7*k) = a(k)+a(k-1) and a(7*k+r) = a(k) with r=1,2,3,4,5,6.
G.f. A(x) satisfies: A(x) = (1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7) * A(x^7). - Ilya Gutkovskiy, Jul 09 2019
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<0, 0,
add(b(n-j*7^i, i-1), j=0..min(7, n/7^i))))
end:
a:= n-> b(n, ilog[7](n)):
seq(a(n), n=0..120); # Alois P. Heinz, May 01 2018
MATHEMATICA
m = 120; A[_] = 1;
Do[A[x_] = Total[x^Range[0, 7]] A[x^7] + 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(7, 100)
CROSSREFS
Number of ways of writing n as a sum of powers of b, each power being used at most b times: A054390 (b=3), A277872 (b=4), A277873 (b=5), A303824 (b=6), this sequence (b=7).
Sequence in context: A139551 A022931 A373217 * A043280 A030379 A030392
KEYWORD
nonn
AUTHOR
Seiichi Manyama, May 01 2018
STATUS
approved