Displaying 1-10 of 201 results found.
page
1
2
3
4
5
6
7
8
9
10
11
Inverse Euler transform of the Riordan numbers, ( A005043).
+20
18
1, 0, 1, 1, 2, 5, 11, 28, 68, 174, 445, 1166, 3068, 8190, 21994, 59585, 162360, 445145, 1226376, 3394654, 9434260, 26317865, 73661588, 206809307, 582255448, 1643536725, 4650250254, 13186484316, 37468566744, 106666821221, 304200399505, 868977304140, 2486163857424
MAPLE
EulerInvTransform := proc(f) local c, b;
c := proc(n) option remember;
ifelse(n = 0, f(0), f(n) - b(n, n-1)) end:
b := proc(n, k) option remember;
if n = 0 then return 1 elif k < 1 then return 0 fi;
add(binomial(c(k) + j - 1, j)*b(n-k*j, k-1), j=0..n/k) end:
c end:
a := EulerInvTransform( A005043): seq(a(n), n = 0..32);
MATHEMATICA
EulerInvTransform[seq_List] := Module[{final = {}}, Do[AppendTo[final, i*seq[[i]] - Sum[final[[d]]*seq[[i-d]], {d, i-1}]], {i, Length[seq]}]; Table[Sum[MoebiusMu[i/d]*final[[d]], {d, Divisors[i]}]/i, {i, Length[seq] }]];
PROG
(SageMath)
z = LazyPowerSeriesRing(ZZ, 'z').gen()
g = 1 + z + sqrt(1 - 2*z - 3*z**2)
f = -z * g.derivative() / g
print([1] + [sum(moebius(n // d) * f[d]
for d in divisors(n)) // n for n in range(1, 33)])
(Python)
from typing import Callable
from functools import cache
from math import comb
# Define 'binomial' for compatibility with Maple.
def binomial(n: int, k: int) -> int:
if 0 <= k <= n: return comb(n, k)
if k <= n < 0: return comb(-k-1, n-k)*(-1)**(n-k)
if n < 0 <= k: return comb(-n+k-1, k)*(-1)**k
return 0
def EulerInvTransform(f: Callable) -> Callable:
@cache
def h(n: int, k: int) -> int:
if n == 0: return 1
if k < 1: return 0
return sum(binomial(b(k)+j-1, j) * h(n-k*j, k-1)
for j in range(1 + n // k))
@cache
def b(n: int) -> int:
if n == 0: return f(0)
return f(n) - h(n, n - 1)
return b
print([a(n) for n in range(33)])
Inverse binomial transform of A005043.
+20
17
1, -1, 2, -3, 6, -10, 20, -35, 70, -126, 252, -462, 924, -1716, 3432, -6435, 12870, -24310, 48620, -92378, 184756, -352716, 705432, -1352078, 2704156, -5200300, 10400600, -20058300, 40116600, -77558760, 155117520, -300540195, 601080390, -1166803110
COMMENTS
Moment sequence of the trace of the square of a random matrix in USp(2)=SU(2). If X=tr(A^2) is a random variable (a distributed with Haar measure) then a(n) = E[X^n]. - Andrew V. Sutherland, Feb 29 2008
This array is one of a family of Catalan arrays related by compositions of the special fractional linear (Mobius) transformation P(x,t) = x/(1-t*x); its inverse Pinv(x,t) = P(x,-t); an o.g.f. of the Catalan numbers A000108, C(x) = [1-sqrt(1-4x)]/2; and its inverse Cinv(x) = x*(1-x). The Motzkin sums, or Riordan numbers, A005043 are generated by Mot(x)=C[P(x,1)]. One could, of course, choose the Riordan numbers as the parent sequence.
O.g.f.: G(x) = C[P[P(x,1),1]1] = C[P(x,2)] = (1-sqrt(1-4*x/(1+2*x)))/2 = x - x^2 + 2 x^3 - ... = Mot[P(x,1)].
Ginv(x) = Pinv[Cinv(x),2] = P[Cinv(x),-2] = x(1-x)/[1-2x(1-x)] = (x-x^2)/[1-2(x-x^2)] = x* A146559(x).
Cf. A091867 and A210736 for an unsigned version with a leading 1. (End)
FORMULA
a(n) = (-1)^n*C(n, floor(n/2)) = (-1)^n* A001405(n).
a(n) = (1/Pi)*Integral_{t=0..Pi}(2cos(2t))^n*2sin^2(t) dt. - Andrew V. Sutherland, Feb 29 2008, Mar 09 2008
a(n) = (-2)^n + Sum_{k=0..n-1} a(k)*a(n-1-k), a(0)=1. - Philippe Deléham, Dec 12 2009
O.g.f.: (1 + x*c(x^2))/(1 + 2*x), with the o.g.f. c(x) for the Catalan numbers A000108. From the o.g.f. of the Riordan type Catalan triangle A053121. This is the rewritten g.f. given in the previous formula. This is G(-x) with the o.g.f. G(x) of A001405. - Wolfdieter Lang, Sep 22 2013
D-finite with recurrence (n+1)*a(n) + 2*a(n-1) + 4*(-n+1)*a(n-2) = 0. - R. J. Mathar, Dec 04 2013
Recurrence (an alternative): (n+1)*a(n) = 8*(n-2)*a(n-3) + 4*(n-2)*a(n-2) + 2*(-n-1)*a(n-1), n>=3. - Fung Lam, Mar 22 2014
Asymptotics: a(n) ~ (-1)^n*2^(n+1/2)/sqrt(n*Pi). - Fung Lam, Mar 22 2014
E.g.f.: BesselI(0,2*x) - BesselI(1,2*x). - Peter Luschny, Dec 17 2014
G.f. A(x) satisfies: A(x) = 1/(1 + 2*x) + x*A(x)^2. - Ilya Gutkovskiy, Jul 10 2020
Sum_{n>=0} 1/a(n) = 2/3 - 2*Pi/(9*sqrt(3)). - Amiram Eldar, Oct 04 2025
MAPLE
egf := BesselI(0, 2*x) - BesselI(1, 2*x):
seq(n!*coeff(series(egf, x, 34), x, n), n=0..33); # Peter Luschny, Dec 17 2014
MATHEMATICA
CoefficientList[Series[(1 + 2 x - Sqrt[1 - 4 x^2])/(2 x (1 + 2 x)), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 23 2013 *)
PROG
(PARI) my(x='x+O('x^50)); Vec((1+2*x-sqrt(1-4*x^2))/(2*x*(1+2*x))) \\ Altug Alkan, Nov 03 2015
CROSSREFS
Cf. A000012, A000108, A000984, A001405, A001700, A064613, A005043, A007317, A146559, A091867, A104455, A210736.
Bisection of Motzkin sums ( A005043).
+20
8
1, 1, 3, 15, 91, 603, 4213, 30537, 227475, 1730787, 13393689, 105089229, 834086421, 6684761125, 54022715451, 439742222071, 3602118427251, 29671013856627, 245613376802185, 2042162142208813, 17047255430494497, 142816973618414817
COMMENTS
The Kn4 triangle sums of A175136 lead to the sequence given above (n >= 1). For the definition of the Kn4 and other triangle sums see A180662. - Johannes W. Meijer, May 06 2011
Equals the expected value of trace(O)^(2n), where O is a 3 X 3 orthogonal matrix randomly selected according to Haar measure (see MathOverflow link). - Nathaniel Johnston, Sep 05 2014
In Smith (1985), we apparently have a(n) = P(2*n), where P(n) is the number of linearly independent three-dimensional n-th order isotropic tensors. In the paper, he refers to Smith (1968) for more details. It is not clear why he does not list the values of P(2*n+1). See also the 1978 letter of D. L. Andrews to N. J. A. Sloane.
Eric Weisstein gives some details on how the material in Smith (1968) about isotropic tensors is related to Motzkin sums. (End)
REFERENCES
G. F. Smith, On isotropic tensors and rotation tensors of dimension m and order n, Tensor (N.S.), Vol. 19 (1968), 79-88 (MR0224008).
FORMULA
Recurrence: n*(2*n + 1)*a(n) = (2*n - 1)*(13*n - 10)*a(n-1) - 3*(26*n^2 - 87*n + 76)*a(n-2) + 27*(n - 2)*(2*n - 5)*a(n-3). - Vaclav Kotesovec, Oct 17 2012
Conjecture: a(n) = (2/Pi)*Integral_{t=0..1} sqrt((1 - t)/t)*(1 - 8*t + 16*t^2)^n. - Benedict W. J. Irwin, Oct 05 2016
a(n) = Sum_{j=0..2*n+1} (C(2*j,j)*(-1)^(j)*C(2*n+1,j+1))/(2*n+1). - Vladimir Kruchinin, Apr 02 2017
a(n) = hypergeom([1/2, -2*n], [2], 4). - Peter Luschny, Jul 25 2020
Irwin's conjecture is true (see Fried link). - Sela Fried, Mar 15 2026
MAPLE
G := (1+x-sqrt(1-2*x-3*x^2))/(2*x*(1+x)): Gser := series(G, x=0, 60):
a := n -> hypergeom([1/2, -2*n], [2], 4):
MATHEMATICA
Take[CoefficientList[Series[(1 + x - Sqrt[1 - 2 * x - 3 * x^2])/(2 * x * (1 + x)), {x, 0, 60}], x], {1, -1, 2}] (* Vaclav Kotesovec, Oct 17 2012 *)
PROG
(PARI) x='x+O('x^66); v=Vec((1+x-sqrt(1-2*x-3*x^2))/(2*x*(1+x))); vector(#v\2, n, v[2*n-1]) \\ Joerg Arndt, May 12 2013
(Maxima)
a(n):=sum(binomial(2*j, j)*(-1)^(j)*binomial(2*n+1, j+1), j, 0, 2*n+1)/(2*n+1); /* Vladimir Kruchinin, Apr 02 2017*/
Numbers k such that the k-th standard ordered rooted tree is lone-child-avoiding (counted by A005043).
+20
8
1, 4, 8, 16, 18, 25, 32, 36, 50, 57, 64, 72, 100, 114, 121, 128, 137, 144, 200, 228, 242, 249, 256, 258, 274, 281, 288, 385, 393, 400, 456, 484, 498, 505, 512, 516, 548, 562, 569, 576, 770, 786, 793, 800, 897, 905, 912, 968, 996, 1010, 1017, 1024, 1032, 1096
COMMENTS
We define the n-th standard ordered rooted tree to be obtained by taking the (n-1)-th composition in standard order (graded reverse-lexicographic, A066099) as root and replacing each part with its own standard ordered rooted tree. This ranking is an ordered variation of Matula-Goebel numbers, giving a bijective correspondence between positive integers and unlabeled ordered rooted trees.
EXAMPLE
The initial terms and their corresponding trees:
1: o
4: (oo)
8: (ooo)
16: (oooo)
18: ((oo)o)
25: (o(oo))
32: (ooooo)
36: ((oo)oo)
50: (o(oo)o)
57: (oo(oo))
64: (oooooo)
72: ((oo)ooo)
100: (o(oo)oo)
114: (oo(oo)o)
121: (ooo(oo))
128: (ooooooo)
137: ((oo)(oo))
144: ((oo)oooo)
200: (o(oo)ooo)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
srt[n_]:=If[n==1, {}, srt/@stc[n-1]];
Select[Range[100], FreeQ[srt[#], _[__]?(Length[#]==1&)]&]
CROSSREFS
These trees are counted by A005043.
The series-reduced case appears to be counted by A284778.
A358371 and A358372 count leaves and nodes in standard ordered rooted trees.
Cf. A000014, A001263, A001679, A004249, A061775, A063895, A187306, A331489, A331490, A331934, A358373, A358377.
Triangle (read by rows) with row sums = Motzkin sums (also called Riordan numbers) ( A005043): T(n,s) = (1/n)*C(n,s)*(C(n-s,s+1) - C(n-s-2,s-1)).
+20
7
1, 1, 2, 1, 5, 1, 9, 5, 1, 14, 21, 1, 20, 56, 14, 1, 27, 120, 84, 1, 35, 225, 300, 42, 1, 44, 385, 825, 330, 1, 54, 616, 1925, 1485, 132, 1, 65, 936, 4004, 5005, 1287, 1, 77, 1365, 7644, 14014, 7007, 429
COMMENTS
Whereas A005043 counts certain trees, or noncrossed partitions, this subdivides the counts according to the number of leaves, or the lattice rank. Analogous to the Narayana triangle ( A001263), where rows sum to the Catalan numbers.
Related to the number of certain non-crossing partitions for the root system A_n. Cf. p. 12, Athanasiadis and Savvidou. See also A108263 and A100754. - Tom Copeland, Oct 19 2014
FORMULA
a(n,k) = binomial(n,k)*binomial(n-2-k,k)/(k+1). - David Callan, Jul 22 2008
O.g.f.: (1 + x - sqrt(1 - 2*x + x^2*(1 - 4*a)))/(2*x*(1 + a*x)) = 1 + a*x^2 + a*x^3 + (a + 2*a^2)*x^4 + (a + 5*a^2)*x^5 + (a + 9*a^2 + 5*a^3)*x^6 + ... . [corrected by Jason Yuen, Sep 22 2024]
Define a functional I on formal power series of the form f(x) = 1 + a*x + b*x^2 + ... by the following iterative process. Define inductively f^(1)(x) = f(x) and f^(n+1)(x) = f(x*f^(n)(x)) for n >= 1. Then set I(f(x)) = lim n -> infinity f^(n)(x) in the x-adic topology on the ring of formal power series; the operator I may also be defined by I(f(x)) := 1/x*series reversion of x/f(x).
Let now f(x) = 1 + a*x^2 + a*x^3 + a*x^4 + ... . Then the o.g.f. for this table is I(f(x)) = 1 + a*x^2 + a*x^3 + (a + 2*a^2)*x^4 + (a + 5*a^2)*x^5 + (a + 9*a^2 + 5*a^3)*x^6 + ... . Cf. A001263 and A108767. (End)
EXAMPLE
A005043(6) = 15 = 1+9+5 since NC (noncrossed, planar) partitions of 6-point cycle without singletons have 1,9,5 items with 1,2,3 blocks.
Triangle begins:
1;
1, 2;
1, 5;
1, 9, 5;
1, 14, 21;
1, 20, 56, 14;
1, 27, 120, 84;
1, 35, 225, 300, 42;
1, 44, 385, 825, 330;
...
MATHEMATICA
Map[Most, Table[(1/n) Binomial[n, s] (Binomial[n - s, s + 1] - Binomial[n - s - 2, s - 1]), {n, 3, 14}, {s, 0, n}] /. k_ /; k <= 0 -> Nothing] // Flatten (* Michael De Vlieger, Jan 09 2016 *)
PROG
(Magma) /* triangle excluding 0 */ [[Binomial(n, k)*Binomial(n-2-k, k)/(k+1): k in [0..n-3]]: n in [3..15]]; // Vincenzo Librandi, Oct 19 2014
AUTHOR
Frank R. Bernhart (farb45(AT)gmail.com), Oct 30 2007
0, 1, 6, 36, 232, 1585, 11298, 83097, 625992, 4805595, 37458330, 295673994, 2358641376, 18985057351, 154000562758, 1257643249140, 10331450919456, 85317692667643, 707854577312178, 5897493615536452, 49320944483427000, 413887836110423787, 3484084625456932134, 29412628894558563849
REFERENCES
G. F. Smith, On isotropic tensors and rotation tensors of dimension m and order n, Tensor (N.S.), Vol. 19 (1968), 79-88 (MR0224008).
FORMULA
Recurrence: (n+1)*(2*n+1)*a(n) = n*(26*n-7)*a(n-1) - 3*(26*n^2 - 61*n + 39)*a(n-2) + 27*(n-2)*(2*n-3)*a(n-3). - Vaclav Kotesovec, Oct 17 2012
a(n) = -hypergeom([-2*n - 1, 1/2], [2], 4). - Peter Luschny, Jul 26 2020
MAPLE
G := (1+x-sqrt(1-2*x-3*x^2))/(2*x*(1+x)): Gser := series(G, x=0, 60):
a := n -> -hypergeom([-2*n-1, 1/2], [2], 4):
MATHEMATICA
Take[CoefficientList[Series[(1+x-Sqrt[1-2*x-3*x^2])/(2*x*(1+x)), {x, 0, 60}], x], {2, -1, 2}] (* Vaclav Kotesovec, Oct 17 2012 *)
PROG
(PARI) x='x+O('x^66); v=Vec((1+x-sqrt(1-2*x-3*x^2))/(2*x*(1+x))); vector(#v\2, n, v[2*n]) \\ Joerg Arndt, May 12 2013
(SageMath)
def A():
a, b, c, d, n = 0, 1, 1, -1, 1
yield 0
while True:
n += 1
a, b = b, (3*(n-1)*n*a+(2*n-1)*n*b)//((n+1)*(n-1))
c, d = d, (3*(n-1)*c-(2*n-1)*d)//n
if n%2: yield -(d + b)*(1-(-1)^n)//2
Riordan array ( 1/(1-x), x* A005043(x) ).
+20
3
1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 3, 1, 1, 1, 6, 5, 4, 1, 1, 1, 12, 12, 7, 5, 1, 1, 1, 27, 26, 19, 9, 6, 1, 1, 1, 63, 63, 43, 27, 11, 7, 1, 1, 1, 154, 153, 110, 63, 36, 13, 8, 1, 1, 1, 386, 386, 275, 169, 86, 46, 15, 9, 1, 1
FORMULA
R(n,k) = k*Sum_{i=0..(n-k)} (Sum_{j=k..(n-i)} binomial(2*j-k-1,j-1) *(-1)^(n-j-i) *binomial(n-i,j))/(n-i), k>0.
R(n,0)=1.
EXAMPLE
Array begins:
1;
1, 1;
1, 1, 1;
1, 2, 1, 1;
1, 3, 3, 1, 1;
1, 6, 5, 4, 1, 1;
1, 12, 12, 7, 5, 1, 1;
1, 27, 26, 19, 9, 6, 1, 1;
MAPLE
A185812 := proc(n, k) if n = k or k =0 then 1; else k*add(1/(n-i)*add(binomial(2*j-k-1, j-1) *(-1)^(n-j-i) *binomial(n-i, j), j=k..n-i), i=0..n-k) ; end if; end proc:
MATHEMATICA
r[n_, k_] := k*Sum[Binomial[2*j - k - 1, j - 1]*(-1)^(n - j - i)*Binomial[n - i, j]/(n - i), {i, 0, n - k}, {j, k, n - i}]; r[n_, 0] = 1; Table[r[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 21 2013 *)
0, 0, 1, 1, 5, 11, 34, 92, 265, 751, 2156, 6194, 17874, 51702, 149941, 435749, 1268761, 3700391, 10808548, 31613474, 92577784, 271407896, 796484503, 2339561795, 6877992334, 20236257626, 59581937299, 175546527727, 517538571125, 1526679067331, 4505996000730
COMMENTS
The inverse binomial transform of a(n) is A194590(n).
FORMULA
a(n) = Sum_{k=0..n} C(n,k)* A194590(k).
a(n) = (n mod 2)+(1/2)*Sum_{k=1..n} (-1)^k*C(n,k)*(k+1)$*((k+1)/2)^(k mod 2). Here n$ denotes the swinging factorial A056040(n).
a(n) = PSUMSIGN([0,0,1,2,6,16,45,..] = PSUMSIGN([0,0, A005717]) where PSUMSIGN is from Sloane's "Transformations of integer sequences". - Peter Luschny, Jan 17 2012
a(n) = hypergeom([1-n/2,-n,3/2-n/2],[1,2-n],4) for n>=3. - Peter Luschny, Mar 07 2017
MAPLE
# Alternative: more efficient:
(n mod 2)+(1/2)*add((-1)^k*binomial(n, k)* A100071(k+1), k=1..n) end:
# Alternative:
a := n -> `if`(n<3, iquo(n, 2), hypergeom([1-n/2, -n, 3/2-n/2], [1, 2-n], 4)): seq(simplify(a(n)), n=0..30); # Peter Luschny, Mar 07 2017
MATHEMATICA
sf[n_] := With[{f = Floor[n/2]}, Pochhammer[f+1, n-f]/f!]; a[n_] := Mod[n, 2] + (1/2)*Sum[(-1)^k*Binomial[n, k]*2^-Mod[k, 2]*(k+1)^Mod[k, 2]*sf[k+1], {k, 1, n}]; Table[a[n], {n, 0, 10}] (* Jean-François Alcover, Jul 30 2013, from 2nd method *)
Table[If[n < 3, Quotient[n, 2], HypergeometricPFQ[{1 - n/2, -n, 3/2 - n/2}, {1, 2-n}, 4]], {n, 0, 30}] (* Peter Luschny, Mar 07 2017 *)
PROG
(Maxima)
a(n):=sum(binomial(n+2, k)*binomial(n-k, k), k, 0, (n)/2); /* Vladimir Kruchinin, Sep 28 2015 */
(PARI) a(n) = sum(k=0, n/2, binomial(n+2, k)*binomial(n-k, k));
Triangle read by rows: T(n,k) = binomial(n,k)*r(k), where r(k) are the Riordan numbers (r(k) = A005043(k); 0 <= k <= n).
+20
2
1, 1, 0, 1, 0, 1, 1, 0, 3, 1, 1, 0, 6, 4, 3, 1, 0, 10, 10, 15, 6, 1, 0, 15, 20, 45, 36, 15, 1, 0, 21, 35, 105, 126, 105, 36, 1, 0, 28, 56, 210, 336, 420, 288, 91, 1, 0, 36, 84, 378, 756, 1260, 1296, 819, 232, 1, 0, 45, 120, 630, 1512, 3150, 4320, 4095, 2320, 603
COMMENTS
Row sums = Catalan numbers, A000108: (1, 1, 2, 5, 14, 42...); e.g., sum of row 4 terms = A000108(4) = 14 = (1 + 0 + 6 + 4 + 3). A005043 is the inverse binomial transform of the Catalan numbers.
EXAMPLE
First few rows of the triangle:
1;
1, 0;
1, 0, 1;
1, 0, 3, 1;
1, 0, 6, 4, 3;
1, 0, 10, 10, 15, 6;
1, 0, 15, 20, 45, 36, 15;
...
MAPLE
r:=n->(1/(n+1))*sum((-1)^i*binomial(n+1, i)*binomial(2*n-2*i, n-i), i=0..n): T:=(n, k)->r(k)*binomial(n, k): for n from 0 to 12 do seq(T(n, k), k=0..n) od; # yields sequence in triangular form
MATHEMATICA
T[n_, k_]:= T[n, k]= Binomial[n, k]*Sum[(-1)^j*Binomial[k+1, j]* Binomial[2*(k-j), k-j], {j, 0, k}]/(k+1); Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Nov 19 2019 *)
PROG
(PARI) T(n, k) = b=binomial; b(n, k)*sum(j=0, k, (-1)^j*b(k+1, j)*b(2*(k-j), k-j))/(k+1); \\ G. C. Greubel, Nov 19 2019
(Magma) B:=Binomial; [B(n, k)*(&+[(-1)^j*B(k+1, j)*B(2*(k-j), k-j): j in [0..k]])/(k+1): k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 19 2019
(SageMath) b=binomial; [[b(n, k)*sum((-1)^j*b(k+1, j)*b(2*(k-j), k-j) for j in (0..k))/(k+1) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 19 2019
(GAP) B:=Binomial;; Flat(List([0..12], n-> List([0..n], k-> B(n, k)* Sum([0..k], j-> (-1)^j*B(k+1, j)*B(2*(k-j), k-j))/(k+1) ))); # G. C. Greubel, Nov 19 2019
a(n) = Sum_{j=0..n} binomial(n, j) * A005043(j)^2.
+20
2
1, 1, 2, 5, 20, 102, 612, 3999, 27680, 199700, 1488392, 11390062, 89102224, 710137300, 5750979288, 47224773405, 392536909320, 3298058212320, 27976268700480, 239354631743268, 2063696517194016, 17917829988706056, 156562239801890352, 1375981317571505910, 12157754181729121176
MAPLE
a := n -> local j; add(binomial(n, j) * simplify(hypergeom([-j, 1/2], [2], 4))^2, j = 0..n): seq(a(n), n = 0..24);
PROG
(Python)
def gen():
a, b, n, m = 1, 0, 0, 1
row = []
while True:
row.append(m * m)
for k in range(n, 0, -1): row[k - 1] += row[k]
yield row[0]
m = n * (2 * b + 3 * a) // (n + 2)
a, b = (a, b) if n == 0 else (b, m)
n += 1
print([next( A397419) for _ in range(25)])
Search completed in 0.003 seconds
|