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.

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.

This page as a plain text file.
%I A024255 #50 Mar 28 2025 12:04:59
%S A024255 0,1,4,48,1088,39680,2122752,156577792,15230058496,1888788086784,
%T A024255 290888851128320,54466478584365056,12185086638082228224,
%U A024255 3209979242472703787008,983522422455215438430208,346787762817143967622103040,139423404114002708738732982272
%N 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.
%C A024255 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).
%H A024255 T. D. Noe, <a href="/A024255/b024255.txt">Table of n, a(n) for n = 0..100</a>
%H A024255 Noam D. Elkies, <a href="https://arxiv.org/abs/math/0101168">On the sums Sum((4k+1)^(-n),k,-inf,+inf)</a>, arXiv:math/0101168 [math.CA], 2001-2003.
%H A024255 Noam D. Elkies, <a href="http://www.jstor.org/stable/3647742">On the sums Sum_{k = -infinity .. infinity} (4k+1)^(-n)</a>, Amer. Math. Monthly, 110 (No. 7, 2003), 561-573.
%H A024255 Luis Ferroni, Alejandro H. Morales, and Greta Panova, <a href="https://arxiv.org/abs/2503.16403">Skew shapes, Ehrhart positivity and beyond</a>, arXiv:2503.16403 [math.CO], 2025. See p. 16.
%H A024255 G. Kreweras, <a href="http://www.numdam.org/item?id=MSH_1976__53__5_0">Les préordres totaux compatibles avec un ordre partiel</a>, Math. Sci. Humaines No. 53 (1976), 5-30.
%F A024255 a(n) = 2^(n-1)*(2^n-1)*|B_n|.
%F A024255 E.g.f.: tan(x)*x/2 (even part).
%F A024255 a(n) = (2*n)!*Pi^(-2*n)*(4^n-1)*Li{2*n}(1) for n > 0. - _Peter Luschny_, Jun 29 2012
%F A024255 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
%F A024255 a(n) = A009752(n)/2. - _Alois P. Heinz_, Aug 17 2021
%F A024255 a(n) = (-1)^n*2*n*PolyLog(1 - 2*n, -i). - _Peter Luschny_, Aug 17 2021
%p A024255 a := n -> (-1)^n*2^(2*n-1)*(1-2^(2*n))*bernoulli(2*n); # _Peter Luschny_, Jun 08 2009
%t A024255 nn = 30; t = Range[0, nn]! CoefficientList[Series[Tan[x]*x/2, {x, 0, nn}], x]; Take[t, {1, nn, 2}]
%t A024255 Table[(-1)^n 2 n PolyLog[1 - 2 n, -I], {n, 0, 19}] (* _Peter Luschny_, Aug 17 2021 *)
%o A024255 (Python)
%o A024255 from itertools import accumulate, islice, count
%o A024255 def A024255_gen(): # generator of terms
%o A024255     yield from (0,1)
%o A024255     blist = (0,1)
%o A024255     for n in count(2):
%o A024255         yield n*(blist := tuple(accumulate(reversed(tuple(accumulate(reversed(blist),initial=0))),initial=0)))[-1]
%o A024255 A024255_list = list(islice(A024255_gen(),40)) # _Chai Wah Wu_, Jun 09-11 2022
%Y A024255 Cf. A000111, A009752.
%K A024255 nonn
%O A024255 0,3
%A A024255 _R. H. Hardin_
%E A024255 Edited by _Emeric Deutsch_, Jul 01 2009