%I M1857 N0735 #103 Sep 18 2024 12:50:36
%S 0,2,8,38,192,1002,5336,28814,157184,864146,4780008,26572086,
%T 148321344,830764794,4666890936,26283115038,148348809216,838944980514,
%U 4752575891144,26964373486406,153196621856192,871460014012682,4962895187697048,28292329581548718
%N a(n) = 2 * Sum_{k=0..n-1} binomial(n-1, k)*binomial(n+k, k).
%C a(n) is the number of order-preserving partial self maps of {1,...,n}. For example, a(2) = 8 because there are 8 order-preserving partial self maps of {1,2}: (1 2), (1 1), (2 2), (1 -), (2 -), (- 1), (- 2), (- -). Here for example (2 -) represents the partial map which maps 1 to 2 but does not include 2 in its domain. - _James East_, Oct 25 2005
%C From _Peter Bala_, Mar 02 2020: (Start)
%C For fixed m = 1,2,3,..., we conjecture that the sequence b(n) := a(m*n) satisfies a recurrence of the form P(2*m,n)*b(n+1) + P(2*m,-n)*b(n-1) = Q(2*m,n)*b(n), where the polynomials P(2*m,n) and Q(2*m,n) have degree 2*m. Conjecturally, the polynomial Q(2*m,n) is an even function of n; its 2*m zeros seem to belong to the interval [-1, 1] and 2*m - 2 of these zeros appear to lie close to the rational numbers of the form +-(2*k + 1)/(2*m), where 0 <= k <= m - 2. Cf. A103885. (End)
%C a(n), n>0, is the number of points at L1 distance = n from any given point in Z^n. The sequence is also the difference between the central diagonal (A001850) and +-1 diagonal (A002002) of the Delannoy number triangle (A008288). - _Shel Kaphan_, Feb 15 2023
%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 Seiichi Manyama, <a href="/A002003/b002003.txt">Table of n, a(n) for n = 0..1000</a> (terms 0..200 from T. D. Noe)
%H Peter Bala, <a href="/A002003/a002003_2.pdf">A supercongruence for A002003</a>
%H J. Brzozowski, M. Szykula, <a href="http://arxiv.org/abs/1401.0157">Large Aperiodic Semigroups</a>, arXiv preprint arXiv:1401.0157 [cs.FL], 2013-2014.
%H Milan Janjić, <a href="https://arxiv.org/abs/1905.04465">On Restricted Ternary Words and Insets</a>, arXiv:1905.04465 [math.CO], 2019.
%H G. Rutledge and R. D. Douglass, <a href="http://www.jstor.org/stable/2301099">Integral functions associated with certain binomial coefficient sums</a>, Amer. Math. Monthly, 43 (1936), 27-32.
%F a(n) = 2*A047781(n).
%F From _Vladeta Jovovic_, Mar 28 2004: (Start)
%F G.f.: ((1+x)/sqrt(1-6*x+x^2)-1)/2.
%F E.g.f.: exp(3*x)*(2*BesselI(0, 2*sqrt(2)*x)+sqrt(2)*BesselI(1, 2*sqrt(2)*x)). (End)
%F a(n) = T(n, n-1), array T as in A064861.
%F a(n) = T(n, n-2), array T as in A049600.
%F a(n+1) = A110110(2n+1). - _Tilman Neumann_, Feb 05 2009
%F a(n) = 2 * JacobiP(n-1,0,1,3) = ((7*n+3)*LegendreP(n,3) - (n+1)*LegendreP(n+1,3)) /(2*n) for n > 0. - _Mark van Hoeij_, Jul 12 2010
%F Logarithmic derivative of A006318, the large Schroeder numbers. - _Paul D. Hanna_, Oct 25 2010
%F D-finite with recurrence: 4*(3*n^2-6*n+2)*a(n-1) - (n-2)*(2*n-1)*a(n-2) - n*(2*n-3)*a(n)=0. - _Vaclav Kotesovec_, Oct 04 2012
%F a(n) ~ (3+2*sqrt(2))^n/(2^(3/4)*sqrt(Pi*n)). - _Vaclav Kotesovec_, Oct 04 2012
%F Recurrence (an alternative): n*a(n) = (6-n)*a(n-6) + 2*(5*n-27)*a(n-5) + (84-15*n)*a(n-4) + 52*(3-n)*a(n-3) + 3*(2-5*n)*a(n-2) + 2*(5*n-3)*a(n-1), n>=7. - _Fung Lam_, Feb 05 2014
%F a(n) = Hyper2F1([-n, n], [1], -1) for n > 0. - _Peter Luschny_, Aug 02 2014
%F a(n) = [x^n] ((1+x)/(1-x))^n for n > 0. - _Seiichi Manyama_, Jun 07 2018
%F From _Peter Bala_, Mar 13 2020: (Start)
%F a(n) = 2 * Sum_{k = 0..n-1} 2^k*C(n,k+1)*C(n-1,k).
%F a(n) = 2 * (-1)^(n+1) * Sum_{k = 0..n-1} (-2)^k*C(n+k,n-1)*C(n-1,k).
%F a(n) = Sum_{k = 0..n} C(n,k)*C(2*n-k-1,n-1).
%F Conjecture: a(n) = - [x^n] (1 - F(x))^n, where F(x) = 2*x + 6*x^2 + 34*x^3 + 238*x^4 + ... is the o.g.f. of A108424. Equivalently, a(n) = -[x^n](G(x))^(-n), where G(x) = 1 + 2*x + 10*x^2 + 66*x^3 + 498*x^4 + ... is the o.g.f. of A027307.
%F a(p) == 2 ( mod p^3 ) for prime p >= 5. (End)
%F a(n) = Sum_{k = 1..n} C(n, k) * C(n-1, k-1) * 2^k. - _Michael Somos_, May 23 2021
%F a(n) = A001850(n) - A002002(n), for n > 0. - _Shel Kaphan_, Feb 15 2023
%e G.f. = 2*x + 8*x^2 + 38*x^3 + 192*x^4 + 1002*x^5 + 5336*x^6 + 28814*x^7 + ...
%p A064861 := proc(n,k) option remember; if n = 1 then 1; elif k = 0 then 0; else A064861(n,k-1)+(3/2-1/2*(-1)^(n+k))*A064861(n-1,k); fi; end; seq(A064861(i,i-1),i=1..40);
%t Flatten[{0,Table[SeriesCoefficient[((1+x)/Sqrt[1-6*x+x^2]-1)/2,{x,0,n}],{n,1,20}]}] (* _Vaclav Kotesovec_, Oct 04 2012 *)
%t a[ n_] := If[ n < 1, 0, Hypergeometric2F1[ n, -n, 1, -1]]; (* _Michael Somos_, Aug 24 2014 *)
%t Table[2*Sum[Binomial[n-1,k]Binomial[n+k,k],{k,0,n-1}],{n,0,30}] (* _Harvey P. Dale_, Sep 18 2024 *)
%o (PARI) {a(n) = if( n<1, 0, polcoeff( ((1 - x^2) / (1 - x)^2 + x * O(x^n))^n, n))} /* _Michael Somos_, Sep 24 2003 */
%o (Python)
%o from math import comb
%o def A002003(n): return sum(comb(n,k)**2*k<<k-1 for k in range(1,n+1))//n<<1 if n else 0 # _Chai Wah Wu_, Mar 22 2023
%Y Cf. A002002, A006318, A027307, A108424, A103885.
%K nonn
%O 0,2
%A _N. J. A. Sloane_
%E More terms from Barbara Haas Margolius (b.margolius(AT)csuohio.edu), Oct 10 2001