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.

A229892 Number T(n,k) of k up, k down permutations of [n]; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 0, 2, 1, 1, 0, 5, 3, 1, 1, 0, 16, 6, 4, 1, 1, 0, 61, 26, 10, 5, 1, 1, 0, 272, 71, 20, 15, 6, 1, 1, 0, 1385, 413, 125, 35, 21, 7, 1, 1, 0, 7936, 1456, 461, 70, 56, 28, 8, 1, 1, 0, 50521, 10576, 1301, 574, 126, 84, 36, 9, 1, 1
Offset: 0

Views

Author

Alois P. Heinz, Oct 02 2013

Keywords

Comments

T(n,k) is defined for n,k >= 0. The triangle contains only the terms with k<=n. T(n,k) = T(n,n) = A000012(n) = 1 for k>n.
T(2*n,n) = C(2*n-1,n) = A088218(n) = A001700(n-1) for n>0.
T(2*n+1,n) = C(2*n,n) = A000984(n).
T(2*n+1,n+1) = C(2n,n-1) = A001791(n) for n>0.

Examples

			Triangle T(n,k) begins:
  1;
  1,    1;
  0,    1,   1;
  0,    2,   1,   1;
  0,    5,   3,   1,  1;
  0,   16,   6,   4,  1,  1;
  0,   61,  26,  10,  5,  1, 1;
  0,  272,  71,  20, 15,  6, 1, 1;
  0, 1385, 413, 125, 35, 21, 7, 1, 1;
		

Crossrefs

