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.

Previous Showing 11-12 of 12 results.

A173404 Number of partitions of 1 into up to n powers of 1/2.

Original entry on oeis.org

1, 2, 3, 5, 8, 13, 22, 38, 66, 116, 205, 364, 649, 1159, 2073, 3712, 6650, 11919, 21370, 38322, 68732, 123287, 221158, 396744, 711760, 1276928, 2290904, 4110102, 7373977, 13229810, 23735985, 42585540, 76404334, 137080120, 245941268, 441254018, 791673612
Offset: 1

Views

Author

Jonathan Vos Post, Feb 17 2010

Keywords

Comments

Partial sums of number of partitions of 1 into n powers of 1/2. Partial sums of (according to one definition of "binary") the number of binary rooted trees. The subsequence of primes in this partial sum begins: 2, 3, 5, 13, a(43) = 26405436301.

Examples

			a(3) = 3: [(1/2)^0], [(1/2)^1,(1/2)^1], [(1/2)^1,(1/2)^2,(1/2)^2].
		

Crossrefs

Partial sums of A002572.

Formula

a(n) = Sum_{i=0..n} A002572(i).

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
Previous Showing 11-12 of 12 results.