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

A089052 Triangle read by rows: T(n,k) (n >= 0, 0 <= k <= n) = number of partitions of n into exactly k powers of 2.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 03 2003

Keywords

Examples

			1
0 1
0 1 1
0 0 1 1
0 1 1 1 1
0 0 1 1 1 1
0 0 1 2 1 1 1
0 0 0 1 2 1 1 1
0 1 1 1 2 2 1 1 1
0 0 1 1 1 2 2 1 1 1
0 0 1 2 2 2 2 2 1 1 1
0 0 0 1 2 2 2 2 2 1 1 1
		

References

  • J. Jordan and R. Southwell, Further Properties of Reproducing Graphs, Applied Mathematics, Vol. 1 No. 5, 2010, pp. 344-350. doi: 10.4236/am.2010.15045. - From N. J. A. Sloane, Feb 03 2013

Crossrefs

Columns give A036987, A075897 (essentially), A089049, A089050, A089051, A319922.
Row sums give A018819.
See A089053 for another version.

Programs

  • Maple
    A089052 := proc(n, k)
        option remember;
        if k > n then
            return(0);
        end if;
        if k= 0 then
            if n=0 then
                return(1)
            else
                return(0);
            end if;
        end if;
        if n mod 2 = 1 then
                return procname(n-1, k-1);
        end if;
        procname(n-1, k-1)+procname(n/2, k);
    end proc:
  • Mathematica
    t[n_, k_] := t[n, k] = Which[k > n, 0, k == 0, If[n == 0, 1, 0], Mod[n, 2] == 1, t[n-1, k-1], True, t[n-1, k-1] + t[n/2, k]]; Table[t[n, k], {n, 0, 13}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 14 2014, after Maple *)

Formula

T(2m, k) = T(m, k)+T(2m-1, k-1); T(2m+1, k) = T(2m, k-1).
G.f.: 1/Product_{k>=0} (1-y*x^(2^k)). - Vladeta Jovovic, Dec 03 2003

A089049 Number of ways of writing n as a sum of exactly 4 powers of 2.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 03 2003

Keywords

Comments

The powers do not need to be distinct.

Crossrefs

A089050 Number of ways of writing n as a sum of exactly 5 powers of 2.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 03 2003

Keywords

Comments

The powers do not need to be distinct.

Crossrefs

A089048 Number of ways of writing n as a sum of exactly 3 powers of 2.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 03 2003

Keywords

Comments

The powers do not need to be distinct.

Crossrefs

Programs

  • Maple
    f := proc(n,k) option remember; if k > n then RETURN(0); fi; if k= 0 then if n=0 then RETURN(1) else RETURN(0); fi; fi; if n mod 2 = 1 then RETURN(f(n-1,k-1)); fi; f(n-1,k-1)+f(n/2,k); end; # present sequence is f(n,3)
  • Mathematica
    a[n_] := If[n < 3, 0, ((1 - Mod[n, 2])*(1 - Mod[DigitCount[n, 2, 1], 2]) + 1)*If[Floor[(1/4)*DigitCount[n, 2, 1]] == 0, 1, 0]];
    Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Feb 13 2018, after Reinhard Zumkeller *)

Formula

For n > 2: a(n) = (1 + (1 - A000120(n) mod 2)*(1 - n mod 2)) * 0^floor(A000120(n)/4). - Reinhard Zumkeller, Dec 14 2003

A342247 Number of partitions of n into seven powers of 2.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 4, 3, 4, 4, 4, 4, 5, 4, 6, 5, 6, 6, 7, 5, 8, 6, 7, 6, 8, 5, 7, 5, 7, 6, 9, 6, 9, 7, 9, 7, 11, 8, 10, 7, 10, 7, 10, 6, 11, 8, 10, 7, 12, 7, 10, 7, 11, 7, 10, 5, 9, 5, 8, 5, 10, 7, 10, 6, 11, 9, 12, 8, 14, 9, 11, 7, 13, 8, 12, 8, 14, 10, 13, 8, 15, 9, 13
Offset: 7

Views

Author

Ilya Gutkovskiy, Mar 07 2021

Keywords

Crossrefs

A342248 Number of partitions of n into eight powers of 2.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 4, 4, 4, 5, 4, 5, 5, 6, 6, 7, 6, 8, 7, 8, 8, 10, 7, 10, 8, 9, 7, 10, 7, 10, 9, 11, 9, 12, 9, 13, 11, 14, 10, 14, 10, 13, 10, 14, 11, 15, 10, 15, 12, 15, 10, 17, 11, 14, 10, 15, 9, 13, 8, 14, 10, 14, 10, 16, 11, 16, 12, 18, 14, 18, 11, 18, 13, 17, 12, 20
Offset: 8

Views

Author

Ilya Gutkovskiy, Mar 07 2021

Keywords

Crossrefs

A342249 Number of partitions of n into nine powers of 2.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 4, 4, 5, 5, 5, 5, 6, 6, 8, 7, 8, 8, 9, 8, 11, 10, 11, 10, 12, 9, 12, 10, 12, 10, 14, 11, 14, 12, 15, 13, 17, 14, 18, 14, 17, 13, 18, 14, 19, 15, 19, 15, 20, 15, 21, 17, 21, 14, 21, 15, 19, 13, 20, 14, 19, 14, 22, 16, 21, 16, 24, 18, 24, 18, 25
Offset: 9

Views

Author

Ilya Gutkovskiy, Mar 07 2021

Keywords

Crossrefs

A347661 Number of partitions of n into at most 6 powers of 2.

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 6, 5, 8, 7, 9, 7, 11, 8, 10, 7, 12, 8, 12, 8, 14, 10, 13, 8, 15, 9, 13, 8, 14, 8, 11, 5, 13, 8, 13, 8, 17, 11, 14, 8, 18, 11, 16, 9, 17, 9, 12, 5, 16, 9, 14, 8, 17, 9, 12, 5, 15, 8, 12, 5, 12, 5, 6, 1, 13, 8, 13, 8, 18, 11, 14, 8, 21, 12, 17
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 09 2021

Keywords

Crossrefs

Formula

a(n) = Sum_{k=0..6} A089052(n,k). - Alois P. Heinz, Sep 09 2021
Showing 1-8 of 8 results.