login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A000957 Fine's sequence (or Fine numbers): number of relations of valence >= 1 on an n-set; also number of ordered rooted trees with n nodes having root of even degree.
(Formerly M1624 N0635)
77

%I M1624 N0635 #316 Jan 05 2024 14:58:52

%S 0,1,0,1,2,6,18,57,186,622,2120,7338,25724,91144,325878,1174281,

%T 4260282,15548694,57048048,210295326,778483932,2892818244,10786724388,

%U 40347919626,151355847012,569274150156,2146336125648,8110508473252,30711521221376

%N Fine's sequence (or Fine numbers): number of relations of valence >= 1 on an n-set; also number of ordered rooted trees with n nodes having root of even degree.

%C Row-sum of signed Catalan triangle A009766. - _Wouter Meeussen_

%C There are two schools of thought about the best indexing for these numbers. Deutsch and Shapiro have a(4) = 6 whereas here a(5) = 6. The formulas given here use both labelings.

%C From D. G. Rogers, Oct 18 2005: (Start)

%C I notice that you have some other zero-one evaluations of binary bracketings (such as A055395). But if you have an operation # with 0#0 = 1#0 = 1, 0#1 = 1#1 = 0, and look at the number of bracketings of a string of n 0's that come out 0, you get another instance of the Fine numbers.

%C For Z = 1 + x(ZW + WW) = 1 + x CW and W = x(ZZ + ZW) = xZC. Hence Z = 1 + xxCCZ, the functional equational for the g.f. of the Fine numbers. Indeed, C = Z + W = Z + xCZ.

%C In terms of rooted planar trees with root of even degree, this says that of all rooted planar trees, some have root of even degree (Z) and some have root of odd degree (xCZ). (End)

%C Hankel transform of a(n+1) = [1,0,1,2,6,18,57,186,...] is A000012 = [1,1,1,1,1,...]. - _Philippe Deléham_, Oct 24 2007

%C Starting with offset 3 = iterates of M * [1,0,0,0,...] where M = a tridiagonal matrix with [0,2,2,2,...] as the main diagonal and [1,1,1,...] as the super and subdiagonals. - _Gary W. Adamson_, Jan 09 2009

%C Starting with 1 and convolved with A068875 = the Catalan numbers with offset 1. - _Gary W. Adamson_, May 01 2009

%C For a relation to non-crossing partitions of the root system A_n, see A100754. - _Tom Copeland_, Oct 19 2014

%C From _Tom Copeland_, Nov 02 2014: (Start)

%C Let P(x) = x/(1+x) with comp. inverse Pinv(x) = x/(1-x) = -P[-x], and C(x) = [1-sqrt(1-4x)]/2, an o.g.f. for the shifted Catalan numbers A000108, with inverse Cinv(x) = x * (1-x).

%C Fin(x) = P[C(x)] = C(x)/[1 + C(x)] is an o.g.f. for the Fine numbers, A000957 with inverse Fin^(-1)(x) = Cinv[Pinv(x)] = Cinv[-P(-x)] = (x-2x^2)/(1-x)^2, and Fin(Cinv(x)) = P(x).

%C Mot(x) = C[P(x)] = C[-Pinv(-x)] gives an o.g.f. for shifted A005043, the Motzkin or Riordan numbers with comp. inverse Mot^(-1)(x) = Pinv[Cinv(x)] = (x - x^2) / (1 - x + x^2) (cf. A057078).

%C BTC(x) = C[Pinv(x)] gives A007317, a binomial transform of the Catalan numbers, with BTC^(-1)(x) = P[Cinv(x)] = (x-x^2) / (1 + x - x^2).

%C Fib(x) = -Fin[Cinv(Cinv(-x))] = -P[Cinv(-x)] = x + 2 x^2 + 3 x^3 + 5 x^4 + ... = (x+x^2)/[1-x-x^2] is an o.g.f. for the shifted Fibonacci sequence A000045, so the comp. inverse is Fib^(-1)(x) = -C[Pinv(-x)] = -BTC(-x) and Fib(x) = -BTC^(-1)(-x).

