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.

A073266 Triangle read by rows: T(n,k) is the number of compositions of n as the sum of k integral powers of 2.

Original entry on oeis.org

1, 1, 1, 0, 2, 1, 1, 1, 3, 1, 0, 2, 3, 4, 1, 0, 2, 4, 6, 5, 1, 0, 0, 6, 8, 10, 6, 1, 1, 1, 3, 13, 15, 15, 7, 1, 0, 2, 3, 12, 25, 26, 21, 8, 1, 0, 2, 6, 10, 31, 45, 42, 28, 9, 1, 0, 0, 6, 16, 30, 66, 77, 64, 36, 10, 1, 0, 2, 4, 18, 40, 76, 126, 126, 93, 45, 11, 1, 0, 0, 6, 16, 50, 96, 168, 224, 198, 130, 55, 12, 1
Offset: 1

Views

Author

Antti Karttunen, Jun 25 2002

Keywords

Comments

Upper triangular region of the table A073265 read by rows. - Emeric Deutsch, Feb 04 2005
Also the convolution triangle of A209229. - Peter Luschny, Oct 07 2022

Examples

			T(6,3) = 4 because there are four ordered partitions of 6 into 3 powers of 2, namely: 4+1+1, 1+4+1, 1+1+4 and 2+2+2.
Triangle begins:
  1;
  1, 1;
  0, 2, 1;
  1, 1, 3, 1;
  0, 2, 3, 4, 1;
  0, 2, 4, 6, 5, 1;
		

Crossrefs

Cf. A048298, A073265, A023359 (row sums), A089052 (partitions of n).
T(2n,n) gives A333047.

Programs

  • Maple
    b:= proc(n) option remember; expand(`if`(n=0, 1,
           add(b(n-2^j)*x, j=0..ilog2(n))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(n)):
    seq(T(n), n=1..14);  # Alois P. Heinz, Mar 06 2020
    # Uses function PMatrix from A357368. Adds a row above and a column to the left.
    PMatrix(10, n -> if n = 2^ilog2(n) then 1 else 0 fi); # Peter Luschny, Oct 07 2022
  • Mathematica
    m:= 10; T[n_, k_]:= T[n, k]= Coefficient[(Sum[x^(2^j), {j,0,m+1}])^k, x, n]; Table[T[n, k], {n,10}, {k,n}]//Flatten (* G. C. Greubel, Mar 06 2020 *)

Formula

T(n, k) = coefficient of x^n in the formal power series (x + x^2 + x^4 + x^8 + x^16 + ...)^k. - Emeric Deutsch, Feb 04 2005
T(0, k) = T(n, 0) = 0, T(n, k) = 0 if k > n, T(n, 1) = 1 if n = 2^m, 0 otherwise and in other cases T(n, k) = Sum_{i=0..floor(log_2(n-1))} T(n-(2^i), k-1). - Emeric Deutsch, Feb 04 2005
Sum_{k=0..n} T(n,k) = A023359(n). - Philippe Deléham, Nov 04 2006

A341071 Number of compositions of 2n into n squarefree parts.

Original entry on oeis.org

1, 1, 3, 7, 23, 76, 267, 932, 3263, 11410, 40028, 140955, 498467, 1769249, 6299282, 22485487, 80435919, 288275461, 1034862558, 3720499175, 13393720428, 48275699654, 174194970601, 629187941167, 2274710068067, 8230764250326, 29805342037721, 108009638665648
Offset: 0

Views

Author

Alois P. Heinz, Feb 04 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember;
          `if`(n=0, `if`(t=0, 1, 0), `if`(t<1, 0, add(
          `if`(numtheory[issqrfree](j), b(n-j, t-1), 0), j=1..n)))
        end:
    a:= n-> b(2*n, n):
    seq(a(n), n=0..35);
  • Mathematica
    b[n_, t_] := b[n, t] =
      If[n == 0, If[t == 0, 1, 0], If[t < 1, 0, Sum[
      If[SquareFreeQ[j], b[n - j, t - 1], 0], {j, 1, n}]]];
    a[n_] := b[2n, n];
    Table[a[n], {n, 0, 35}] (* Jean-François Alcover, May 26 2023, from Maple program *)

Formula

a(n) ~ c * d^n / sqrt(n), where d = 3.6921332109291502908930783402282652076342401140592914... and c = 0.27220098720735952890181498005903942865018992276116... - Vaclav Kotesovec, Feb 14 2021
Showing 1-2 of 2 results.