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.

A058258 The 2-Up sequence: formed from final entries in rows of A058257.

Original entry on oeis.org

1, 1, 1, 1, 3, 6, 26, 71, 413, 1456, 10576, 45541, 397023, 2020656, 20551376, 120686411, 1402815833, 9336345856, 122087570176, 908138776681, 13194844482843, 108480272749056, 1733786041150976, 15611712012050351, 272197308765744053, 2664103110372192256
Offset: 0

Views

Author

N. J. A. Sloane, Dec 06 2000

Keywords

Crossrefs

Column k=2 of A229892.

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1, add(`if`(t=2,
           b(o-j, u+j-1, 1), b(u+j-1, o-j, t+1)), j=1..o))
        end:
    a:= n-> b(0, n, 0):
    seq(a(n), n=0..30);  # Alois P. Heinz, Oct 02 2013
  • Mathematica
    b[u_, o_, t_] := b[u, o, t] = If[u+o == 0, 1, Sum[If[t == 2, b[o-j, u+j-1, 1], b[u+j-1, o-j, t+1]], {j, 1, o}]] ;a[n_] := b[0, n, 0]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 03 2014, after Alois P. Heinz *)
    CoefficientList[Series[1 + ((Sin[x]-Cos[x]+1) * (Cosh[x]-1) + (Sin[x]+Cos[x]+1) * Sinh[x]) / ((1+Cosh[x]*Cos[x])),{x,0,20}],x] * Range[0,20]! (* Vaclav Kotesovec, Sep 06 2014 *)

Formula

E.g.f. (J. M. Luck, 2013): 1 + ((sin(x) - cos(x) + 1) * (cosh(x)-1) + (sin(x) + cos(x) + 1) * sinh(x)) / ((1 + cosh(x)*cos(x))). - Vaclav Kotesovec, Sep 06 2014
a(n) ~ c * n! / r^n, where r = A076417 = 1.8751040687119611664453... is the root of the equation cosh(r)*cos(r) = -1, and c = 4*cot(r/2)/r = 1.56598351207925... if n is even, c = 4*cot(r/2)^2/r = 1.14958147083780... if n is odd. - Vaclav Kotesovec, Sep 06 2014

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Dec 12 2000

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

A131453 2 up, 2 down, ..., 2 up, 2 down permutations of length 4n+1.

Original entry on oeis.org

1, 6, 1456, 2020656, 9336345856, 108480272749056, 2664103110372192256, 122840808510269863827456, 9758611490955498257378246656, 1251231616578606273788469919481856, 245996119743058288132230759497577005056, 71155698830255977656506481145458378597728256
Offset: 0

Views

Author

Peter Bala, Jul 13 2007

Keywords

Comments

Bisection of A005981.

Examples

			a(1) = 6. The six 2 up, 2 down permutations on 5 letters are (12543), (13542), (14532), (23541), (24532) and (34521).
		

Crossrefs

Programs

  • Maple
    g:= (tan(x)+exp(2*x)*(tan(x)+1)-1)/(exp(2*x)+2*exp(x)*sec(x)+1): series(%,x,46):
    seq(n!*coeff(%,x,n), n=1..45,4); # Peter Luschny, Feb 07 2017
  • Mathematica
    Table[(CoefficientList[Series[((-1 + E^(2*x))*Cos[x] + (1 + E^(2*x))*Sin[x]) / (2*E^x + (1 + E^(2*x))* Cos[x]), {x, 0, 80}], x] * Range[0, 77]!)[[n]], {n, 2, 78, 4}] (* Vaclav Kotesovec, Sep 09 2014 *)

Formula

E.g.f.: Sum_{n>=0} a(n)*(x^(4n+1))/(4n+1)! = (sin(x)*(exp(2x)+1)+cos(x)*(exp(2x)-1))/(2*exp(x)+cos(x)*(exp(2x)+1)).

A131454 2 up, 2 down, ..., 2 up, 2 down, 2 up permutations of length 4n+3.

Original entry on oeis.org

1, 71, 45541, 120686411, 908138776681, 15611712012050351, 531909061958526321421, 32491881630252866646683891, 3302814916156503291298772711761, 527393971346575736206847604137659031, 126355819963625435928020023737689391659701
Offset: 0

Views

Author

Peter Bala, Jul 13 2007

Keywords

Comments

Bisection of A005981. The entries listed above suggest various congruences for a(n): a(n) = 1 (mod 10), a(n) = 1 + 70*n (mod 100), a(n) = 1 + 70*n + 200*n(n-1) (mod 1000). Are these congruences true for all n? For an arbitrary integer m, the sequence a(n) taken modulo m may eventually become periodic. Compare with A081727.

Examples

			(1 4 5 3 2 6 7) is a 2 up, 2 down, 2 up permutation - one of the seventy-one permutations of this type in the symmetric group on 7 letters.
		

Crossrefs

Programs

  • Maple
    g:=(sinh(x)-sin(x))/(cos(x)*cosh(x)+1): series(%,x,44):
    seq(n!*coeff(%,x,n),n=3..45,4); # Peter Luschny, Feb 07 2017
  • Mathematica
    Table[(CoefficientList[Series[(-Sin[x] + Sinh[x]) / (1 + Cos[x]*Cosh[x]), {x, 0, 60}], x] * Range[0, 59]!)[[n]], {n, 4, 60, 4}] (* Vaclav Kotesovec, Sep 09 2014 *)

Formula

E.g.f.: Sum_{n>=0} a(n)*(x^(4n+3))/(4n+3)! = (exp(2x)-2*sin(x)*exp(x)-1)/(2*exp(x)+cos(x)*(exp(2x)+1)). It appears that a(n) = (4n+3)!*coefficient of x^(4n+3) in the Taylor expansion of -4/(2*exp(x)+cos(x)*(exp(2x)+1)).
Showing 1-4 of 4 results.