%C Generalizing to P(x,t) = x /(1 + t*x) and Pinv(x,t) = x /(1 - t*x) = -P(-x,t) gives other relations to lattice paths, such as the o.g.f. for A091867, C[P[x,1-t]], and that for A104597, Pinv[Cinv(x),t+1].

%C (End)

%C a(n+1) is the number of Dyck paths of semilength n avoiding UD at Level 0. For n = 3 the a(4) = 2 such Dyck paths are UUUDDD and UUDUDD. - _Ran Pan_, Sep 23 2015

%C For n >= 3, a(n) is the number of permutations pi of [n-2] such that s(pi) avoids the patterns 132, 231, and 312, where s is West's stack-sorting map. - _Colin Defant_, Sep 16 2018

%C Named after the American scientist Terrence Leon Fine (1939-2021). - _Amiram Eldar_, Jun 08 2021

%D Emeric Deutsch and Louis W. Shapiro, Seventeen Catalan identities, Bull. Instit. Combin. Applic., Vol. 31 (2001), pp. 31-38.

%D Ki Hang Kim, Douglas G. Rogers and Fred W. Roush, Similarity relations and semiorders. Proceedings of the Tenth Southeastern Conference on Combinatorics, Graph Theory and Computing (Florida Atlantic Univ., Boca Raton, Fla., 1979), pp. 577-594, Congress. Numer., XXIII-XXIV, Utilitas Math., Winnipeg, Man., 1979. MR0561081 (81i:05013). - _N. J. A. Sloane_, Jun 05 2012

%D Louis W. Shapiro and Carol J. Wang, Generating identities via 2 X 2 matrices, Congressus Numerantium, 205 (2010), 33-46.

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Alois P. Heinz, <a href="/A000957/b000957.txt">Table of n, a(n) for n = 0..1670</a> (first 201 terms from T. D. Noe)

%H Francesca Aicardi, <a href="https://arxiv.org/abs/2310.07317">Fuss-Catalan Triangles</a>, arXiv:2310.07317 [math.CO], 2023.

%H Martin Aigner, <a href="http://dx.doi.org/10.1016/j.disc.2007.06.012">Enumeration via ballot numbers</a>, Discrete Math., 308 (2008), 2544-2563.

%H M. Albert, R. Aldred, M. Atkinson, C Handley, D. Holton, D. McCaughan and H. van Ditmarsch, <a href="https://doi.org/10.37236/1928">Sorting Classes</a>, Elec. J. of Comb., Vol. 12 (2005), R31.

%H Elena Barcucci, Elisa Pergola, Renzo Pinzani and Simone Rinaldi, <a href="https://www.emis.de/journals/SLC/wpapers/s46rinaldi.html">ECO method and hill-free generalized Motzkin paths</a>, Séminaire Lotharingien de Combinatoire, 46 (2001).

%H Jean-Luc Baril, <a href="https://doi.org/10.37236/665">Classical sequences revisited with permutations avoiding dotted pattern</a>, Electronic Journal of Combinatorics, Vol. 18 (2011), #P178.

%H Paul Barry, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL8/Barry/barry84.html">A Catalan Transform and Related Transformations on Integer Sequences</a>, Journal of Integer Sequences, Vol. 8 (2005), Article 05.4.5.

%H Paul Barry, <a href="https://arxiv.org/abs/1803.06408">Three Études on a sequence transformation pipeline</a>, arXiv:1803.06408 [math.CO], 2018.

%H Paul Barry, <a href="https://arxiv.org/abs/2004.04577">On a Central Transform of Integer Sequences</a>, arXiv:2004.04577 [math.CO], 2020.

%H Paul Barry, <a href="https://arxiv.org/abs/2107.14278">Series reversion with Jacobi and Thron continued fractions</a>, arXiv:2107.14278 [math.NT], 2021.

