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.

Showing 1-4 of 4 results.

A008281 Triangle of Euler-Bernoulli or Entringer numbers read by rows.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Zig-Zag numbers (see the Conway and Guy reference p. 110 and the J.-P. Delahaye reference, p. 31).
Approximation to Pi: 2*n*a(n-1,n-1)/a(n,n), n >= 3. See A132049(n)/A132050(n). See the Delahaye reference, p. 31.
The sequence (a(n,n)) of the last element of each row is that of Euler up/down numbers A000111, the Boustrophedon transform of sequence A000007 = (0^n) = (1, 0, 0, 0, ...). - M. F. Hasler, Oct 07 2017

Examples

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

References

  • J. H. Conway and R. K. Guy, The Book of Numbers, New York: Springer-Verlag, p. 110.
  • J.-P. Delahaye, Pi - die Story (German translation), Birkhäuser, 1999 Basel, p. 31. French original: Le fascinant nombre Pi, Pour la Science, Paris, 1997.

Crossrefs

Programs

  • Haskell
    a008281 n k = a008281_tabl !! n !! k
    a008281_row n = a008281_tabl !! n
    a008281_tabl = iterate (scanl (+) 0 . reverse) [1]
    -- Reinhard Zumkeller, Sep 10 2013
    
  • Maple
    A008281 := proc(h,k) option remember ;
        if h=1 and k=1 or h=0 then
            RETURN(1) ;
        elif h>=1 and k> h then
            RETURN(0) ;
        elif h=k then
            RETURN( procname(h,h-1)) ;
        else
            RETURN( add(procname(h-1,j),j=h-k..h-1) ) ;
        fi ;
    end: # R. J. Mathar, Nov 27 2006
    # Alternative:
    T := proc(n, k) option remember;
    ifelse(k=0, 0^n, T(n, k-1) + T(n-1, n-k)) end: # Peter Luschny, Sep 30 2023
  • Mathematica
    a[0, 0] = 1; a[n_, m_] /; (n < m || m < 0) = 0; a[n_, m_] := a[n, m] = Sum[a[n-1, n-k], {k, m}]; Flatten[Table[a[n, m], {n, 0, 9}, {m, 0, n}]] (* Jean-François Alcover, May 31 2011, after formula *)
  • Python
    # Python 3.2 or higher required.
    from itertools import accumulate
    A008281_list = blist = [1]
    for _ in range(30):
        blist = [0]+list(accumulate(reversed(blist)))
        A008281_list.extend(blist) # Chai Wah Wu, Sep 18 2014
    
  • Python
    from functools import cache
    @cache
    def seidel(n):
        if n == 0: return [1]
        rowA = seidel(n - 1)
        row = [0] + seidel(n - 1)
        row[1] = row[n]
        for k in range(2, n + 1): row[k] = row[k - 1] + rowA[n - k]
        return row
    def A008281row(n): return seidel(n)
    for n in range(8): print(A008281row(n)) # Peter Luschny, Jun 01 2022

Formula

a(0,0)=1, a(n,m)=0 if n < m, a(n,m)=0 if m < 0, otherwise a(n,m) = Sum_{k=1..m} a(n-1,n-k).
T(n, k) = T(n, k-1) + T(n-1, n-k) for k > 0, T(n, 0) = 0^n. - Peter Luschny, Sep 30 2023

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

A005437 Column of Kempner tableau.

Original entry on oeis.org

1, 1, 1, 2, 4, 14, 46, 224, 1024, 6320, 36976, 275792, 1965664, 17180144, 144361456, 1446351104, 13997185024, 158116017920, 1731678144256, 21771730437632, 266182076161024, 3686171162253824, 49763143319190016, 752594181757712384, 11118629668610842624
Offset: 0

Views

Author

Keywords

Comments

