%I M1460 #88 Apr 21 2024 09:58:42
%S 1,2,5,14,43,142,494,1780,6563,24566,92890,353740,1354126,5204396,
%T 20066492,77575144,300572963,1166868646,4537698722,17672894044,
%U 68923788698,269129985796,1052051579012,4116719558104,16123810230158,63205319996092,247959300028484
%N a(n) = (2^n + C(2*n,n))/2.
%C Hankel transform is A008619. - _Paul Barry_, Nov 13 2007
%C a(n) is the number of lattice paths from (0,0) to (n,n) using E(1,0) and N(0,1) as steps that horizontally cross the diagonal y = x with even many times. For example, a(2) = 5 because there are 6 paths in total and only one of them horizontally crosses the diagonal with odd many times, namely, NEEN. - _Ran Pan_, Feb 01 2016
%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="/A005317/b005317.txt">Table of n, a(n) for n = 0..1664</a> (first 179 terms from Vincenzo Librandi)
%H Jelena Đokic, <a href="https://arxiv.org/abs/2308.04155">A short note on the order of the double reduced 2-factor transfer digraph for rectangular grid graphs</a>, arXiv:2308.04155 [math.CO], 2023.
%H Jelena Đokić, Olga Bodroža-Pantić, and Ksenija Doroslovački, <a href="https://toc.ui.ac.ir/article_27132_9a8d8a500b7f86816f7197d109e4d710.pdf">A spanning union of cycles in rectangular grid graphs, thick grid cylinders and Moebius strips</a>, Transactions on Combinatorics (2023) Art. 27132.
%H T. Kløve, <a href="https://doi.org/10.37236/193">Generating functions for the number of permutations with limited displacement</a>, Electron. J. Combin., 16 (2009), #R104. - From _N. J. A. Sloane_, May 04 2011.
%H Peter Fishburn, <a href="/A005317/a005317.pdf">Letter to N. J. A. Sloane, Mar 1987</a>
%H Mircea Merca, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL15/Merca1/merca6.html">A Note on Cosine Power Sums</a> J. Integer Sequences, Vol. 15 (2012), Article 12.5.3.
%H Ran Pan and Jeffrey B. Remmel, <a href="http://arxiv.org/abs/1601.07988">Paired patterns in lattice paths</a>, arXiv:1601.07988 [math.CO], 2016.
%H Simon Plouffe, <a href="http://arxiv.org/abs/0911.4975">Master's Thesis, copy at the arXiv site</a>, arXiv:0911.4975 [math.NT], 2009.
%F From _Simon Plouffe_, Feb 18 2011: (Start)
%F G.f.: (1/2)*(-4*x+1+(-(4*x-1)*(2*x-1)^2)^(1/2))/(4*x-1)/(2*x-1).
%F Recurrence: 0 = (-24-28*n-8*n^2)*a(n+1) + (18+22*n+6*n^2)*a(n+2) + (-3-4*n-n^2)*a(n+3), a(0)=1, a(1)=2, a(2)=5. (End)
%F a(n) = Sum_{k=0..floor(n/2)} (-1)^k*C(2*n, n-2*k), n > 0. - _Mircea Merca_, Jun 20 2011
%F E.g.f.: (exp(2*x)*(1+BesselI(0,2*x))/2 = G(0)/2; G(k) = 1 + (k)!/(P-2*x*(2*k+1)*(P^2)/(2*x*(2*k+1)*P+(k+1)^2*k!/G(k+1))), where P:=((2*k)!)/(2^k)/((k)!) (continued fraction). - _Sergei N. Gladkovskii_, Dec 20 2011
%F a(n) = Sum_{r=0..n} k*(k+1)/2 where k=C(n,r). - _J. M. Bergot_, Sep 04 2013
%F a(n) = binomial(2*n,n) - A108958(n). - _Ran Pan_, Feb 01 2016
%F a(n) ~ 2^(2*n-1)/sqrt(n*Pi). - _Stefano Spezia_, Apr 17 2024
%p f := n->(2^n+binomial(2*n,n))/2;
%t Table[(2^n + Binomial[2 n, n])/2, {n, 0, 26}] (* _Michael De Vlieger_, Feb 01 2016 *)
%o (Magma) [(2^n+Binomial(2*n,n))/2: n in [0..26]]; // _Bruno Berselli_, Jun 20 2011
%o (Maxima) makelist(sum((-1)^k*binomial(2*n,n-2*k),k,0,floor(n/2)),n,0,26); \\ _Bruno Berselli_, Jun 20 2011
%o (PARI) a(n)=(2^n+binomial(2*n,n))/2 \\ _Charles R Greathouse IV_, Dec 20 2011
%Y Cf. A008619, A108958.
%K nonn,easy
%O 0,2
%A _N. J. A. Sloane_ and Peter Fishburn