%H Paul Barry, <a href="https://arxiv.org/abs/2307.00098">Moment sequences, transformations, and Spidernet graphs</a>, arXiv:2307.00098 [math.CO], 2023.

%H George Beck and Karl Dilcher, <a href="https://arxiv.org/abs/2106.10400">A Matrix Related to Stern Polynomials and the Prouhet-Thue-Morse Sequence</a>, arXiv:2106.10400 [math.CO], 2021.

%H Rachael Boyd and Richard Hepworth, <a href="https://arxiv.org/abs/2006.04261">Combinatorics of injective words for Temperley-Lieb algebras</a>, arXiv:2006.04261 [math.AT], 2020.

%H Naiomi Tuere Cameron, <a href="https://web.archive.org/web/20050315140649/http://www.math.hmc.edu/~cameron/dissertation.pdf">Random walks, trees and extensions of Riordan group techniques</a>, Dissertation, Howard University, 2002.

%H Naiomi T. Cameron and Jillian E. McLeod, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL19/McLeod/mcleod3.html">Returns and Hills on Generalized Dyck Paths</a>, Journal of Integer Sequences, Vol. 19 (2016), #16.6.1.

%H Peter J. Cameron, <a href="http://dx.doi.org/10.1016/0012-365X(89)90081-2">Some sequences of integers</a>, Discrete Math., Vol. 75, No. 1-3 (1989), pp. 89-102; also in "Graph Theory and Combinatorics 1988", ed. B. Bollobas, Annals of Discrete Math., Vol. 43 (1989), pp. 89-102.

%H Johann Cigler and Christian Krattenthaler, <a href="https://arxiv.org/abs/2003.01676">Hankel determinants of linear combinations of moments of orthogonal polynomials</a>, arXiv:2003.01676 [math.CO], 2020.

%H Ari Cruz, Pamela E. Harris, Kimberly J. Harry, Jan Kretschmann, Matt McClinton, Alex Moon, John O. Museus, and Eric Redmon, <a href="https://arxiv.org/abs/2312.16786">On some discrete statistics of parking functions</a>, arXiv:2312.16786 [math.CO], 2023. See p. 13.

%H Dennis E. Davenport, Lara K. Pudwell, Louis W. Shapiro and Leon C. Woodson, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Davenport/dav3.html">The Boundary of Ordered Trees</a>, Journal of Integer Sequences, Vol. 18 (2015), Article 15.5.8.

%H Dennis E. Davenport, Louis W. Shapiro and Leon C. Woodson, <a href="http://math.colgate.edu/~integers/u8/u8.Abstract.html">A bijection between the triangulations of convex polygons and ordered trees</a>, Integers, Vol. 20 (2020), Article #A8.

%H Colin Defant, <a href="https://arxiv.org/abs/1809.03123">Stack-sorting preimages of permutation classes</a>, arXiv:1809.03123 [math.CO], 2018.

%H Emeric Deutsch and Louis W. Shapiro, <a href="http://dx.doi.org/10.1016/S0012-365X(01)00121-2">A survey of the Fine numbers</a>, Discrete Math., Vol. 241 (2001), pp. 241-265.

%H Filippo Disanto, Andrea Frosini and Simone Rinaldi and Renzo Pinzani, <a href="http://www.seams-bull-math.ynu.edu.cn/downloadfile.jsp?filemenu=_200805&amp;filename=The%20Combinatorics%20of%20Convex%20Permutominoes.pdf">The Combinatorics of Convex Permutominoes</a>, Southeast Asian Bulletin of Mathematics, Vol. 32 (2008), pp. 883-912.

%H R. R. X. Du, J. He, X. Yun, <a href="http://arxiv.org/abs/1501.07468">Counting vertices in plane and k-ary trees with given outdegree</a>, arXiv preprint arXiv:1501.07468 [math.CO], 2015.