From Peter Luschny, Jul 09 2012: (Start)
Also the central column of the Seidel-Entringer triangles A008281 and A008282.
a(n) takes alternatingly the values of the central column of the Seidel-Entriger triangles A008281 (1,1,4,46,...) and A008282 (1,2,14,224,..).
In Gelineau, Shin, and Zeng (section 6.1) twelve interpretations of the numbers can be found. (End)
This sequence is the central sequence of numbers in the following table:
A_0 1
B_1 1 0
A_2 0 1 1
B_3 2 2 1 0
A_4 0 2 4 5 5
B_5 16 16 14 10 5 0
A_6 0 16 32 46 56 61 61
B_7 272 272 256 224 178 122 61 0
where row A_k is obtained from row B_(k-1) by the sequence 0, b_1, b_1+b_2, ..., b_1+b_2+....+b_k and row B_k is obtained from the row A_(k-1) by the sequence a_1+a_2+....+a_k, ..., a_(k-1)+a_k, a_k, 0. - Sean A. Irvine, Jun 25 2016
Named after the English-American mathematician Aubrey John Kempner (1880-1973). - Amiram Eldar, Jun 23 2021

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Main diagonal of A064192.

Programs

  • Maple
    A005437 := proc(n) local S; S := proc(n, k) option remember; if k=0 then `if`(n=0, 1, 0) else S(n, k-1)+S(n-1, n-k) fi end: S(n, iquo(n+1, 2)) end; seq(A005437(i), i=0..24); # Peter Luschny, Jul 09 2012
  • Mathematica
    a[n_] := Module[{S}, S[m_, k_] := S[m, k] = If[k == 0, If[m == 0, 1, 0], S[m, k-1] + S[m-1, m-k]]; S[n, Quotient[n+1, 2]]];
    Table[a[n], {n, 0, 24}] (* Jean-François Alcover, Nov 12 2018, after Peter Luschny *)

Extensions

More terms from Sean A. Irvine, Jun 25 2016
Offset set to 0 by Peter Luschny, Oct 15 2018

A239005 Signed version of the Seidel triangle for the Euler 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

Paul Curtz, Mar 08 2014

Keywords

Examples

			The triangle T(n,k) begins:
                      1
                    0   1
                 -1  -1   0
                0  -1  -2  -2
              5   5   4   2   0
             ...
The array read as a table, A(n,k) = T(n+k, k), starts:
     1,    1,    0,   -2,    0,   16,    0, -272,    0, ...
     0,   -1,   -2,    2,   16,  -16, -272,  272, ...
    -1,   -1,    4,   14,  -32, -256,  544, ...
     0,    5,   10,  -46, -224,  800, ...
     5,    5,  -56, -178, 1024, ...
     0,  -61, -122, 1202, ...
   -61,  -61, 1324, ...
     0, 1385, ...
  1385, ...
  ...
For the above table, we have A(n,k) = (-1)^(n+k)*A236935(n,k) for n, k >= 0. It has joint e.g.f. 2*exp(-x)/(1 + exp(-2*(x+y))). - _Petros Hadjicostas_, Feb 21 2021
		

Crossrefs

Unsigned version is A008280.

Programs

  • Mathematica
    t[0, 0] = 1; t[n_, m_] /; nJean-François Alcover, Dec 30 2014 *)
  • Maxima
    T(n,m):=sum(binomial(m,k)*euler(n-m+k),k,0,m); /* Vladimir Kruchinin, Apr 06 2015 */
    
  • PARI
    a(n) = 2^n*2^(n+1)*(subst(bernpol(n+1, x), x, 3/4) - subst(bernpol(n+1, x), x, 1/4))/(n+1) /* A122045 */
    T(n, k) = (-1)^n*sum(i=0, k, (-1)^i*binomial(k, i)*a(n-i)) /* Petros Hadjicostas, Feb 21 2021 */
    /* Second PARI program (same a(n) for A122045 as above) */
    T(n, k) = sum(i=0, k, binomial(k, i)*a(n-k+i)) /* Petros Hadjicostas, Feb 21 2021 */

Formula

a(n) = A057077(n)*A008280(n) by rows.
a(n) is the increasing antidiagonals of the difference table of A155585(n).
Central column of triangle: A099023(n).
Right main diagonal of triangle: A155585(n) (see A009006(n)).
Left main diagonal of triangle: A122045(n).
T(n,m) = Sum_{k=0..n} binomial(m,k)*Euler(n-m+k) for 0 <= m <= n. - Vladimir Kruchinin, Apr 06 2015 [The summation only needs to go from k=0 to k=m because of binomial(m,k).]
T(n,k) = (-1)^n*A236935(n-k,k) for 0 <= k <= n, where the latter is read as a square array. - Petros Hadjicostas, Feb 21 2021
Showing 1-4 of 4 results.