1, 1, 1, 2, 1, 1, 4, 3, 1, 1, 10, 6, 4, 1, 1, 26, 18, 8, 5, 1, 1, 76, 48, 28, 10, 6, 1, 1, 232, 156, 76, 40, 12, 7, 1, 1, 764, 492, 272, 110, 54, 14, 8, 1, 1, 2620, 1740, 880, 430, 150, 70, 16, 9, 1, 1, 9496, 6168, 3328, 1420, 636, 196, 88, 18, 10, 1, 1, 35696, 23568
Offset: 0
Rows start: 1; 1,1; 2,1,1; 4,3,1,1; 10,6,4,1,1; etc.
Triangle begins
1,
1, 1,
2, 1, 1,
4, 3, 1, 1,
10, 6, 4, 1, 1,
26, 18, 8, 5, 1, 1,
76, 48, 28, 10, 6, 1, 1,
232, 156, 76, 40, 12, 7, 1, 1
Production matrix begins
1, 1,
1, 0, 1,
1, 1, 0, 1,
2, 1, 1, 0, 1,
4, 3, 1, 1, 0, 1,
10, 6, 4, 1, 1, 0, 1,
26, 18, 8, 5, 1, 1, 0, 1,
76, 48, 28, 10, 6, 1, 1, 0, 1,
232, 156, 76, 40, 12, 7, 1, 1, 0, 1
Inverse begins
1,
-1, 1,
-1, -1, 1,
0, -2, -1, 1,
0, 0, -3, -1, 1,
0, 0, 0, -4, -1, 1,
0, 0, 0, 0, -5, -1, 1,
0, 0, 0, 0, 0, -6, -1, 1
- _Paul Barry_, Mar 02 2011
A247376
Triangular array: row n gives the coefficients of the polynomial p(n,x) defined in Comments.
Original entry on oeis.org
1, 2, 2, 3, 5, 5, 15, 8, 8, 35, 33, 13, 80, 131, 48, 21, 171, 409, 279, 34, 355, 1180, 1375, 384, 55, 715, 3128, 5335, 2895, 89, 1410, 7858, 18510, 17029, 3840, 144, 2730, 18851, 58253, 78609, 35685, 233, 5208, 43629, 171059, 317758, 243873, 46080, 377, 9810
Offset: 0
-
z = 15; f[x_, n_] := 1 + (2 x + 1)/f[x, n - 1]; f[x_, 1] = 1;
t = Table[Factor[f[x, n]], {n, 1, z}]
u = Numerator[t]
TableForm[Table[CoefficientList[u[[n]], x], {n, 1, z}]] (* A247376 array *)
Flatten[CoefficientList[u, x]] (* A247376 sequence *)
-
rown(n) = if (n==0, 1, 1 + (2*x+1)/rown(n-1));
tabl(nn) = for (n=0, nn, print(Vecrev(numerator(rown(n))))); \\ Michel Marcus, Oct 28 2014
A371943
Number of permutations that end with a consecutive pattern 123, and avoid consecutive patterns 123 and 213 elsewhere.
Original entry on oeis.org
0, 0, 0, 1, 2, 10, 28, 116, 388, 1588, 5960, 25168, 102856, 453608, 1985008, 9163360, 42486128, 205065136, 1000056928, 5035366208, 25689681760, 134588839648, 715328668736, 3889568161408, 21463055829568, 120839175460160, 690344333849728, 4015753752384256
Offset: 0
For n=0, 1, 2, there are no permutations ending with 123. Hence, a(0)=a(1)=a(2)=0. For n=3, a(3)=1 since 123 is the only permutation that ends with 123. For n=4, a(4)=2 with qualified permutations 3124, 4123. For n=5, a(5)=10 with qualified permutations 14235, 15234, 24135, 25134, 34125, 35124, 43125, 45123, 53124, 54123.
-
a:= proc(n) option remember; `if`(n<3, 0, `if`(n=3, 1,
2*a(n-1)+2*(n-2)*(a(n-2)-a(n-3))-(n-2)*(n-3)*a(n-4)))
end:
seq(a(n), n=0..30); # Alois P. Heinz, Apr 13 2024
-
a[n_]:=a[n]=If[n<3, 0, If[n==3, 1, 2*a[n-1]+2*(n-2)*(a[n-2]-a[n-3])-(n-2)*(n-3)*a[n-4]]]; Table[a[n], {n,0,27}] (* Stefano Spezia, Apr 13 2024 *)
RecurrenceTable[{a[n] == 2*a[n-1] + 2*(n-2)*(a[n-2] - a[n-3]) - (n-2)*(n-3)*a[n-4], a[0] == 0, a[1] == 0, a[2] == 0, a[3] == 1}, a, {n, 0, 30}] (* Vaclav Kotesovec, Apr 14 2024 *)
nmax = 30; FullSimplify[CoefficientList[Series[-1 + E^(x*(2 + x)/2) * (1 + x) + E^((1 + x)^2/2) * Sqrt[Pi/2] * (2 + x)*(Erf[1/Sqrt[2]] - Erf[(1 + x)/Sqrt[2]]), {x, 0, nmax}], x] * Range[0, nmax]!] (* Vaclav Kotesovec, Apr 14 2024 *)
-
def aList(len):
b = [0, 0, 0, 1, 4]
a = [0, 0, 0, 1, 2]
for i in range(4, len):
b.append(b[i] + i * b[i - 1])
a.append(a[i] + i * a[i - 1] + b[i])
return a
print(aList(27))
Comments