%H Shalosh B. Ekhad, Mingjia Yang and Doron Zeilberger, <a href="http://arxiv.org/abs/1707.04654">Automated proofs of many conjectured recurrences in the OEIS made by R. J. Mathar</a>, arXiv:1707.04654 (2017)

%H Sergio Falcon, <a href="http://www.mathnet.or.kr/mathnet/thesis_file/CKMS-28-4-827-832.pdf">Catalan transform of the K-Fibonacci sequence</a>, Commun. Korean Math. Soc. 28 (2013), No. 4, pp. 827-832; http://dx.doi.org/10.4134/CKMS.2013.28.4.827.

%H Terrence Fine, <a href="http://dx.doi.org/10.1016/S0019-9958(70)90177-4">Extrapolation when very little is known about the source</a>, Information and Control, Vol. 16 (1970), pp. 331-359.

%H Shishuo Fu and Yaling Wang, <a href="https://arxiv.org/abs/1908.03912">Bijective recurrences concerning two Schröder triangles</a>, arXiv:1908.03912 [math.CO], 2019.

%H Taras Goy and Mark Shattuck, <a href="https://arxiv.org/abs/2303.10223">Hessenberg-Toeplitz Matrix Determinants with Schröder and Fine Number Entries</a>, arXiv:2303.10223 [math.CO], 2023.

%H Candice Jean-Louis and Asamoah Nkwanta, <a href="http://dx.doi.org/10.1016/j.laa.2012.10.027">Some algebraic structure of the Riordan group</a>, Linear Algebra and its Applications, Vol. 438, No. 5 (2013), pp. 2018-2035. - _N. J. A. Sloane_, Jan 03 2013

%H Sergey Kitaev, Anna de Mier, Marc Noy, <a href="http://dx.doi.org/10.1016/j.ejc.2013.06.013">On the number of self-dual rooted maps</a>, European J. Combin., Vol. 35 (2014), pp. 377-387. MR3090510. See page 827.

%H Sergey Kitaev, Jeffrey Remmel and Mark Tiefenbruck, <a href="http://arxiv.org/abs/1201.6243">Marked mesh patterns in 132-avoiding permutations I</a>, arXiv preprint arXiv:1201.6243 [math.CO], 2012. - From _N. J. A. Sloane_, May 09 2012

%H Sergey Kitaev, Jeffrey Remmel, and Mark Tiefenbruck, <a href="http://www.emis.de/journals/INTEGERS/papers/p16/p16.Abstract.html">Quadrant Marked Mesh Patterns in 132-Avoiding Permutations II</a>, Electronic Journal of Combinatorial Number Theory, Volume 15 #A16. (<a href="http://arxiv.org/abs/1302.2274">arXiv:1302.2274</a>)

%H John W. Layman, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL4/LAYMAN/hankel.html">The Hankel Transform and Some of its Properties</a>, J. Integer Sequences, Vol. 4 (2001), Article 01.1.5.

%H Toufik Mansour and Mark Shattuck, <a href="http://arxiv.org/abs/1407.3516">Chebyshev Polynomials and Statistics on a New Collection of Words in the Catalan Family</a>, arXiv:1407.3516 [math.CO], 2014.

%H Peter McCalla and Asamoah Nkwanta, <a href="https://arxiv.org/abs/1901.07092">Catalan and Motzkin Integral Representations</a>, arXiv:1901.07092 [math.NT], 2019.

%H Asamoah Nkwanta and Akalu Tefera, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL16/Nkwanta/nkwanta4.html">Curious Relations and Identities Involving the Catalan Generating Function and Numbers</a>, Journal of Integer Sequences, Vol. 16 (2013), Article 13.9.5.

%H Paul Peart and Wen-Jin Woan, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL3/PEART/peart1.html">Generating Functions via Hankel and Stieltjes Matrices</a>, J. Integer Seqs., Vol. 3 (2000), Article 00.2.1.

