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

A007178 Number of ways to write 1 as ordered sum of n powers of 1/2, allowing repeats.

Original entry on oeis.org

1, 1, 3, 13, 75, 525, 4347, 41245, 441675, 5259885, 68958747, 986533053, 15292855019, 255321427725, 4567457001915, 87156877087069, 1767115200924299, 37936303950503853, 859663073472084315, 20505904049009202685, 513593410566661282347, 13476082013068430626893
Offset: 1

Views

Author

Keywords

Comments

Also the dimension of the arity n component of the operad of level algebras (see the reference by Chataur-Livernet by definition), and the cardinality of the subset of the free commutative medial magma with n generators that contains each generator exactly once. The linear operad of level algebras is the linearization of the set operad of commutative medial magmas; the statement about commutative medial magmas follows from the description in the paper of Ježek-Kepka. - Vladimir Dotsenko, Mar 12 2022

Examples

			For n=3, the 3 sums are 1/2 + 1/4 + 1/4, 1/4 + 1/2 + 1/4, and 1/4 + 1/4 + 1/2.
		

References

  • D. E. Knuth, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    b:= proc(n, r, p) option remember; `if`(n b(n, 1, 0):
    seq(a(n), n=1..23);  # Alois P. Heinz, Nov 07 2017
  • Mathematica
    f[n_] := Coefficient[Expand[Sum[z^(2^j), {j, n}]^n], z, 2^n]; Array[f, 20] (* Robert G. Wilson v, Apr 08 2012 *)
  • PARI
    f(n)={my(M);if(n>1,M=matrix(n,n);M[2,1] = 1;for(k=3,n,for(l=1,k-2,M[k,l] = 0;smx = min(2*l,k-l-1);for(s=1,smx, M[k,l] += binomial(k+l-1,2*l-s)*M[k-l,s]));M[k,k-1] = 1);M[n,1],1)}

Formula

a(n) = coefficient of z^(2^n) in (z+z^2+z^4+...+z^(2^n))^n. - Don Knuth.
From Giuseppe Molteni, Dec 14 2012: (Start)
Limit_{n->oo} (a(n)/n!)^(1/n) = 1.192674341213466032221288982528755... (see References: "Representation of a 2-power as sum of k 2-powers: the asymptotic behavior").
a(n) == 4 + (-1)^n (mod 8) for n > 2 (see References: "Representation of a 2-power as sum of k 2-powers: a recursive formula"). (End)
More precise asymptotics: a(n) ~ c * d^n * n!, where d = 1.192674341213466032221288982528755176734489232027131552652821007498903522051783..., c = 0.24849369086953813603231092781945750388624874631949260927875431616785914609... - Vaclav Kotesovec, Sep 20 2019
a(n) = A323840(n,n). - Alois P. Heinz, Mar 31 2021

Extensions

More terms from Hugo van der Sanden
Minor edits from Vaclav Kotesovec, Jul 26 2014

A248377 Number of compositions of 1 into parts 1/2^k with 0 <= k <= n.

Original entry on oeis.org

1, 2, 6, 56, 5272, 47350056, 3820809588459176, 24878564279781563409541239097464, 1054787931172699885204409659788147413348784265452313995416385160
Offset: 0

Views

Author

Bassam Abdul-Baki, Oct 05 2014

Keywords

Comments

Equivalently, the number of compositions of 2^n into powers of 2.

Examples

			a(0) = 1: [1].
a(1) = 2: [1/2,1/2], [1].
a(2) = 6: [1/4,1/4,1/4,1/4], [1/2,1/4,1/4], [1/4,1/2,1/4], [1/4,1/4,1/2],  [1/2,1/2], [1].
		

Crossrefs

Cf. A023359.
Row sums of A323840.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1,
          add(b(n-2^j), j=0..ilog2(n)))
        end:
    a:= n-> b(2^n):
    seq(a(n), n=0..10);  # Alois P. Heinz, Oct 20 2014
  • Mathematica
    $RecursionLimit = 2000; Clear[b]; b[n_] := b[n] = If[n == 0, 1, Sum[b[n - 2^j], {j, 0, Log[2, n] // Floor}]]; a[n_] := b[2^n]; Table[a[n], {n, 0, 10}] (* Jean-François Alcover, Oct 30 2014, after Alois P. Heinz *)

Formula

a(n) = A023359(2^n).
lim_{n->oo} a(n+1)/a(n)^2 = 1.704176310706592045608982.... - Bassam Abdul-Baki, Sep 03 2020
Showing 1-2 of 2 results.