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

A323840 Irregular triangle read by rows: T(n,k) is the number of compositions of 2^n into k powers of 2.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 1, 1, 3, 13, 15, 15, 7, 1, 1, 1, 3, 13, 75, 165, 357, 645, 927, 1095, 957, 627, 299, 91, 15, 1, 1, 1, 3, 13, 75, 525, 1827, 5965, 18315, 51885, 130977, 304953, 646373, 1238601, 2143065, 3331429, 4663967, 5867703
Offset: 0

Views

Author

N. J. A. Sloane, Feb 04 2019

Keywords

Examples

			The first few rows are:
  1;
  1, 1;
  1, 1, 3,  1;
  1, 1, 3, 13, 15,  15,   7,   1;
  1, 1, 3, 13, 75, 165, 357, 645, 927, 1095, 957, 627, 299, 91, 15, 1;
  ...
The counts for row 3 arise as follows:
  8 (1)
  = 4+4 (1)
  = 4+2+2 (3)
  = 4+2+1+1 or 2+2+2+2 (12+1=13)
  = 4+1+1+1+1 or 2+2+2+1+1 (5+10=15)
  = 2+2+1+1+1+1 (15)
  = 2+1+1+1+1+1+1 (7)
  = 1+1+1+1+1+1+1+1 (1)
		

Crossrefs

The rows are a subset of the rows of A073266.
Row sums give A248377.
T(n,n) gives A007178 (for n>=1).
Cf. A023359.

Programs

  • Maple
    b:= proc(n) option remember; expand(`if`(n=0, 1,
          add(x*b(n-2^j), j=0..ilog2(n))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..2^n))(b(2^n)):
    seq(T(n), n=0..5);  # Alois P. Heinz, Mar 31 2021
  • Mathematica
    b[n_] := b[n] = Expand[If[n == 0, 1,
         Sum[x*b[n - 2^j], {j, 0, Length@IntegerDigits[n, 2]-1}]]];
    T[n_] := With[{p = b[2^n]}, Table[Coefficient[p, x, i], {i, 1, 2^n}]];
    Table[T[n], {n, 0, 5}] // Flatten (* Jean-François Alcover, Jul 07 2021, after Alois P. Heinz *)
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def t(n, k):
        if n < k: return 0
        if k == 0: return 1 if n == 0 else 0
        r = 0
        i = 1
        while True:
            if i > n: break
            r += t(n - i, k-1)
            i *= 2
        return r
    def T(n, k): return t(2**n, k) # James Rayman, Mar 30 2021

Formula

T(n, k) = A073266(2^n, k). - James Rayman, Mar 30 2021

Extensions

More terms from James Rayman, Mar 30 2021

A337990 Number of compositions (ordered partitions) of n^n into powers of n.

Original entry on oeis.org

1, 1, 6, 26426, 773527571233557154337704151068262296
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 06 2020

Keywords

Comments

The next term is too large to include.

Examples

			a(2) = 6 because 2^2 = 4 and we have [4], [2, 2], [2, 1, 1] (3 permutations), [1, 1, 1, 1] and 1 + 1 + 3 + 1 = 6.
		

Crossrefs

Programs

  • Mathematica
    Join[{1, 1}, Table[SeriesCoefficient[1/(1 - Sum[x^(n^k), {k, 0, n}]), {x, 0, n^n}], {n, 2, 4}]]

Formula

a(n) = [x^(n^n)] 1 / (1 - Sum_{k>=0} x^(n^k)), for n > 1.

A346564 Number of compositions (ordered partitions) of 3^n into powers of 3.

Original entry on oeis.org

1, 2, 20, 26426, 61390791862967, 769671787836269530451291677988751813890576
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 23 2021

Keywords

Comments

The next term is too large to include.

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[1/(1 - Sum[x^(3^k), {k, 0, n}]), {x, 0, 3^n}], {n, 0, 5}]

Formula

a(n) = [x^(3^n)] 1 / (1 - Sum_{k>=0} x^(3^k)).
a(n) = A078932(A000244(n)).

A346565 Number of compositions (ordered partitions) of 4^n into powers of 4.

Original entry on oeis.org

1, 2, 96, 579739960, 773527571233557154337704151068262296
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 23 2021

Keywords

Comments

The next term is too large to include.

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[1/(1 - Sum[x^(4^k), {k, 0, n}]), {x, 0, 4^n}], {n, 0, 4}]

Formula

a(n) = [x^(4^n)] 1 / (1 - Sum_{k>=0} x^(4^k)).
a(n) = A087221(A000302(n)).
Showing 1-4 of 4 results.