login
Number of ways of arranging 2*n tokens in a row, with 2 copies of each token from 1 through n, such that between every pair of tokens labeled i (i = 1..n-1) there is exactly one taken labeled i+1.
5

%I #23 Jul 26 2021 10:58:57

%S 1,2,12,136,2480,66336,2446528,118984832,7378078464,568142287360,

%T 53189920492544,5949749335001088,783686338494312448,

%U 120058889459865165824,21166245289132322242560,4254864627502524070395904,967406173145278971994898432,247007221085479721384365129728

%N Number of ways of arranging 2*n tokens in a row, with 2 copies of each token from 1 through n, such that between every pair of tokens labeled i (i = 1..n-1) there is exactly one taken labeled i+1.

%C From _Paul Barry_, Oct 12 2009: (Start)

%C The aerated sequence is (2^(n/2 - 1) + 0^(n/2)/2)*((1 + (-1)^n)/2)*n!*[x^n](1 + x*tan(x/2)).

%C Multiples of the unsigned Genocchi numbers A110501: (1, 1, 3, 17, 155,...)*(1, 2, 4, 8, 16,...). (End)

%H Michael De Vlieger, <a href="/A117513/b117513.txt">Table of n, a(n) for n = 1..258</a>

%H Guo-Niu Han, <a href="https://arxiv.org/abs/2006.14070">Enumeration of Standard Puzzles</a>, arXiv:2006.14070 [math.CO], 2020.

%H Guo-Niu Han, <a href="/A196265/a196265.pdf">Enumeration of Standard Puzzles</a> [Cached copy]

%F G.f.: 1/(1-2*x/(1-4*x/(1-8*x/(1-12*x/(1-18*x/(1-24*x/(1-32*x/(1-.../(1-2* floor((n+2)^2/4)*x/(1-... (continued fraction). - _Paul Barry_, Dec 03 2009

%F G.f.: T(0), where T(k) = 1 - x*(2*k+2)*(k+1)/( x*(2*k+2)*(k+1) - 1/( 1 - x*(2*k+2)*(k+2)/( x*(2*k+2)*(k+2) - 1/T(k+1) ))); (continued fraction). - _Sergei N. Gladkovskii_, Oct 24 2013

%F a(n) = (-2)^n*(1 - 2^(2*n))*Bernoulli(2*n). - _Peter Luschny_, Jul 26 2021

%p a := n -> (-2)^n*(1 - 2^(2*n))*bernoulli(2*n);

%p seq(a(n), n = 1..18); # _Peter Luschny_, Jul 26 2021

%t Array[(-2)^#*(1 - 2^(2 #))*BernoulliB[2 #] &, 18] (* _Michael De Vlieger_, Jul 26 2021 *)

%o (Sage) # Algorithm of L. Seidel (1877)

%o # n -> [a(1), ..., a(n)] for n >= 1.

%o def A117513_list(n) :

%o D = [0]*(n+2); D[1] = 1

%o R = []; z = 1/2; b = True

%o for i in(0..2*n-1) :

%o h = i//2 + 1

%o if b :

%o for k in range(h-1, 0, -1) : D[k] += D[k+1]

%o z *= 2

%o else :

%o for k in range(1, h+1, 1) : D[k] += D[k-1]

%o b = not b

%o if b : R.append(D[h]*z)

%o return R

%o A117513_list(15) # _Peter Luschny_, Jun 29 2012

%Y Cf. A002105, A110501, A117514, A117515.

%K nonn

%O 1,2

%A Nan Zang (nzang(AT)cs.ucsd.edu), Apr 28 2006

%E More terms from _Paul Barry_, Oct 12 2009