%H Paul Peart and Wen-Jin Woan, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL4/PEART/pwatjis2.html">Dyck Paths With No Peaks at Height k</a>, J. Integer Sequences, Vol. 4 (2001), Article 01.1.3.

%H Aaron Robertson, Dan Saracino and Doron Zeilberger, <a href="http://arXiv.org/abs/math.CO/0203033">Refined restricted permutations</a>, arXiv:math/0203033 [math.CO], 2002.

%H D. G. Rogers, <a href="http://dx.doi.org/10.1016/0097-3165(77)90082-6">Similarity relations on finite ordered sets</a>, J. Combin. Theory, Series A, Vol. 23, No. 1 (1977), pp. 88-98. Erratum, loc. cit., Vol. 25 (1978), pp. 95-96.

%H Louis W. Shapiro and Carol J. Wang, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL12/Shapiro/shapiro7.html">A bijection between 3-Motzkin paths and Schroder paths with no peak at odd height</a>, JIS, Vol. 12 (2009), Article 09.3.2.

%H Volker Strehl, <a href="http://dx.doi.org/10.1016/0012-365X(77)90124-8">A note on similarity relations</a>, Discr. Math., Vol. 19, No. 1 (1977), pp. 99-102.

%H Hua Sun and Yi Wang, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL17/Wang/wang11.html">A Combinatorial Proof of the Log-Convexity of Catalan-Like Numbers</a>, J. Int. Seq., Vol. 17 (2014), Article 14.5.2

%H Murray Tannock, <a href="https://skemman.is/bitstream/1946/25589/1/msc-tannock-2016.pdf">Equivalence classes of mesh patterns with a dominating pattern</a>, M.Sc. Thesis, Reykjavik Univ., May 2016.

%H <a href="/index/Ro#rooted">Index entries for sequences related to rooted trees</a>

%F Catalan(n) = 2*a(n+1) + a(n), n >= 1. [Corrected by _Pontus von Brömssen_, Jul 23 2022]

%F a(n) = (A064306(n-1) + (-1)^(n-1))/2^n, n >= 1.

%F G.f.: (1-sqrt(1-4*x))/(3-sqrt(1-4*x)) (compare g.f. for Catalan numbers, A000108). - _Emeric Deutsch_

%F a(n) ~ 4^n/(9*n*sqrt(n*Pi)). (Corrected by _Peter Luschny_, Oct 26 2015.)

%F a(n) = (2/(n-1))*Sum_{j=0..n-3}(-2)^j*(j+1)*binomial(2n-1, n-3-j), n>=2. - _Emeric Deutsch_, Dec 26 2003

%F a(n) = 3*Sum_{j=0..floor((n-1)/2)} binomial(2n-2j-2, n-1) - binomial(2n, n) for n>0. - _Emeric Deutsch_, Jan 28 2004

%F Reversion of g.f. (x-2x^2)/(1-x)^2. - _Ralf Stephan_, Mar 22 2004

%F a(n) = ((-1)^n/2^n)*(-3/4-(1/4)*sum{k=0..n, C(1/2, k)8^k})+0^n; a(n) = ((-1)^n/2^n)*(-3/4-(1/4)*sum{k=0..n, (-1)^(k-1)*2^k*(2k)!/((k!)^2*(2k-1))})+0^n. - _Paul Barry_, Jun 10 2005

%F Hankel determinant transform is 1-n. - _Michael Somos_, Sep 17 2006

%F a(n+1) = A126093(n,0). - _Philippe Deléham_, Mar 05 2007

