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-4 of 4 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

A373305 Sum over all complete compositions of n of the element set cardinality.

Original entry on oeis.org

0, 1, 1, 5, 7, 15, 41, 77, 161, 325, 727, 1460, 3058, 6228, 12815, 26447, 54099, 110800, 226247, 461531, 939678, 1914189, 3890279, 7905962, 16045367, 32550830, 65971827, 133645098, 270561031, 547468214, 1107208235, 2238242852, 4522679064, 9135128917
Offset: 0

Views

Author

Alois P. Heinz, May 31 2024

Keywords

Comments

A complete composition of n has element set [k] with k<=n (without gaps).

Examples

			a(1) = 1: 1.
a(2) = 1: 11.
a(3) = 5 = 2 + 2 + 1: 12, 21, 111.
a(4) = 7 = 2 + 2 + 2 + 1: 112, 121, 211, 1111.
a(5) = 15 = 7*2 + 1: 122, 212, 221, 1112, 1121, 1211, 2111, 11111.
		

Crossrefs

Programs

  • Maple
    g:= proc(n, i, t) `if`(n=0, `if`(i=0, t!, 0),
         `if`(i<1 or n add(g(n, k, 0)*k, k=0..floor((sqrt(1+8*n)-1)/2)):
    seq(a(n), n=0..33);
  • Mathematica
    g[n_, i_, t_] := If[n == 0, If[i == 0, t!, 0], If[i < 1 || n < i*(i+1)/2, 0, b[n, i, t]]];
    b[n_, i_, t_] := b[n, i, t] = Sum[g[n-i*j, i-1, t+j]/j!, {j, 1, n/i}];
    a[n_] := Sum[g[n, k, 0]*k, {k, 0, Floor[(Sqrt[1 + 8*n] - 1)/2]}];
    Table[a[n], {n, 0, 33}] (* Jean-François Alcover, Jun 08 2024, after Alois P. Heinz *)

Formula

a(n) = Sum_{k=0..A003056(n)} k * A373118(n,k).

A379836 Number of pairs of adjacent equal parts in all complete compositions of n.

Original entry on oeis.org

0, 0, 1, 2, 5, 12, 23, 54, 118, 258, 550, 1178, 2540, 5394, 11473, 24174, 51021, 107210, 225099, 471322, 985202, 2055542, 4281847, 8906676, 18500425, 38379246, 79516158, 164561560, 340179441, 702506576, 1449311429, 2987297778, 6151964642, 12658841766, 26027603925
Offset: 0

Views

Author

John Tyler Rascoe, Jan 14 2025

Keywords

Comments

An integer composition is complete if its set of parts covers an initial interval.

Examples

			The complete compositions of n = 4 are: (1,1,2), (1,2,1), (2,1,1), and (1,1,1,1); having a total of 5 pairs of equal adjacent parts giving a(4) = 5.
		

Crossrefs

Programs

  • PARI
    C_xz(s,N) = {my(x='x+O('x^N), g=if(#s <1,1, sum(i=1,#s, C_xz(s[^i],N+1) * x^(s[i])/(1-(x^(s[i]))*(z-1)) )/(1-sum(i=1,#s, x^(s[i])/(1-(x^(s[i]))*(z-1)))))); return(g)}
    B_xz(N) = {my(x='x+O('x^N), j=1, h=0); while((j*(j+1))/2 <= N, h += C_xz(vector(j, i, i), N+1); j+=1); h}
    P_xz(N) = Pol(B_xz(N), {x})
    B_x(N) = {my(cx = deriv(P_xz(N),z), z=1); Vecrev(eval(cx))}
    B_x(20)

Formula

G.f.: B(x) = d/dz Sum_{k>0} C({1..k},x,z)|{z=1} where C({s},x,z) = Sum{i in {s}} ( C({s}-{i},x,z)*(x^i)/(1-(x^i)*(z-1)) )/(1 - Sum_{i in {s}} (x^i)/(1-(x^i)*(z-1))) with C({},x,z) = 1.

A380176 Number of pairs of adjacent equal parts in all gap-free compositions of n.

Original entry on oeis.org

0, 0, 1, 2, 6, 12, 26, 56, 124, 266, 563, 1204, 2573, 5468, 11559, 24370, 51281, 107720, 225867, 472660, 987378, 2059180, 4287932, 8916624, 18517398, 38406486, 79563118, 164636582, 340308519, 702713844, 1449664783, 2987870476, 6152930738, 12660419370, 26030245642
Offset: 0

Views

Author

John Tyler Rascoe, Jan 14 2025

Keywords

Comments

An integer composition is gap-free if its set of parts covers an interval.

Examples

			The gap-free compositions of n = 4 are: (4), (2,2), (1,1,2), (1,2,1), (2,1,1), and (1,1,1,1); having a total of 6 pairs of equal adjacent parts giving a(4) = 6.
		

Crossrefs

Programs

  • PARI
    C_xz(s,N) = {my(x='x+O('x^N), g=if(#s <1,1, sum(i=1,#s, C_xz(s[^i],N+1) * x^(s[i])/(1-(x^(s[i]))*(z-1)) )/(1-sum(i=1,#s, x^(s[i])/(1-(x^(s[i]))*(z-1)))))); return(g)}
    B_xz(N) = {my(x='x+O('x^N), j=1, h=0); while((j*(j+1))/2 <= N, for(k=0,N, h += C_xz([(1+k)..(j+k)], N+1)); j+=1); h}
    P_xz(N) = Pol(B_xz(N), {x})
    B_x(N) = {my(cx = deriv(P_xz(N),z), z=1); Vecrev(eval(cx))}
    B_x(20)

Formula

G.f.: B(x) = d/dz Sum_{j>0} Sum_{k>=j} C({j..k},x,z)|{z=1} where C({s},x,z) = Sum{i in {s}} ( C({s}-{i},x,z)*(x^i)/(1-(x^i)*(z-1)) )/(1 - Sum_{i in {s}} (x^i)/(1-(x^i)*(z-1))) with C({},x,z) = 1.
Showing 1-4 of 4 results.