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

A377824 Sum of the positions of minimum parts in all compositions of n.

Original entry on oeis.org

0, 1, 4, 10, 29, 70, 181, 435, 1046, 2470, 5762, 13283, 30371, 68847, 154935, 346433, 770154, 1703152, 3748574, 8214805, 17931172, 38997819, 84531066, 182661514, 393578129, 845777569, 1813017039, 3877390908, 8274351482, 17621535902, 37456091552, 79472869966
Offset: 0

Views

Author

John Tyler Rascoe, Nov 08 2024

Keywords

Examples

			The composition of 7, (1,2,1,1,2) has minimum parts at positions 1, 3, and 4; so it contributes 8 to a(7) = 435.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(i<1, 0,
          `if`(irem(n, i)=0, (j-> (p+j)!/j!*(p+j+1)/2*j)(n/i), 0)+
          add(b(n-i*j, i-1, p+j)/j!, j=0..(n-1)/i))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..31);  # Alois P. Heinz, Nov 12 2024
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[i < 1, 0, If[Mod[n, i] == 0, Function[j, (p + j)!/j!*(p + j + 1)/2*j][n/i], 0] + Sum[b[n - i*j, i - 1, p + j]/j!, {j, 0, (n - 1)/i}]];
    a[n_] := b[n, n, 0];
    Table[a[n], {n, 0, 31}] (* Jean-François Alcover, Apr 19 2025, after Alois P. Heinz *)
  • PARI
    A_xy(N) = {my(x='x+O('x^N), h = sum(m=1,N, sum(i=1,N, ((y^i)*x^m)*((x^(m+1))/(1-x))^(i-1)*(sum(j=0,N-m-i, prod(u=1,j, (x^(m+1))/(1-x)+(y^(u+i))*x^m)))))); h}
    P_xy(N) = Pol(A_xy(N), {x})
    A_x(N) = {my(px = deriv(P_xy(N),y), y=1); Vecrev(eval(px))}
    A_x(20)

Formula

G.f.: A(x) = d/dy A(x,y)|{y = 1}, where A(x,y) = Sum{m>0} (Sum_{i>0} (x^m * y^i * (x^(m+1)/(1-x))^(i-1) * (Sum_{j>=0} (Product_{u=1..j} (x^(m+1)/(1-x) + x^m * y^(u+i)) ) ) ) ).
Conjecture: a(n) ~ n^2 * 2^(n-5). - Vaclav Kotesovec, Apr 19 2025

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