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 A008282 #95 Jul 21 2025 16:52:25 %S A008282 1,1,1,1,2,2,2,4,5,5,5,10,14,16,16,16,32,46,56,61,61,61,122,178,224, %T A008282 256,272,272,272,544,800,1024,1202,1324,1385,1385,1385,2770,4094,5296, %U A008282 6320,7120,7664,7936,7936,7936,15872,23536,30656,36976,42272,46366,49136,50521,50521 %N A008282 Triangle of Euler-Bernoulli or Entringer numbers read by rows: T(n,k) is the number of down-up permutations of n+1 starting with k+1. %D A008282 R. C. Entringer, A combinatorial interpretation of the Euler and Bernoulli numbers, Nieuw Archief voor Wiskunde, 14 (1966), 241-246. %H A008282 Reinhard Zumkeller, <a href="/A008282/b008282.txt">Rows n=1..120 of triangle, flattened</a> %H A008282 V. I. Arnold, <a href="http://mi.mathnet.ru/eng/umn4470">The calculus of snakes and the combinatorics of Bernoulli, Euler and Springer numbers of Coxeter groups</a>, Uspekhi Mat. nauk., 47 (#1, 1992), 3-45 = Russian Math. Surveys, Vol. 47 (1992), 1-51. %H A008282 J. L. Arregui, <a href="http://arXiv.org/abs/math.NT/0109108">Tangent and Bernoulli numbers related to Motzkin and Catalan numbers by means of numerical triangles</a>, arXiv:math/0109108 [math.NT], 2001. %H A008282 B. Bauslaugh and F. Ruskey, <a href="http://dx.doi.org/10.1007/BF01932127">Generating alternating permutations lexicographically</a>, Nordisk Tidskr. Informationsbehandling (BIT) 30 16-26 1990. %H A008282 Carolina Benedetti, Rafael S. González D’León, Christopher R. H. Hanusa, Pamela E. Harris, Apoorva Khare, Alejandro H. Morales, and Martha Yip, <a href="https://www.cs.ox.ac.uk/people/dan.olteanu/papers/mo-amw18.pdf">The volume of the caracol polytope</a>, Séminaire Lotharingien de Combinatoire XX (2018), Article #YY, Proceedings of the 30th Conference on Formal Power, Series and Algebraic Combinatorics (Hanover), 2018. %H A008282 Beáta Bényi and Péter Hajnal, <a href="https://arxiv.org/abs/1804.01868">Poly-Bernoulli Numbers and Eulerian Numbers</a>, arXiv:1804.01868 [math.CO], 2018. %H A008282 Neil J. Y. Fan and Liao He, <a href="http://www.combinatorics.org/ojs/index.php/eljc/article/view/v22i2p45">The Complete cd-Index of Boolean Lattices</a>, Electron. J. Combin., 22 (2015), #P2.45. %H A008282 Dominique Foata and Guo-Niu Han, <a href="http://www-irma.u-strasbg.fr/~foata/paper/pub123Seidel.pdf">Seidel Triangle Sequences and Bi-Entringer Numbers</a>, November 20, 2013. %H A008282 Dominique Foata and Guo-Niu Han, <a href="https://doi.org/10.1016/j.ejc.2014.06.007">Seidel Triangle Sequences and Bi-Entringer Numbers</a>, European Journal of Combinatorics, 42 (2014), 243-260. [See Corollary 1.3. In Eq. (1.10), the power of x should be k-1 rather than k.] %H A008282 Dominique Foata and Guo-Niu Han, <a href="http://arxiv.org/abs/1601.04371">André Permutation Calculus; a Twin Seidel Matrix Sequence</a>, arXiv:1601.04371 [math.CO], 2016. %H A008282 B. Gourevitch, <a href="http://www.pi314.net">L'univers de Pi</a>. %H A008282 G. Kreweras, <a href="http://archive.numdam.org/article/MSH_1976__53__5_0.pdf">Les préordres totaux compatibles avec un ordre partiel</a>, Math. Sci. Humaines No. 53 (1976), 5-30. %H A008282 Peter Luschny, <a href="https://oeis.org/wiki/User:Peter_Luschny/SeidelTransform">An old operation on sequences: the Seidel transform</a>. %H A008282 J. Millar, N. J. A. Sloane and N. E. Young, A new operation on sequences: the Boustrophedon transform, J. Combin. Theory, 17A (1996) 44-54 (<a href="http://neilsloane.com/doc/bous.txt">Abstract</a>, <a href="http://neilsloane.com/doc/bous.pdf">pdf</a>, <a href="http://neilsloane.com/doc/bous.ps">ps</a>). %H A008282 C. Poupard, <a href="http://dx.doi.org/10.1016/0012-365X(82)90293-X">De nouvelles significations énumeratives des nombres d'Entringer</a>, Discrete Math., 38 (1982), 265-271. %H A008282 C. Poupard, <a href="http://dx.doi.org/10.1006/eujc.1997.0147">Two other interpretations of the Entringer numbers</a>, Eur. J. Combinat. 18 (1997) 939-943. %H A008282 Wikipedia, <a href="https://en.wikipedia.org/wiki/Boustrophedon_transform">Boustrophedon transform</a>. %H A008282 <a href="/index/Bo#boustrophedon">Index entries for sequences related to boustrophedon transform</a> %F A008282 From _Emeric Deutsch_, May 15 2004: (Start) %F A008282 Let E[j] = A000111(j) = j! * [x^j](sec(x) + tan(x)) be the up/down or Euler numbers. For 1 <= k < n, %F A008282 T(n, k) = Sum_{i=0..floor((k-1)/2)} (-1)^i * binomial(k, 2*i+1) * E[n-2*i-1]; %F A008282 T(n,k) = Sum_{i=0..floor((n-k)/2)} (-1)^i * binomial(n-k, 2*i) * E[n-2*i]; %F A008282 T(n, k) = Sum_{i=0..floor((n-k)/2)} (-1)^i * binomial(n-k, 2*i) * E[n-2*i]; and %F A008282 T(n, n) = E[n] for n >= 1. (End) %F A008282 From _Petros Hadjicostas_, Feb 17 2021: (Start) %F A008282 If n is even, then T(n,k) = k!*(n-k)!*[x^(n-k),y^k] cos(x)/cos(x + y). %F A008282 If n is odd, then T(n,k) = k!*(n-k)!*[x^k,y^(n-k)] sin(x)/cos(x + y). %F A008282 (These were adapted and corrected from the formulas in Corollary 1.3 in Foata and Guo-Niu Han (2014).) (End) %F A008282 Comment from Masanobu Kaneko: (Start) %F A008282 A generating function that applies for all n, both even and odd: %F A008282 Sum_{n=0..oo} Sum_{k=0..n} T(n,k) x^(n-k)/(n-k)! * y^k/k! = {cos x + sin y}/cos(x + y). %F A008282 (End) - _N. J. A. Sloane_, Feb 06 2022 %e A008282 Triangle T(n,k) (with rows n >= 1 and columns k = 1..n) begins %e A008282 1 %e A008282 1 1 %e A008282 1 2 2 %e A008282 2 4 5 5 %e A008282 5 10 14 16 16 %e A008282 16 32 46 56 61 61 %e A008282 ... %e A008282 Each row is constructed by forming the partial sums of the previous row, reading from the right and repeating the final term. %e A008282 T(4,3) = 5 because we have 41325, 41523, 42314, 42513 and 43512. All these permutations have length n+1 = 5, start with k+1 = 4, and they are down-up permutations. %p A008282 f:=series(sec(x)+tan(x),x=0,25): E[0]:=1: for n from 1 to 20 do E[n]:=n!*coeff(f,x^n) od: T:=proc(n,k) if k<n then sum((-1)^i*binomial(k,2*i+1)*E[n-2*i-1],i=0..floor((k-1)/2)) elif k=n then E[n] else 0 fi end: seq(seq(T(n,k),k=1..n),n=1..10); %p A008282 # Alternatively: %p A008282 T := proc(n, k) option remember; if k = 0 then `if`(n = 0, 1, 0) else %p A008282 T(n, k - 1) + T(n - 1, n - k) fi end: %p A008282 for n from 1 to 6 do seq(T(n,k), k=1..n) od; # _Peter Luschny_, Aug 03 2017 %p A008282 # Third program: %p A008282 T := proc(n, k) local w: if 0 = n mod 2 then w := coeftayl(cos(x)/cos(x + y), [x, y] = [0, 0], [n - k, k]): end if: if 1 = n mod 2 then w := coeftayl(sin(x)/cos(x + y), [x, y] = [0, 0], [k, n - k]): end if: w*(n - k)!*k!: end proc: %p A008282 for n from 1 to 6 do seq(T(n,k), k=1..n) od; # _Petros Hadjicostas_, Feb 17 2021 %t A008282 ro[1] = {1}; ro[n_] := ro[n] = (s = Accumulate[ Reverse[ ro[n-1]]]; Append[ s, Last[s]]); Flatten[ Table[ ro[n], {n, 1, 10}]] (* _Jean-François Alcover_, Oct 03 2011 *) %t A008282 nxt[lst_]:=Module[{lst2=Accumulate[Reverse[lst]]},Flatten[Join[ {lst2,Last[ lst2]}]]]; Flatten[NestList[nxt,{1},10]] (* _Harvey P. Dale_, Aug 17 2014 *) %o A008282 (Haskell) %o A008282 a008282 n k = a008282_tabl !! (n-1) !! (k-1) %o A008282 a008282_row n = a008282_tabl !! (n-1) %o A008282 a008282_tabl = iterate f [1] where %o A008282 f xs = zs ++ [last zs] where zs = scanl1 (+) (reverse xs) %o A008282 -- _Reinhard Zumkeller_, Dec 28 2011 %Y A008282 Cf. A010094, A000111, A099959, A009766, A236935. %K A008282 nonn,tabl,easy,nice %O A008282 1,5 %A A008282 _N. J. A. Sloane_ %E A008282 Example and Formula sections edited by _Petros Hadjicostas_, Feb 17 2021