login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A024255
a(0)=0, a(n) = n*E(2n-1) for n >= 1, where E(n) = A000111(n) are the Euler (or up-down) numbers.
5
0, 1, 4, 48, 1088, 39680, 2122752, 156577792, 15230058496, 1888788086784, 290888851128320, 54466478584365056, 12185086638082228224, 3209979242472703787008, 983522422455215438430208, 346787762817143967622103040, 139423404114002708738732982272
OFFSET
0,3
COMMENTS
Number of cyclically alternating permutations of length 2n. Example: a(2)=4 because we have 1324, 1423, 2314, and 2413 (3412 is alternating but not cyclically alternating).
LINKS
N. D. Elkies, On the sums Sum((4k+1)^(-n),k,-inf,+inf), arXiv:math/0101168 [math.CA], 2001-2003.
N. D. Elkies, On the sums Sum_{k = -infinity .. infinity} (4k+1)^(-n), Amer. Math. Monthly, 110 (No. 7, 2003), 561-573.
G. Kreweras, Les préordres totaux compatibles avec un ordre partiel, Math. Sci. Humaines No. 53 (1976), 5-30.
FORMULA
a(n) = 2^(n-1)*(2^n-1)*|B_n|.
E.g.f.: tan(x)*x/2 (even part).
a(n) = (2*n)!*Pi^(-2*n)*(4^n-1)*Li{2*n}(1) for n > 0. - Peter Luschny, Jun 29 2012
G.f.: Q(0)*x/(1-4*x), where Q(k) = 1 - 16*x^2*(k+2)*(k+1)^3/( 16*x^2*(k+2)*(k+1)^3 - (1 - 8*x*k^2 - 12*x*k -4*x)*(1 - 8*x*k^2 - 28*x*k -24*x)/Q(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Oct 23 2013
a(n) = A009752(n)/2. - Alois P. Heinz, Aug 17 2021
a(n) = (-1)^n*2*n*PolyLog(1 - 2*n, -i). - Peter Luschny, Aug 17 2021
MAPLE
a := n -> (-1)^n*2^(2*n-1)*(1-2^(2*n))*bernoulli(2*n); # Peter Luschny, Jun 08 2009
MATHEMATICA
nn = 30; t = Range[0, nn]! CoefficientList[Series[Tan[x]*x/2, {x, 0, nn}], x]; Take[t, {1, nn, 2}]
Table[(-1)^n 2 n PolyLog[1 - 2 n, -I], {n, 0, 19}] (* Peter Luschny, Aug 17 2021 *)
PROG
(Python)
from itertools import accumulate, islice, count
def A024255_gen(): # generator of terms
yield from (0, 1)
blist = (0, 1)
for n in count(2):
yield n*(blist := tuple(accumulate(reversed(tuple(accumulate(reversed(blist), initial=0))), initial=0)))[-1]
A024255_list = list(islice(A024255_gen(), 40)) # Chai Wah Wu, Jun 09-11 2022
CROSSREFS
Sequence in context: A138448 A071221 A198038 * A211045 A296838 A211049
KEYWORD
nonn
AUTHOR
EXTENSIONS
Edited by Emeric Deutsch, Jul 01 2009
STATUS
approved