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-5 of 5 results.

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

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 2, 2, 2, 2, 3, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 2, 2, 2, 2, 3, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 2, 2, 2, 2, 3, 1, 1, 1, 1, 2
Offset: 0

Views

Author

Timothy B. Flowers, Nov 07 2016

Keywords

Comments

Also known as the hyper 5-ary partition sequence, often denoted h_5(n).
Contains A002487 as a subsequence.

Examples

			a(140) = 4 because 140 = 125+5+5+5 = 125+5+5+1+1+1+1+1 = 25+25+25+25+25+5+5+5 = 25+25+25+25+25+5+5+1+1+1+1+1.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<0, 0,
          add(b(n-j*5^i, i-1), j=0..min(5, n/5^i))))
        end:
    a:= n-> b(n, ilog[5](n)):
    seq(a(n), n=0..120);  # Alois P. Heinz, May 01 2018
  • Mathematica
    n:=250; r:=3; (* To get up to n-th term, need r such that 5^r < n < 5^(r+1) *) h5 :=  CoefficientList[ Series[ Product[ (1 - q^(6*5^i))/(1 - q^(5^i)) , {i, 0, r}], {q, 0, n} ], q]

Formula

G.f.: Product_{j >= 0} (1-x^(6*5^j))/(1-x^(5^j)).
G.f.: Product_{j >= 0} Sum_{k=0..5} x^(k*5^j).
a(0)=1; for k>0, a(5*k) = a(k)+a(k-1) and a(5*k+r) = a(k) with r=1,2,3,4.
G.f. A(x) satisfies: A(x) = (1 + x + x^2 + x^3 + x^4 + x^5) * A(x^5). - Ilya Gutkovskiy, Jul 09 2019

A303824 Number of ways of writing n as a sum of powers of 6, each power being used at most six times.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 2, 2, 2, 2, 2, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 2, 2, 2, 2, 2, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2
Offset: 0

Views

Author

Seiichi Manyama, May 01 2018

Keywords

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), this sequence (b=6), A303825 (b=7).

Programs

  • 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 *)
  • 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)

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

A303825 Number of ways of writing n as a sum of powers of 7, each power being used at most seven times.

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, May 01 2018

Keywords

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

Programs

  • 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 *)
  • 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)

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

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

A345008 a(0) = 1; a(4*n) = a(n) - a(n-1), a(4*n+1) = a(4*n+2) = a(4*n+3) = a(n).

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, -1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, -1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, -1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, -2, -1, -1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, -1, 0, 0, 0, 1, 1, 1, 1, 0, 1
Offset: 0

Views

Author

Ilya Gutkovskiy, Jun 05 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[0] = 1; a[n_] := Switch[Mod[n, 4], 0, a[n/4] - a[(n - 4)/4], 1, a[(n - 1)/4], 2, a[(n - 2)/4], 3, a[(n - 3)/4]]; Table[a[n], {n, 0, 105}]
    nmax = 105; A[] = 1; Do[A[x] = (1 + x + x^2 + x^3 - x^4) A[x^4] + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
    nmax = 105; CoefficientList[Series[Product[(1 + x^(4^k) + x^(2 4^k) + x^(3 4^k) - x^(4^(k + 1))), {k, 0, Floor[Log[4, nmax]] + 1}], {x, 0, nmax}], x]

Formula

G.f. A(x) satisfies: A(x) = (1 + x + x^2 + x^3 - x^4) * A(x^4).
G.f.: Product_{k>=0} (1 + x^(4^k) + x^(2*4^k) + x^(3*4^k) - x^(4^(k+1))).
Showing 1-5 of 5 results.