Programs

  • Maple
    b:= proc(u, o, t, k) option remember; `if`(u+o=0, 1, add(`if`(t=k,
           b(o-j, u+j-1, 1, k), b(u+j-1, o-j, t+1, k)), j=1..o))
        end:
    T:= (n, k)-> `if`(k+1>=n, 1, `if`(k=0, 0, b(0, n, 0, k))):
    seq(seq(T(n, k), k=0..n), n=0..10);
  • Mathematica
    b[u_, o_, t_, k_] := b[u, o, t, k] = If[u+o == 0, 1, Sum[If[t == k, b[o-j, u+j-1, 1, k], b[u+j-1, o-j, t+1, k]], {j, 1, o}]]; t[n_, k_] := If[k+1 >= n, 1, If[k == 0, 0, b[0, n, 0, k]]]; Table[Table[t[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Dec 17 2013, translated from Maple *)

Formula

T(7,3) = 20: 1237654, 1247653, 1257643, 1267543, 1347652, 1357642, 1367542, 1457632, 1467532, 1567432, 2347651, 2357641, 2367541, 2457631, 2467531, 2567431, 3457621, 3467521, 3567421, 4567321.

A005981 Number of 2 up, 2 down, 2 up, ... permutations of length 2n + 1.

Original entry on oeis.org

1, 1, 6, 71, 1456, 45541, 2020656, 120686411, 9336345856, 908138776681, 108480272749056, 15611712012050351, 2664103110372192256, 531909061958526321421, 122840808510269863827456, 32491881630252866646683891, 9758611490955498257378246656
Offset: 0

Views

Author

Keywords

References

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

Crossrefs

Bisection of A058258.

Programs

  • Maple
    g:=((cosh(x)-1)*sin(x)+(cos(x)+1)*sinh(x))/(cos(x)*cosh(x)+1): series(%,x,35):
    seq(n!*coeff(%,x,n),n=1..34,2); # Peter Luschny, Feb 07 2017
  • Mathematica
    egf = ((Cosh[x]-1)*Sin[x]+(Cos[x]+1)*Sinh[x])/(Cos[x]*Cosh[x]+1); a[n_] := SeriesCoefficient[egf, {x, 0, 2*n+1}]*(2*n+1)!; Array[a, 17, 0] (* Jean-François Alcover, Mar 13 2014 *)

Formula

E.g.f.: x + Sum_{n>=1} a(n)*(x^(2n+1))/(2n+1)! = (f(0,x)*f(1,x) -f(2,x)*f(3,x)+ f(3,x))/(f(0,x)^2 - f(1,x)*f(3,x)), where f(j,x) = Sum_{k>=0} (x^(4k+j))/(4k+j)!, j = 0,1,2,3, is the j-th generalized hyperbolic function. - Peter Bala, Jul 13 2007
Basset (2013) gives an e.g.f. involving trigonometric and hyperbolic functions. - N. J. A. Sloane, Dec 24 2013
a(n) ~ 4 * (2*n+1)! / (tan(r/2)^2 * r^(2*n+2)), where r = A076417 = 1.8751040687119611664453082410782141625701117335310699882454137131... is the root of the equation cos(r)*cosh(r) = -1. - Vaclav Kotesovec, Feb 01 2015

A076417 Decimal expansion of first solution of equation cos(x)*cosh(x) = -1.

Original entry on oeis.org

1, 8, 7, 5, 1, 0, 4, 0, 6, 8, 7, 1, 1, 9, 6, 1, 1, 6, 6, 4, 4, 5, 3, 0, 8, 2, 4, 1, 0, 7, 8, 2, 1, 4, 1, 6, 2, 5, 7, 0, 1, 1, 1, 7, 3, 3, 5, 3, 1, 0, 6, 9, 9, 8, 8, 2, 4, 5, 4, 1, 3, 7, 1, 3, 1, 0, 5, 6, 7, 9, 9, 5, 2, 8, 4, 0, 4, 2, 8, 6, 3, 8, 5, 2, 6, 5, 6, 6, 5, 5, 0, 5, 8, 1, 8, 8, 6, 0, 3, 7, 0, 8, 4, 1, 0
Offset: 1

Views

Author

Zak Seidov, Oct 10 2002

Keywords

Comments

This is an equation related to a cantilever beam: cos(x)*cosh(x) = -1. The first three solutions are: 1.875 (this sequence), 4.69409 (A076418) and 7.854757 (A076419).

Examples

			1.87510406871196116644530824107821416257011173353...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[x/.FindRoot[Cos[x]Cosh[x]==-1,{x,1.8}, WorkingPrecision->120], 10,120][[1]] (* Harvey P. Dale, Jul 24 2011 *)
  • PARI
    solve(x=1, 2, cos(x)*cosh(x) + 1) \\ Michel Marcus, Sep 11 2019

A058257 Triangle read by rows: this is a variant of A008280 in which 2 rows go from left to right, 2 from right to left, 2 from left to right, etc.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 3, 2, 1, 0, 0, 0, 3, 5, 6, 6, 6, 0, 0, 3, 8, 14, 20, 26, 71, 71, 71, 68, 60, 46, 26, 0, 413, 342, 271, 200, 132, 72, 26, 0, 0, 0, 413, 755, 1026, 1226, 1358, 1430, 1456, 1456, 1456, 0, 0, 413, 1168, 2194, 3420, 4778, 6208, 7664, 9120, 10576
Offset: 0

Views

Author

N. J. A. Sloane, Dec 06 2000

Keywords

Comments

Suggested by Atkinson article in Information Processing Letters.

Examples

			Triangle begins:
  1;
  0, 1;
  0, 0, 1;
  1, 1, 1, 0;
  3, 2, 1, 0, 0;
  0, 3, 5, 6, 6, 6;
  ...
		

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.

Crossrefs

Programs

  • Haskell
    a058257 n k = a058257_tabl !! n !! k
    a058257_row n = a058257_tabl !! n
    a058257_tabl = [1] : ox 0 [1] where
       ox turn xs = ys : ox (mod (turn + 1) 4) ys
          where ys | turn <= 1 = scanl (+) 0 xs
                   | otherwise = reverse $ scanl (+) 0 $ reverse xs
    -- Reinhard Zumkeller, Nov 01 2013

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Dec 12 2000
Showing 1-4 of 4 results.