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.

A373118 Number T(n,k) of compositions of n such that the set of parts is [k]; triangle T(n,k), n>=0, 0<=k<=A003056(n), read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 1, 2, 0, 1, 3, 0, 1, 7, 0, 1, 11, 6, 0, 1, 20, 12, 0, 1, 32, 32, 0, 1, 54, 72, 0, 1, 87, 152, 24, 0, 1, 143, 311, 60, 0, 1, 231, 625, 180, 0, 1, 376, 1225, 450, 0, 1, 608, 2378, 1116, 0, 1, 986, 4566, 2544, 120, 0, 1, 1595, 8700, 5752, 360
Offset: 0

Views

Author

Alois P. Heinz, May 25 2024

Keywords

Examples

			T(6,2) = 11: 1122, 1212, 1221, 2112, 2121, 2211, 11112, 11121, 11211, 12111, 21111.
T(7,3) = 12: 1123, 1132, 1213, 1231, 1312, 1321, 2113, 2131, 2311, 3112, 3121, 3211.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1;
  0, 1,   2;
  0, 1,   3;
  0, 1,   7;
  0, 1,  11,    6;
  0, 1,  20,   12;
  0, 1,  32,   32;
  0, 1,  54,   72;
  0, 1,  87,  152,   24;
  0, 1, 143,  311,   60;
  0, 1, 231,  625,  180;
  0, 1, 376, 1225,  450;
  0, 1, 608, 2378, 1116;
  0, 1, 986, 4566, 2544, 120;
  ...
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, `if`(i=0, t!, 0),
         `if`(i<1 or n b(n, k, 0):
    seq(seq(T(n, k), k=0..floor((sqrt(1+8*n)-1)/2)), n=0..18);

Formula

T(A000217(n),n) = n! = A000142(n).
T(A000124(n),n) = A001710(n+1) for n>=1.
T(A000290(n),n) = T(n^2,n) = A332721(n).
G.f. for column k: C({1..k},x) where C({s},x) = Sum_{i in {s}} (C({s}-{i},x)*x^i)/ (1 - Sum_{i in {s}} (x^i)) with C({},x) = 1. - John Tyler Rascoe, May 25 2024

A372702 Number of compositions of n such that the set of parts is {1,2,3}.

Original entry on oeis.org

6, 12, 32, 72, 152, 311, 625, 1225, 2378, 4566, 8700, 16475, 31052, 58290, 109079, 203584, 379144, 704821, 1308268, 2425259, 4491074, 8308879, 15360082, 28376089, 52391492, 96683649, 178344205, 328854566, 606190627, 1117103729, 2058129088, 3791056189
Offset: 6

Views

Author

John Tyler Rascoe, May 25 2024

Keywords

Crossrefs

Column k=3 of A373118.

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(n=0, `if`(t=7, 1, 0),
          add(b(n-j, Bits[Or](t, 2^(j-1))), j=1..min(n, 3)))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=6..42);  # Alois P. Heinz, May 25 2024
  • PARI
    C_x(s,N)={my(x='x+O('x^N), g=if(#s <1,1, sum(i=1,#s, C_x(setminus(s,[s[i]]),N) * x^(s[i]) )/(1-sum(i=1,#s, x^(s[i]))))); return(g)}
    B_x(n) ={my(h=C_x([1,2,3],n)); Vec(h)}
    B_x(40)

Formula

G.f.: C({1,2,3},x) = (x^6/(-x^3 - x^2 - x + 1)) *
(1/((1 - x)*(-x^2 - x + 1)) +
1/((1 - x)*(-x^3 - x + 1)) +
1/((1 - x^2)*(-x^2 - x + 1)) +
1/((1 - x^2)*(-x^3 - x^2 + 1)) +
1/((1 - x^3)*(-x^3 - x + 1)) +
1/((1 - x^3)*(-x^3 - x^2 + 1))).
Where C({s},x) = Sum_{i in {s}} (C({s}-{i},x)*x^i)/(1 - Sum_{i in {s}} (x^i)).
Showing 1-2 of 2 results.