This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A303825 #19 Oct 19 2019 10:15:53 %S A303825 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, %T A303825 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, %U A303825 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 %N A303825 Number of ways of writing n as a sum of powers of 7, each power being used at most seven times. %H A303825 Seiichi Manyama, <a href="/A303825/b303825.txt">Table of n, a(n) for n = 0..10000</a> %F A303825 G.f.: Product_{k>=0} (1-x^(8*7^k))/(1-x^(7^k)). %F A303825 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. %F A303825 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 %p A303825 b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<0, 0, %p A303825 add(b(n-j*7^i, i-1), j=0..min(7, n/7^i)))) %p A303825 end: %p A303825 a:= n-> b(n, ilog[7](n)): %p A303825 seq(a(n), n=0..120); # _Alois P. Heinz_, May 01 2018 %t A303825 m = 120; A[_] = 1; %t A303825 Do[A[x_] = Total[x^Range[0, 7]] A[x^7] + O[x]^m // Normal, {m}]; %t A303825 CoefficientList[A[x], x] (* _Jean-François Alcover_, Oct 19 2019 *) %o A303825 (Ruby) %o A303825 def A(k, n) %o A303825 ary = [1] %o A303825 (1..n).each{|i| %o A303825 s = ary[i / k] %o A303825 s += ary[i / k - 1] if i % k == 0 %o A303825 ary << s %o A303825 } %o A303825 ary %o A303825 end %o A303825 p A(7, 100) %Y A303825 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). %K A303825 nonn %O A303825 0,8 %A A303825 _Seiichi Manyama_, May 01 2018