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.
%I A342912 #20 Jan 05 2025 15:48:04 %S A342912 1,1,3,6,15,36,91,232,603,1585,4213,11298,30537,83097,227475,625992, %T A342912 1730787,4805595,13393689,37458330,105089229,295673994,834086421, %U A342912 2358641376,6684761125,18985057351,54022715451,154000562758,439742222071,1257643249140,3602118427251 %N A342912 a(n) = [x^n] (1 - 2*x - sqrt((1 - 3*x)/(1 + x)))/(2*x^3). %F A342912 D-finite with recurrence a(n) = (2*a(n - 1) + 3*a(n - 2))*(n + 1)/(n + 3) for n >= 3. %F A342912 a(n) = (-1)^n*hypergeom([1/2, -2 - n], [2], 4). %F A342912 a(n) ~ (3^(n + 7/2)*(16*n + 11))/(128*sqrt(Pi)*(n + 2)^(5/2)). %F A342912 G.f.: (M(x) - 1) / (x + x^2) where M(x) is the g.f. of A001006. - _Werner Schulte_, Jan 05 2025 %p A342912 gf := (1 - 2*x - sqrt((1 - 3*x)/(1 + x)))/(2*x^3): ser := series(gf, x, 36): %p A342912 seq(coeff(ser, x, n), n = 0..30); %p A342912 a := proc(n) option remember; `if`(n < 3, [1, 1, 3][n + 1], %p A342912 ((2*a(n - 1) + 3*a(n - 2))*(n + 1))/(n + 3)) end: seq(a(n), n=0..30); %t A342912 a[n_] := (-1)^n*HypergeometricPFQ[{1/2, -2 - n}, {2}, 4] %t A342912 Table[a[n], {n, 0, 30}] %o A342912 (Python) %o A342912 def rnum(): %o A342912 a, b, n = 1, 3, 3 %o A342912 yield 1 %o A342912 yield 1 %o A342912 while True: %o A342912 yield b %o A342912 n += 1 %o A342912 a, b = b, (n*(3*a + 2*b))//(n + 2) %o A342912 A342912 = rnum() %o A342912 print([next(A342912) for _ in range(31)]) %Y A342912 The diagonal sums of the Motzkin triangle A064189 (with the Motzkin numbers A001006 as first column), the row sums of A020474, and a shifted version of the Riordan numbers A005043. %K A342912 nonn,easy %O A342912 0,3 %A A342912 _Peter Luschny_, Apr 18 2021