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 A159960 #27 Aug 12 2025 06:47:50 %S A159960 1,10,292,16152,1443616,189709600,34420171584,8241995095936, %T A159960 2517637537094656,955377719901439488,440888939541736115200, %U A159960 243144648530111594371072,157920570527279020394569728,119308432982412667510831095808,103738687936577909824307104989184 %N A159960 a(n) = (1/2) * Sum_{k=1..n} (-1)^(k-1) * binomial(2*n-k, k) * binomial(n, k) * 2^k * (2*n-2*k)!. %C A159960 Previous name was "Number of permutations of the set 1,2,..., 2n such that at least one pair of adjacent numbers in the permutation differs by n.", which did not match data. See A386965. - _Giovanni Resta_, Aug 12 2025 %H A159960 G. C. Greubel, <a href="/A159960/b159960.txt">Table of n, a(n) for n = 1..220</a> %F A159960 a(n) = (1/2) * Sum_{k=1..n} (-1)^(k-1) * binomial(2*n-k, k) * binomial(n, k) * 2^k * (2*n-2*k)!. %F A159960 Recurrence: (6*n - 17)*a(n) = 2*(n-1)*(36*n^2 - 156*n + 151)*a(n-1) - 4*(n-1)*(72*n^4 - 636*n^3 + 2062*n^2 - 2909*n + 1511)*a(n-2) + 4*(n-2)*(n-1)*(96*n^5 - 1280*n^4 + 6704*n^3 - 17208*n^2 + 21596*n - 10569)*a(n-3) + 8*(n-3)*(n-2)*(n-1)*(2*n - 7)*(6*n - 11)*a(n-4). - _Vaclav Kotesovec_, Mar 15 2014 %F A159960 a(n) ~ (1-BesselJ(0,2)) * sqrt(Pi) * 4^n * n^(2*n+1/2) / exp(2*n). - _Vaclav Kotesovec_, Mar 15 2014 %p A159960 f := proc (n) add((-1)^(k-1)*binomial(2*n-k, k)*binomial(n, k)*2^k*factorial(2*n-2*k), k = 1 .. n)/2 end proc; %t A159960 a[n_] := (2*n)!*(1-HypergeometricPFQ[{-n}, {1, -2*n}, -2])/2; Table[a[n], {n, 1, 15}] (* _Jean-François Alcover_, Jan 27 2014 *) %o A159960 (PARI) a(n)=sum(k=1,n,(-1)^(k-1)*binomial(2*n-k,k)*binomial(n, k)<<k*(2*n-2*k)!)/2 \\ _Charles R Greathouse IV_, Jun 19 2013 %Y A159960 Cf. A002674, A386965. %K A159960 easy,nonn %O A159960 1,2 %A A159960 Ji Li (vieplivee(AT)hotmail.com), Apr 28 2009 %E A159960 Name corrected and edited by _Giovanni Resta_, Aug 12 2025