A306343
Number T(n,k) of defective (binary) heaps on n elements with k defects; triangle T(n,k), n>=0, 0<=k<=max(0,n-1), read by rows.
Original entry on oeis.org
1, 1, 1, 1, 2, 2, 2, 3, 9, 9, 3, 8, 28, 48, 28, 8, 20, 90, 250, 250, 90, 20, 80, 360, 1200, 1760, 1200, 360, 80, 210, 1526, 5922, 12502, 12502, 5922, 1526, 210, 896, 7616, 34160, 82880, 111776, 82880, 34160, 7616, 896, 3360, 32460, 185460, 576060, 1017060, 1017060, 576060, 185460, 32460, 3360
Offset: 0
T(4,0) = 3: 4231, 4312, 4321.
T(4,1) = 9: 2413, 3124, 3214, 3241, 3412, 3421, 4123, 4132, 4213.
T(4,2) = 9: 1342, 1423, 1432, 2134, 2143, 2314, 2341, 2431, 3142.
T(4,3) = 3: 1234, 1243, 1324.
(The examples use max-heaps.)
Triangle T(n,k) begins:
1;
1;
1, 1;
2, 2, 2;
3, 9, 9, 3;
8, 28, 48, 28, 8;
20, 90, 250, 250, 90, 20;
80, 360, 1200, 1760, 1200, 360, 80;
210, 1526, 5922, 12502, 12502, 5922, 1526, 210;
896, 7616, 34160, 82880, 111776, 82880, 34160, 7616, 896;
...
Columns k=0-10 give:
A056971,
A323957,
A323958,
A323959,
A323960,
A323961,
A323962,
A323963,
A323964,
A323965,
A323966.
-
b:= proc(u, o) option remember; local n, g, l; n:= u+o;
if n=0 then 1
else g:= 2^ilog2(n); l:= min(g-1, n-g/2); expand(
add(add(binomial(j-1, i)*binomial(n-j, l-i)*
b(i, l-i)*b(j-1-i, n-l-j+i), i=0..min(j-1, l)), j=1..u)+
add(add(binomial(j-1, i)*binomial(n-j, l-i)*
b(l-i, i)*b(n-l-j+i, j-1-i), i=0..min(j-1, l)), j=1..o)*x)
fi
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0)):
seq(T(n), n=0..10);
-
b[u_, o_] := b[u, o] = Module[{n = u + o, g, l},
If[n == 0, 1, g := 2^Floor@Log[2, n]; l = Min[g-1, n-g/2]; Expand[
Sum[Sum[ Binomial[j-1, i]* Binomial[n-j, l-i]*b[i, l-i]*
b[j-1-i, n-l-j+i], {i, 0, Min[j-1, l]}], {j, 1, u}]+
Sum[Sum[Binomial[j - 1, i]* Binomial[n-j, l-i]*b[l-i, i]*
b[n-l-j+i, j-1-i], {i, 0, Min[j-1, l]}], {j, 1, o}]*x]]];
T[n_] := CoefficientList[b[n, 0], x];
T /@ Range[0, 10] // Flatten (* Jean-François Alcover, Feb 17 2021, after Alois P. Heinz *)
A282466
a(n) = n*a(n-1) + n!, with n>0, a(0)=5.
Original entry on oeis.org
5, 6, 14, 48, 216, 1200, 7920, 60480, 524160, 5080320, 54432000, 638668800, 8143027200, 112086374400, 1656387532800, 26153487360000, 439378587648000, 7825123418112000, 147254595231744000, 2919482409811968000, 60822550204416000000, 1328364496464445440000
Offset: 0
- C. Mariconda and A. Tonolo, Calcolo discreto, Apogeo (2012), page 240 (Example 9.57 gives the recurrence).
Cf. sequences with formula (n + k)*n!:
A052521 (k=-5),
A282822 (k=-4),
A052520 (k=-3),
A052571 (k=-2),
A062119 (k=-1),
A001563 (k=0),
A000142 (k=1),
A001048 (k=2),
A052572 (k=3),
A052644 (k=4), this sequence (k=5).
-
A282466:= func< n | (n+5)*Factorial(n) >; // G. C. Greubel, May 14 2025
-
RecurrenceTable[{a[0] == 5, a[n] == n a[n - 1] + n!}, a, {n, 0, 30}] (* or *)
Table[(n + 5) n!, {n, 0, 30}]
-
def A282466(n): return (n+5)*factorial(n) # G. C. Greubel, May 14 2025
A230056
G.f.: Sum_{n>=0} (n+3)^n * x^n / (1 + (n+3)*x)^n.
Original entry on oeis.org
1, 4, 9, 30, 132, 720, 4680, 35280, 302400, 2903040, 30844800, 359251200, 4550515200, 62270208000, 915372057600, 14384418048000, 240612083712000, 4268249137152000, 80029671321600000, 1581386305314816000, 32844177110384640000, 715273190403932160000, 16298010552775311360000
Offset: 0
O.g.f.: A(x) = 1 + 4*x + 9*x^2 + 30*x^3 + 132*x^4 + 720*x^5 + 4680*x^6 +...
where
A(x) = 1 + 4*x/(1+4*x) + 5^2*x^2/(1+5*x)^2 + 6^3*x^3/(1+6*x)^3 + 7^4*x^4/(1+7*x)^4 + 8^5*x^5/(1+8*x)^5 +...
E.g.f.: E(x) = 1 + 4*x + 9*x^2/2! + 30*x^3/3! + 132*x^4/4! + 720*x^5/5! +...
where
E(x) = 1 + 4*x + 9/2*x^2 + 5*x^3 + 11/2*x^4 + 6*x^5 + 13/2*x^6 + 7*x^7 +...
which is the expansion of: (2 + 4*x - 5*x^2) / (2 - 4*x + 2*x^2).
-
a:=series(add((n+3)^n*x^n/(1+(n+3)*x)^n,n=0..100),x=0,23): seq(coeff(a,x,n),n=0..22); # Paolo P. Lava, Mar 27 2019
-
a[n_] := (n + 7)*n!/2; a[0] = 1; Array[a, 25, 0] (* Amiram Eldar, Dec 11 2022 *)
-
{a(n)=polcoeff( sum(m=0, n, ((m+3)*x)^m / (1 + (m+3)*x +x*O(x^n))^m), n)}
for(n=0, 20, print1(a(n), ", "))
-
{a(n)=if(n==0, 1, (n+7) * n!/2 )}
for(n=0, 20, print1(a(n), ", "))
A229036
G.f.: Sum_{n>=0} (3*n-1)^n * x^n / (1 + (3*n-1)*x)^n.
Original entry on oeis.org
1, 2, 21, 270, 4212, 77760, 1662120, 40415760, 1102248000, 33331979520, 1107097891200, 40069801094400, 1569793384051200, 66185883219456000, 2988292627358438400, 143855017177487616000, 7355369573944584192000, 398090614491857903616000, 22737098558477268725760000
Offset: 0
O.g.f.: A(x) = 1 + 2*x + 21*x^2 + 270*x^3 + 4212*x^4 + 77760*x^5 +...
where
A(x) = 1 + 2*x/(1+2*x) + 5^2*x^2/(1+5*x)^2 + 8^3*x^3/(1+8*x)^3 + 11^4*x^4/(1+11*x)^4 + 14^5*x^5/(1+14*x)^5 +...
E.g.f.: E(x) = 1 + 2*x + 21*x^2/2! + 270*x^3/3! + 4212*x^4/4! + 77760*x^5/5! +...
where
E(x) = 1 + 2*x + 21/2*x^2 + 45*x^3 + 351/2*x^4 + 648*x^5 + 4617/2*x^6 +...
which is the expansion of: (2 - 8*x + 15*x^2) / (2 - 12*x + 18*x^2).
-
Join[{1},Table[(3n+1)3^(n-1) n!/2,{n,20}]] (* Harvey P. Dale, Feb 10 2015 *)
-
{a(n)=polcoeff( sum(m=0, n, ((3*m-1)*x)^m / (1 + (3*m-1)*x +x*O(x^n))^m), n)}
for(n=0, 20, print1(a(n), ", "))
-
{a(n) = if(n==0,1,(3*n+1)*3^(n-1)*n!/2)}
for(n=0, 20, print1(a(n), ", "))
Showing 1-4 of 4 results.
Comments