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.

Previous Showing 11-13 of 13 results.

A000506 One half of the number of permutations of [n] such that the differences have 5 runs with the same signs.

Original entry on oeis.org

61, 841, 7311, 51663, 325446, 1910706, 10715506, 58258210, 309958755, 1623847695, 8412276585, 43220104041, 220683627988, 1121561317408, 5679711010548, 28683869195556, 144552802373145, 727271783033445
Offset: 6

Views

Author

Keywords

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 260, #13
  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 260.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A diagonal of A008970.

Programs

  • Mathematica
    p[n_ /; n >= 2, 1] = 2; p[n_ /; n >= 2, k_] /; 1 <= k <= n := p[n, k] = k*p[n-1, k] + 2*p[n-1, k-1] + (n-k)*p[n-1, k-2]; p[n_, k_] = 0; t[n_, k_] := p[n, k]/2; a[n_] := t[n, 5]; Table[a[n], {n, 6, 23}] (* Jean-François Alcover, Feb 09 2016 *)

Formula

Limit_{n->infinity} 16*a(n)/5^n = 1. - Philippe Deléham, Feb 22 2004

Extensions

More terms from Emeric Deutsch, Feb 21 2004

A360426 Number of permutations of [2n] having exactly n alternating up/down runs where the first run is not a down run.

Original entry on oeis.org

1, 1, 6, 118, 4788, 325446, 33264396, 4766383420, 911323052520, 224136553339270, 68929638550210620, 25914939202996628148, 11693626371194331008088, 6236691723226152102621084, 3881046492003600271067466744, 2786922888404654795314066258488, 2287283298159853722760705106305488
Offset: 0

Views

Author

Alois P. Heinz, Feb 08 2023

Keywords

Comments

Number of permutations of [2n] such that the differences have n runs with the same signs where the first run does not have negative signs.

Examples

			a(0) = 1: (), the empty permutation.
a(1) = 1: 12.
a(2) = 6: 1243, 1342, 1432, 2341, 2431, 3421.
a(3) = 118: 123546, 123645, 124356, ..., 564123, 564213, 564312.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n<2, 0, `if`(k=1, 1,
          k*b(n-1, k) + 2*b(n-1, k-1) + (n-k)*b(n-1, k-2)))
        end:
    a:= n-> `if`(n=0, 1, b(2*n, n)):
    seq(a(n), n=0..17);

Formula

a(n) = A008970(2n,n) = (1/2) * A059427(2n,n) for n>=1.
a(n) ~ c * d^n * n!^2 / n, where d = 3.421054620671187024940215794079585351303138828348... (same as for A291677 and A303159) and c = 0.23613698601500409294656476488227001191406... - Vaclav Kotesovec, Feb 18 2023

A173253 Partial sums of A000111.

Original entry on oeis.org

1, 2, 3, 5, 10, 26, 87, 359, 1744, 9680, 60201, 413993, 3116758, 25485014, 224845995, 2128603307, 21520115452, 231385458428, 2636265133869, 31725150246701, 402096338484226, 5353594391608322, 74702468784746223, 1090126355291598575, 16604660518848685480
Offset: 0

Views

Author

Jonathan Vos Post, Feb 14 2010

Keywords

Comments

Partial sums of Euler or up/down numbers. Partial sums of expansion of sec x + tan x. Partial sums of number of alternating permutations on n letters.

Examples

			a(22) = 1 + 1 + 1 + 2 + 5 + 16 + 61 + 272 + 1385 + 7936 + 50521 + 353792 + 2702765 + 22368256 + 199360981 + 1903757312 + 19391512145 + 209865342976 + 2404879675441 + 29088885112832 + 370371188237525 + 4951498053124096 + 69348874393137901.
		

Crossrefs

Programs

  • Maple
    b:= proc(u, o) option remember;
          `if`(u+o=0, 1, add(b(o-1+j, u-j), j=1..u))
        end:
    a:= proc(n) option remember;
          `if`(n<0, 0, a(n-1))+ b(n, 0)
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Oct 27 2017
  • Mathematica
    With[{nn=30},Accumulate[CoefficientList[Series[Sec[x]+Tan[x],{x,0,nn}],x] Range[0,nn]!]] (* Harvey P. Dale, Feb 26 2012 *)
  • Python
    from itertools import accumulate
    def A173253(n):
        if n<=1:
            return n+1
        c, blist = 2, (0,1)
        for _ in range(n-1):
            c += (blist := tuple(accumulate(reversed(blist),initial=0)))[-1]
        return c # Chai Wah Wu, Apr 16 2023

Formula

a(n) = SUM[i=0..n] A000111(i) = SUM[i=0..n] (2^i|E(i,1/2)+E(i,1)| where E(n,x) are the Euler polynomials).
G.f.: (1 + x/Q(0))/(1-x),m=+4,u=x/2, where Q(k) = 1 - 2*u*(2*k+1) - m*u^2*(k+1)*(2*k+1)/( 1 - 2*u*(2*k+2) - m*u^2*(k+1)*(2*k+3)/Q(k+1) ) ; (continued fraction). - Sergei N. Gladkovskii, Sep 24 2013
G.f.: 1/(1-x) + T(0)*x/(1-x)^2, where T(k) = 1 - x^2*(k+1)*(k+2)/(x^2*(k+1)*(k+2) - 2*(1-x*(k+1))*(1-x*(k+2))/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Nov 20 2013
a(n) ~ 2^(n+2)*n!/Pi^(n+1). - Vaclav Kotesovec, Oct 27 2016
Previous Showing 11-13 of 13 results.