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 A104629 #26 Apr 27 2023 06:11:20 %S A104629 1,2,6,18,57,186,622,2120,7338,25724,91144,325878,1174281,4260282, %T A104629 15548694,57048048,210295326,778483932,2892818244,10786724388, %U A104629 40347919626,151355847012,569274150156,2146336125648,8110508473252 %N A104629 Expansion of (1-2*x-sqrt(1-4*x))/(x^2 * (1+2*x+sqrt(1-4*x))). %C A104629 Diagonal sums of A039598. %H A104629 G. C. Greubel, <a href="/A104629/b104629.txt">Table of n, a(n) for n = 0..1000</a> %F A104629 a(n) = A000957(n+3). %F A104629 a(n) = (1 + Sum_{k=0..n+2} C(k)*(-2)^k)/(8*(-2)^n), where C(n) = Catalan numbers. %F A104629 D-finite with recurrence: 2*(n+3)*a(n) +(-7*n-9)*a(n-1) +2*(-2*n-3)*a(n-2)=0. - _R. J. Mathar_, Oct 30 2014 [Verified by _Georg Fischer_, Apr 27 2023] %t A104629 CoefficientList[Series[((1-2x-Sqrt[1-4x])/(1+2x+Sqrt[1-4x]))/x^2,{x,0,30}],x] (* _Harvey P. Dale_, Jul 23 2016 *) %t A104629 Table[(1 + Sum[CatalanNumber[n]*(-2)^k, {k,0,n+2}])/(8*(-2)^n), {n,0,30}] (* _G. C. Greubel_, Aug 12 2018 *) %o A104629 (PARI) x='x+O('x^30); Vec((1-2*x-sqrt(1-4*x))/(x^2*(1+2*x+sqrt(1-4*x)))) \\ _G. C. Greubel_, Aug 12 2018 %o A104629 (PARI) for(n=0,30, print1((1 + sum(k=0,n+2, (-2)^k*binomial(2*k, k)/(k+1)))/(8*(-2)^n), ", ")) \\ _G. C. Greubel_, Aug 12 2018 %o A104629 (Magma) m:=30; R<x>:=PowerSeriesRing(Rationals(), m); Coefficients(R!((1-2*x-Sqrt(1-4*x))/(x^2*(1+2*x+Sqrt(1-4*x))))); // _G. C. Greubel_, Aug 12 2018 %o A104629 (Python) %o A104629 from itertools import count, islice %o A104629 def A104629_gen(): # generator of terms %o A104629 a, c = 0, 1 %o A104629 for n in count(1): %o A104629 yield (a:=(c:=c*((n<<2)+2)//(n+2))-a>>1) %o A104629 A104629_list = list(islice(A104629_gen(),20)) # _Chai Wah Wu_, Apr 26 2023 %Y A104629 Cf. A000108, A000957, A039598, A064310. %Y A104629 Partial sums of A122920. %K A104629 easy,nonn %O A104629 0,2 %A A104629 _Paul Barry_, Mar 17 2005