%F a(n+1) has g.f. 1/(1-0*x-x^2/(1-2*x-x^2/(1-2*x-x^2/(1-2*x-x^2/(..... (continued fraction). - _Paul Barry_, Dec 02 2008

%F From _Paul Barry_, Jan 17 2009: (Start)

%F G.f.: x*c(x)/(1+x*c(x)), c(x) the g.f. of A000108;

%F a(n+1) = Sum_{k=0..n} (-1)^k*C(2n-k,n-k)*(k+1)/(n+1). (End)

%F a(n) = 3*(-1/2)^(n+1) + Gamma(n+1/2)*4^n*hypergeom([1, n+1/2],[n+2],-8) /(sqrt(Pi)*(n+1)!) (for n>0). - _Mark van Hoeij_, Nov 11 2009

%F Let A be the Toeplitz matrix of order n defined by: A[i,i-1] = -1, A[i,j] = Catalan(j-i), (i<=j), and A[i,j] = 0, otherwise. Then, for n>=1, a(n+1) = (-1)^n*charpoly(A,1). - _Milan Janjic_, Jul 08 2010

%F a(n) = the upper left term in M^n, n>0; where M = the infinite square production matrix:

%F 0, 1, 0, 0, 0, 0, ...

%F 1, 1, 1, 0, 0, 0, ...

%F 1, 1, 1, 1, 0, 0, ...

%F 1, 1, 1, 1, 1, 0, ...

%F 1, 1, 1, 1, 1, 1, ...

%F ...

%F - _Gary W. Adamson_, Jul 14 2011

%F a(n+1) = Sum_{k=0..n} A039598(n,k)*(-2)^k. - _Philippe Deléham_, Nov 04 2011

%F D-finite with recurrence: 2*n*a(n) +(12-7*n)*a(n-1) +2*(3-2*n)*a(n-2)=0. - _R. J. Mathar_, Nov 15 2011

%F a(n) = sum(sum(2^(s-2n-2k)*(n/n+2k)binomial(n+2k, k)*binomial(s-n-1, s-2n-2k), (k=0, ..., floor((s-2n)/2)), (n=1, ..., s) with s>=2. - _José Luis Ramírez Ramírez_, Mar 22 2012

%F 0 = a(n)*(16*a(n+1) + 22*a(n+2) - 20*a(n+3)) + a(n+1)*(34*a(n+1) + 53*a(n+2) - 38*a(n+3)) + a(n+2)*(10*a(n+2) + 4*a(n+3)) for all n in Z if we extend by a(0)=-1, a(-n) = -3/4 * (-2)^n if n>0. - _Michael Somos_, Jan 31 2014 [Corrected by _Pontus von Brömssen_, Aug 04 2022]

%F G.f. A(x) satisfies x*A'(x)/A(x) = x + 2*x^3 + 6*x^4 + 22*x^5 + ..., the o.g.f. for A072547. - _Peter Bala_, Oct 01 2015

%F a(n) = 2^n*(n-2)*(2*n-1)!!*(3*(n-1)*hypergeom([1,3-n], [3+n], 2)-n-2)/(n+2)! + 0^n. - _Vladimir Reshetnikov_, Oct 25 2015

%F a(n) = binomial(2*n,n)*(hypergeom([1,(1-n)/2,1-n/2],[1-n,3/2-n],1)*3/(4-2/n)-1) for n>=2. - _Peter Luschny_, Oct 26 2015

%F O.g.f. A(x) satisfies 1 + A(x) = (1 + 3*Sum_{n >= 1} Catalan(n)*x^n)/(1 + 2*Sum_{n >= 1} Catalan(n)*x^n) = (1 + 2*Sum_{n >= 1} binomial(2*n,n)*x^n )/(1 + 3/2*Sum_{n >= 1} binomial(2*n,n)*x^n). - _Peter Bala_, Sep 01 2016

%F a(n) = Sum_{i=2..n-1} C(n-i-1)*(a(i)+a(i-1)), a(0)=0, a(1)=1, where C(n) = A000108(n). - _Vladimir Kruchinin_, Apr 23 2020

%e G.f. = x + x^3 + 2*x^4 + 6*x^5 + 18*x^6 + 57*x^7 + 186*x^8 + 622*x^9 + 2120*x^10 + ...

%p t1 := (1-sqrt(1-4*x))/(3-sqrt(1-4*x)); t2 := series(t1,x,90); A000957 := n- coeff(t2,x,n);

%p A000957 := proc(n): if n = 0 then 0 else add((-1)^(n+k-1)*binomial(n+k-1, n-1)*(n-k)/n, k=0..n-1) fi: end: seq(A000957(n), n=0..28); # _Johannes W. Meijer_, Jul 22 2013

%p # third Maple program:

%p a:= proc(n) option remember; `if`(n<3, n*(2-n),

%p ((7*n-12)*a(n-1)+(4*n-6)*a(n-2))/(2*n))

%p end:

%p seq(a(n), n=0..32); # _Alois P. Heinz_, Apr 23 2020

%t Table[ Plus@@Table[ (-1)^(m+n) (n+m)!/n!/m! (n-m+1)/(n+1), {m, 0, n} ], {n, 0, 36} ] (* _Wouter Meeussen_ *)

%t a[0] = 0; a[n_] := (1/2)*(-3*(-1/2)^n + 2^(n+1)*(2n-1)!!* Hypergeometric2F1Regularized[2, 2n+1, n+2, -1]); (* _Jean-François Alcover_, Feb 22 2012 *)

%t Table[2^n (n-2) (2n-1)!! (3 (n-1) Hypergeometric2F1[1, 3-n, 3+n, 2] - n - 2)/(n+2)! + KroneckerDelta[n], {n, 0, 20}] (* _Vladimir Reshetnikov_, Oct 25 2015 *)

%o (PARI) {a(n) = if( n<1, 0, polcoeff( 1 / (1 + 2 / (1 - sqrt(1 - 4*x + x*O(x^n)))), n))}; /* _Michael Somos_, Sep 17 2006 */

%o (PARI) {a(n) = if( n<1, 0, polcoeff( 1 / (1 + 1 / serreverse(x - x^2 + x*O(x^n))), n))}; /* _Michael Somos_, Sep 30 2006 */

%o (Haskell)

%o a000957 n = a000957_list !! n

%o a000957_list = 0 : 1 :

%o (map (`div` 2) $ tail $ zipWith (-) a000108_list a000957_list)

%o -- _Reinhard Zumkeller_, Nov 12 2011

%o (Magma) [0,1] cat [n le 1 select n-1 else (Catalan(n)-Self(n-1))/2: n in [1..30]]; // _Vincenzo Librandi_, Nov 17 2016

%o (Sage)

%o def Fine():

%o f, c, n = 1, 1, 1

%o yield 0

%o while True:

%o yield f

%o n += 1

%o c = c * (4*n - 6) // n

%o f = (c - f) // 2

%o a = Fine()

%o print([next(a) for _ in range(29)]) # _Peter Luschny_, Nov 30 2016

%o (Maxima)

%o C(n):=binomial(2*n,n)/(n+1);

%o a(n):=if n<=0 then 0 else if n=1 then 1 else sum(C(n-i-1)*(a(i)+a(i-1)),i,2,n-1);

%o /* _Vladimir Kruchinin_, Apr 23 2020 */

%o (Python)

%o from itertools import count, islice

%o def A000957_gen(): # generator of terms

%o yield from (0,1,0)

%o a, c = 0, 1

%o for n in count(1):

%o yield (a:=(c:=c*((n<<2)+2)//(n+2))-a>>1)

%o A000957_list = list(islice(A000957_gen(),20)) # _Chai Wah Wu_, Apr 26 2023

%Y A column of A065600.

%Y Sequence with signs: A064310.

%Y Bisections: A138413, A138414.

%Y Logarithmic derivative: A072547.

%Y Cf. A068875, A000108, A000045, A005043, A057078, A007317, A091867, A104597.

%Y Cf. A000012, A009766, A039598, A055395, A064306, A100754, A126093.

%K nonn,nice,easy

%O 0,5

%A _N. J. A. Sloane_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 02:27 EDT 2024. Contains 371782 sequences. (Running on oeis4.)