%I #64 Aug 01 2022 09:58:11
%S 1,2,7,33,183,1118,7281,49626,349999,2535078,18758265,141254655,
%T 1079364105,8350678170,65298467487,515349097713,4100346740511,
%U 32858696386766,265001681344569
%N a(n) = Sum{k=0..n} binomial(n,k)^2*C(k), where C() = A000108() are the Catalan numbers.
%C Main diagonal of square table A086617 of coefficients, T(n,k), of x^n*y^k in f(x,y) that satisfies f(x,y) = 1/[(1-x)(1-y)] + xy*f(x,y)^2.
%C a(n) is the number of permutations of length 2n which are invariant under the reverse-complement map and have no decreasing subsequences of length 4. - _Eric S. Egge_, Oct 21 2008
%C In 2012, _Zhi-Wei Sun_ proved that for any odd prime p we have the congruence a(1) + ... + a(p-1) == 0 (mod p^2). - _Zhi-Wei Sun_, Aug 22 2013
%H Vincenzo Librandi, <a href="/A086618/b086618.txt">Table of n, a(n) for n = 0..200</a>
%H D. Daly and L. Pudwell, <a href="http://faculty.valpo.edu/lpudwell/slides/sandiego2013.pdf">Pattern avoidance in rook monoids</a>, 2013.
%H T. Denton, <a href="http://arxiv.org/abs/1303.3767">Algebraic and Affine Pattern Avoidance</a>, arXiv preprint arXiv:1303.3767 [math.CO], 2013.
%H Z.-W. Sun, <a href="http://arxiv.org/abs/1112.1034">Congruences for Franel numbers</a>, arXiv preprint arXiv:1112.1034 [math.NT], 2011. See (1.22).
%H Z.-W. Sun, <a href="http://dx.doi.org/10.1016/j.jnt.2012.05.014">On sums of Apery polynomials and related congruences</a>, J. Number Theory 132(2012), 2673-2699.
%F Recurrence: (n+3)^2*(4*n+7)*a(n+2) = 2*(20*n^3+117*n^2+220*n+135)*a(n+1) - 9*(n+1)^2*(4*n+11)*a(n). - _Vaclav Kotesovec_, Sep 11 2012
%F a(n) ~ 3^(5/2)/(8*Pi) * 9^n/n^2. - _Vaclav Kotesovec_, Oct 06 2012
%F G.f.: (1-(1-9*x)^(1/3)*hypergeom([1/3,1/3],[1],-27*x*(1-x)^2/(1-9*x)^2))/(6*x). - _Mark van Hoeij_, May 02 2013
%F a(n) = hypergeom([1/2,-n,-n], [1,2], 4). - _Vladimir Reshetnikov_, Oct 03 2016
%F D-finite with recurrence (n+1)^2*a(n) +(-19*n^2+8*n+6)*a(n-1) +9*(11*n^2-30*n+21)*a(n-2) -81*(n-2)^2*a(n-3)=0. - _R. J. Mathar_, Aug 01 2022
%e a(5) = 1118 = 1*1^2 + 1*5^2 + 2*10^2 + 5*10^2 + 14*5^2 + 42*1^2.
%t Flatten[{1,RecurrenceTable[{(n+3)^2*(4*n+7)*a[n+2]==2*(20*n^3+117*n^2+220*n+135)*a[n+1]-9*(n+1)^2*(4*n+11)*a[n],a[1]==2,a[2]==7},a,{n,1,20}]}] (* _Vaclav Kotesovec_, Sep 11 2012 *)
%t Table[HypergeometricPFQ[{1/2, -n, -n}, {1, 2}, 4], {n, 0, 20}] (* _Vladimir Reshetnikov_, Oct 03 2016 *)
%o (PARI) a(n)=sum(k=0,n-1,binomial(n-1,k)^2*binomial(2*k,k)/(k+1)) \\ _Charles R Greathouse IV_, Sep 12 2012
%o (PARI) a(n)=sum(k=0,n-1,(4*k+3)*sum(i=0,k,binomial(k,i)^2*binomial(2*i,i)))/3/n^2 \\ _Charles R Greathouse IV_, Sep 12 2012
%Y Cf. A086617 (table), A086615 (antidiagonal sums), A003046 (determinants).
%Y Cf. A000108.
%Y Cf. A228456.
%K nonn
%O 0,2
%A _Paul D. Hanna_, Jul 24 2003
%E Edited by _N. J. A. Sloane_, Sep 14 2012. The formula in the new definition was first sent in by _Michael Somos_, Feb 19 2004
%E Minor edits _Vaclav Kotesovec_, Mar 31 2014