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 A330799 #12 Sep 14 2023 01:47:54 %S A330799 1,3,13,59,285,1419,7245,37659,198589,1059371,5705517,30976571, %T A330799 169338781,931239243,5147825421,28587660123,159406327677,892113040491, %U A330799 5009160335085,28210229053563,159304938535773,901845743050635,5117144607546573,29096321095698843,165765778648482621 %N A330799 Evaluation of the Motzkin polynomials at 1/2 and normalized with 2^n. %H A330799 G. C. Greubel, <a href="/A330799/b330799.txt">Table of n, a(n) for n = 0..1000</a> %F A330799 a(n) = Sum_{k=0..n} A201641(n,k). %F A330799 a(n) = 2^n*Sum_{k=0..n} A064189(n,k)/2^k. %F A330799 a(n) = (-84*(n - 2)*a(n-3) - 2*(8*n + 5)*a(n-2) + (11*n + 5)*a(n-1))/(n + 1). %F A330799 a(n) = [x^n] 2/(1 - 4*x + sqrt((1 - 6*x)*(2*x + 1))). %F A330799 a(n) = [x^n] reverse((x^2 + x)/(7*x^2 + 4*x+1))/x. %p A330799 a := proc(n) option remember; if n < 3 then return [1, 3, 13][n+1] fi; %p A330799 (-84*(n - 2)*a(n-3) - 2*(8*n + 5)*a(n-2) + (11*n + 5)*a(n-1))/(n + 1) end: %p A330799 seq(a(n), n=0..24); %p A330799 # Alternative: %p A330799 gf := 2/(1 - 4*x + sqrt((1 - 6*x)*(2*x + 1))): %p A330799 ser := series(gf, x, 30): seq(coeff(ser,x,n), n=0..24); %p A330799 # Or: %p A330799 series((x^2+x)/(7*x^2+4*x+1), x, 30): gfun:-seriestoseries(%, 'revogf'): %p A330799 convert(%, polynom) / x: seq(coeff(%, x, n), n=0..24); %t A330799 With[{C = Binomial}, A064189[n_, k_] := Sum[C[n, j]* (C[n-j, j+k] - C[n-j, j+k+2]), {j, 0, n}]]; %t A330799 a[n_] := 2^n*Sum[A064189[n, k]/2^k, {k, 0, n}]; %t A330799 Table[a[n], {n, 0, 24}] (* _Jean-François Alcover_, Sep 25 2022 *) %t A330799 (* Second program *) %t A330799 A330799[n_]:= Coefficient[Series[2/(1-4*x+Sqrt[(1-6*x)*(1+2*x)]), {x, 0,50}], x, n]; Table[A330799[n], {n,0,30}] (* _G. C. Greubel_, Sep 14 2023 *) %o A330799 (SageMath) %o A330799 R.<x> = PowerSeriesRing(QQ) %o A330799 f = (x^2 + x)/(7*x^2 + 4*x+1) %o A330799 f.reverse().shift(-1).list() %o A330799 (Magma) %o A330799 m:=30; %o A330799 R<x>:=PowerSeriesRing(Rationals(), m+2); %o A330799 A330799:= func< n | Coefficient(R!( 2/(1-4*x+Sqrt((1-6*x)*(1+2*x))) ), n) >; %o A330799 [A330799(n): n in [0..m]]; // _G. C. Greubel_, Sep 14 2023 %Y A330799 Cf. A064189, A129400, A201641, A330800. %K A330799 nonn %O A330799 0,2 %A A330799 _Peter Luschny_, Jan 01 2020