login
Search: a059480 -id:a059480
     Sort: relevance | references | number | modified | created      Format: long | short | data
Coefficient triangle of the numerators of the (n-th convergents to) the continued fraction 1/(w+2/(w+3/(w+4/... .
+10
4
1, 0, 1, 3, 0, 1, 0, 7, 0, 1, 15, 0, 12, 0, 1, 0, 57, 0, 18, 0, 1, 105, 0, 141, 0, 25, 0, 1, 0, 561, 0, 285, 0, 33, 0, 1, 945, 0, 1830, 0, 510, 0, 42, 0, 1, 0, 6555, 0, 4680, 0, 840, 0, 52, 0, 1, 10395, 0, 26685, 0, 10290, 0, 1302, 0, 63, 0, 1, 0, 89055, 0, 82845, 0, 20370, 0, 1926, 0, 75, 0, 1
OFFSET
1,4
COMMENTS
Equivalence to the recurrence formula needs formal proof. This continued fraction converges to 0.525135276160981... for w=1. A conjecture by Ramanujan puts this equal to -1 + 1/(sqrt(e*Pi/2) - Sum_{k>=1} 1/(2k-1)!!). Row sums equal A059480.
FORMULA
b(0)=1; b(1)=w; b(n) = w*b(n-1) + (n+1)*b(n-2) (conjecture).
EXAMPLE
The numerator of 1/(w+2/(w+3/(w+4/(w+5/(w+6/w))))) equals 57w + 18w^3 + w^5.
From Philippe Deléham, Nov 06 2013: (Start)
Triangle begins:
1;
0, 1;
3, 0, 1;
0, 7, 0, 1;
15, 0, 12, 0, 1;
0, 57, 0, 18, 0, 1;
105, 0, 141, 0, 25, 0, 1;
0, 561, 0, 285, 0, 33, 0, 1;
945, 0, 1830, 0, 510, 0, 42, 0, 1;
0, 6555, 0, 4680, 0, 840, 0, 52, 0, 1;
10395, 0, 26685, 0, 10290, 0, 1302, 0, 63, 0, 1;
... (End)
[extended by M. F. Hasler, Oct 21 2014]
MATHEMATICA
Table[ CoefficientList[ Numerator[ Together[ Fold[ #2/(w+#1) &, Infinity, Reverse @ Table[ k, {k, 1, n} ] ] ] ], w ], {n, 2, 16} ] or equivalently Clear[ b ]; b[ 0 ]=1; b[ 1 ]=w; b[ n_ ]:=b[ n ] = w b[ n-1 ]+(n+1) b[ n-2 ]; Table[ CoefficientList[ b[ k ]//Expand, w ], {k, 0, 14} ]
PROG
(PARI) t=x-w; for(n=1, 12, t=substpol(t, x, w+n/x); print(Vecrev(numerator(substpol(t, x, w))))) \\ M. F. Hasler, Oct 21 2014
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Wouter Meeussen, Aug 08 2010
STATUS
approved
Triangle read by rows where T(n+1,k)=T(n,k)+n*T(n-1,k) starting with T(n,n)=1 and T(n,k)=0 if n<k.
+10
1
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,4
COMMENTS
For n>k+1, T(n,k) is a multiple of k+2.
Eigentriangle of inverse of (-1)^(n-k)*A094587. Row sums are A187044. - Paul Barry, Mar 02 2011
FORMULA
T(n, k+1)=(T(n, k-1)-T(n-1, k))/k for 0<k<n.
EXAMPLE
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
CROSSREFS
Columns include A000085, A000932, A059480. Right hand columns effectively include A000012 (twice), A000027, A005843, A028552. Cf. A062323 for a triangle with similar formulas.
KEYWORD
easy,nonn,tabl
AUTHOR
Henry Bottomley, May 23 2002
STATUS
approved
Triangular array: row n gives the coefficients of the polynomial p(n,x) defined in Comments.
+10
1
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,2
COMMENTS
The polynomial p(n,x) is the numerator of the rational function given by f(n,x) = 1 + (2*x + 1)/f(n-1,x), where f(0,x) = 1.
(Sum of numbers in row n) = A059480(n+1) for n >= 0.
(Column 1) is essentially A000045 (Fibonacci numbers).
LINKS
Clark Kimberling, Rows 0..100, flattened
FORMULA
f(0,x) = 1/1, so that p(0,x) = 1
f(1,x) = (2 + 2 x)/1, so that p(1,x) = 2 + 2 x;
f(2,x) = (3 + 5 x)/(2 + 2 x), so that p(2,x) = 3 + 5 x.
First 6 rows of the triangle of coefficients:
1
2 2
3 5
5 15 8
8 35 33
13 80 131 48
MATHEMATICA
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 *)
PROG
(PARI) 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
CROSSREFS
KEYWORD
nonn,tabf,easy
AUTHOR
Clark Kimberling, Oct 23 2014
STATUS
approved
Number of permutations that end with a consecutive pattern 123, and avoid consecutive patterns 123 and 213 elsewhere.
+10
0
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,5
COMMENTS
(This can be proved by observing the possible positions of n.)
LINKS
Sergi Elizalde and Yixin Lin, Penney's game for permutations, arXiv:2404.06585 [math.CO], 2024.
FORMULA
a(0)=a(1)=a(2)=0, a(3)=1, a(4)=2; a(n) = a(n-1)+(n-1)*a(n-2)+b(n-1), where b(n) = b(n-1)+(n-1)*b(n-2) is the same sequence as A059480, up to the first initial terms. Here, our b(n) has initial terms 0, 0, 0, 1, 4.
From Vaclav Kotesovec, Apr 14 2024: (Start)
a(n) ~ c * n^((n+1)/2) * exp(sqrt(n) - n/2), where c = exp(-1/4) / sqrt(2) - exp(1/4) * sqrt(Pi) * erfc(1/sqrt(2)) / 2 = 0.189615662815288097469466802437...
E.g.f.: -1 + exp(x*(2 + x)/2) * (1 + x) + exp((1 + x)^2/2) * sqrt(Pi/2) * (2 + x) * (erf(1/sqrt(2)) - erf((1 + x)/sqrt(2))). (End)
EXAMPLE
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.
MAPLE
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
MATHEMATICA
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 *)
PROG
(Python)
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))
CROSSREFS
Cf. A059480.
KEYWORD
nonn
AUTHOR
Yixin Lin, Apr 13 2024
STATUS
approved

Search completed in 0.005 seconds