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.

A337165 Number T(n,k) of compositions of n into k nonzero squares; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 0, 3, 0, 0, 1, 0, 0, 0, 0, 4, 0, 0, 1, 0, 0, 1, 0, 0, 5, 0, 0, 1, 0, 1, 0, 3, 0, 0, 6, 0, 0, 1, 0, 0, 2, 0, 6, 0, 0, 7, 0, 0, 1, 0, 0, 0, 3, 0, 10, 0, 0, 8, 0, 0, 1, 0, 0, 0, 1, 4, 0, 15, 0, 0, 9, 0, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, Feb 03 2021

Keywords

Examples

			Triangle T(n,k) begins:
  1;
  0, 1;
  0, 0, 1;
  0, 0, 0, 1;
  0, 1, 0, 0, 1;
  0, 0, 2, 0, 0,  1;
  0, 0, 0, 3, 0,  0,  1;
  0, 0, 0, 0, 4,  0,  0, 1;
  0, 0, 1, 0, 0,  5,  0, 0, 1;
  0, 1, 0, 3, 0,  0,  6, 0, 0, 1;
  0, 0, 2, 0, 6,  0,  0, 7, 0, 0, 1;
  0, 0, 0, 3, 0, 10,  0, 0, 8, 0, 0, 1;
  0, 0, 0, 1, 4,  0, 15, 0, 0, 9, 0, 0, 1;
  ...
		

Crossrefs

Row sums give A006456.
T(2n,n) gives A338464.
Main diagonal gives A000012.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, add((s->
         `if`(s>n, 0, expand(x*b(n-s))))(j^2), j=1..isqrt(n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n)):
    seq(T(n), n=0..14);
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, Sum[With[{s = j^2},
         If[s>n, 0, Expand[x*b[n - s]]]], {j, 1, Sqrt[n]}]];
    T[n_] := CoefficientList[b[n], x];
    T /@ Range[0, 14] // Flatten (* Jean-François Alcover, Feb 07 2021, after Alois P. Heinz *)

Formula

G.f. of column k: (Sum_{j>=1} x^(j^2))^k.
Sum_{k=0..n} k * T(n,k) = A281704(n).
Sum_{k=0..n} (-1)^k * T(n,k) = A317665(n).

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.