cp's OEIS Frontend

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.

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)!.

Original entry on oeis.org

1, 10, 292, 16152, 1443616, 189709600, 34420171584, 8241995095936, 2517637537094656, 955377719901439488, 440888939541736115200, 243144648530111594371072, 157920570527279020394569728, 119308432982412667510831095808, 103738687936577909824307104989184
Offset: 1

Views

Author

Ji Li (vieplivee(AT)hotmail.com), Apr 28 2009

Keywords

Comments

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

Crossrefs

Programs

  • Maple
    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;
  • Mathematica
    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 *)
  • PARI
    a(n)=sum(k=1,n,(-1)^(k-1)*binomial(2*n-k,k)*binomial(n, k)<Charles R Greathouse IV, Jun 19 2013

Formula

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)!.
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
a(n) ~ (1-BesselJ(0,2)) * sqrt(Pi) * 4^n * n^(2*n+1/2) / exp(2*n). - Vaclav Kotesovec, Mar 15 2014

Extensions

Name corrected and edited by Giovanni Resta, Aug 12 2025