cp's OEIS Frontend

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.

Showing 1-1 of 1 results.

A303827 Number of ways of writing n as a sum of powers of 4, each power being used at most 5 times.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 3, 3, 2, 2, 4, 4, 2, 2, 3, 3, 1, 1, 2, 2, 1, 1, 3, 3, 2, 2, 4, 4, 2, 2, 3, 3, 1, 1, 2, 2, 1, 1, 3, 3, 2, 2, 4, 4, 2, 2, 3, 3, 1, 1, 2, 2, 1, 1, 4, 4, 3, 3, 6, 6, 3, 3, 5, 5, 2, 2, 4, 4, 2, 2, 6, 6, 4, 4, 8, 8, 4, 4, 6, 6
Offset: 0

Views

Author

Seiichi Manyama, May 01 2018

Keywords

Examples

			a(17) = 3 because 17=16+1=4+4+4+4+1=4+4+4+1+1+1+1+1.
		

Crossrefs

Number of ways of writing n as a sum of powers of b, each power being used at most b+1 times: A117535 (b=3), this sequence (b=4), A303828 (b=5).
Cf. A277872.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<0, 0,
          add(b(n-j*4^i, i-1), j=0..min(5, n/4^i))))
        end:
    a:= n-> b(n, ilog[4](n)):
    seq(a(n), n=0..120);  # Alois P. Heinz, May 01 2018
  • Mathematica
    m = 100; A[_] = 1;
    Do[A[x_] = (1+x+x^2+x^3+x^4+x^5) * A[x^4] + O[x]^m // Normal, {m}];
    CoefficientList[A[x], x] (* Jean-François Alcover, Oct 06 2019, after Ilya Gutkovskiy *)

Formula

G.f.: Product_{k>=0} (1-x^(6*4^k))/(1-x^(4^k)).
G.f. A(x) satisfies: A(x) = (1 + x + x^2 + x^3 + x^4 + x^5) * A(x^4). - Ilya Gutkovskiy, Jul 09 2019
Showing 1-1 of 1 results.