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.

A008280 Boustrophedon version of triangle of Euler-Bernoulli or Entringer numbers read by rows.

Original entry on oeis.org

1, 0, 1, 1, 1, 0, 0, 1, 2, 2, 5, 5, 4, 2, 0, 0, 5, 10, 14, 16, 16, 61, 61, 56, 46, 32, 16, 0, 0, 61, 122, 178, 224, 256, 272, 272, 1385, 1385, 1324, 1202, 1024, 800, 544, 272, 0, 0, 1385, 2770, 4094, 5296, 6320, 7120, 7664, 7936, 7936
Offset: 0

Views

Author

Keywords

Comments

The earliest known reference for this triangle is Seidel (1877). - Don Knuth, Jul 13 2007
Sum of row n = A000111(n+1). - Reinhard Zumkeller, Nov 01 2013

Examples

			This version of the triangle begins:
[0] [   1]
[1] [   0,    1]
[2] [   1,    1,    0]
[3] [   0,    1,    2,    2]
[4] [   5,    5,    4,    2,    0]
[5] [   0,    5,   10,   14,   16,   16]
[6] [  61,   61,   56,   46,   32,   16,    0]
[7] [   0,   61,  122,  178,  224,  256,  272,  272]
[8] [1385, 1385, 1324, 1202, 1024,  800,  544,  272,    0]
[9] [   0, 1385, 2770, 4094, 5296, 6320, 7120, 7664, 7936, 7936]
See A008281 and A108040 for other versions.
		

References

  • M. D. Atkinson: Partial orders and comparison problems, Sixteenth Southeastern Conference on Combinatorics, Graph Theory and Computing, (Boca Raton, Feb 1985), Congressus Numerantium 47, 77-88.
  • J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996, p. 110.
  • A. J. Kempner, On the shape of polynomial curves, Tohoku Math. J., 37 (1933), 347-362.
  • A. A. Kirillov, Variations on the triangular theme, Amer. Math. Soc. Transl., (2), Vol. 169, 1995, pp. 43-73, see p. 53.
  • R. P. Stanley, Enumerative Combinatorics, volume 1, second edition, chapter 1, exercise 141, Cambridge University Press (2012), p. 128, 174, 175.

Crossrefs

Cf. A000657 (central terms); A227862.

Programs

  • Haskell
    a008280 n k = a008280_tabl !! n !! k
    a008280_row n = a008280_tabl !! n
    a008280_tabl = ox True a008281_tabl where
      ox turn (xs:xss) = (if turn then reverse xs else xs) : ox (not turn) xss
    -- Reinhard Zumkeller, Nov 01 2013
    
  • Mathematica
    max = 9; t[0, 0] = 1; t[n_, m_] /; n < m || m < 0 = 0; t[n_, m_] := t[n, m] = Sum[t[n-1, n-k], {k, m}]; tri = Table[t[n, m], {n, 0, max}, {m, 0, n}]; Flatten[ {Reverse[#[[1]]], #[[2]]} & /@ Partition[tri, 2]] (* Jean-François Alcover, Oct 24 2011 *)
    T[0,0] := 1; T[n_?OddQ,k_]/;0<=k<=n := T[n,k]=T[n,k-1]+T[n-1,k-1]; T[n_?EvenQ,k_]/;0<= k<=n := T[n,k]=T[n,k+1]+T[n-1,k]; T[n_,k_] := 0; Flatten@Table[T[n,k], {n,0,9}, {k,0,n}] (* Oliver Seipel, Nov 24 2024 *)
  • Maxima
    T(n, m):=abs(sum(binomial(m, k)*euler(n-m+k), k, 0, m)); /* Vladimir Kruchinin, Apr 06 2015 */
  • Python
    # Python 3.2 or higher required.
    from itertools import accumulate
    A008280_list = blist = [1]
    for n in range(10):
        blist = list(reversed(list(accumulate(reversed(blist))))) + [0] if n % 2 else [0]+list(accumulate(blist))
        A008280_list.extend(blist)
    print(A008280_list) # Chai Wah Wu, Sep 20 2014
    
  • Python
    # Uses function seidel from A008281.
    def A008280row(n): return seidel(n) if n % 2 else seidel(n)[::-1]
    for n in range(8): print(A008280row(n)) # Peter Luschny, Jun 01 2022
    
  • Sage
    # Algorithm of L. Seidel (1877)
    # Prints the first n rows of the triangle.
    def A008280_triangle(n) :
        A = {-1:0, 0:1}
        k = 0; e = 1
        for i in range(n) :
            Am = 0
            A[k + e] = 0
            e = -e
            for j in (0..i) :
                Am += A[k]
                A[k] = Am
                k += e
            print([A[z] for z in (-i//2..i//2)])
    A008280_triangle(10) # Peter Luschny, Jun 02 2012
    

Formula

T(n,m) = abs( Sum_{k=0..n} C(m,k)*Euler(n-m+k) ). - Vladimir Kruchinin, Apr 06 2015
E.g.f.: (cos(x) + sin(x))/cos(x+y). - Ira M. Gessel, Nov 18 2024