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-10 of 13 results. Next

A091303 Third diagonal of A008970 (after A000111 and A000708).

Original entry on oeis.org

1, 14, 118, 926, 7311, 59982, 517496, 4717222, 45484301, 463683670, 4991117034, 56630860638, 676055834971, 8475491147678, 111376106002732, 1531384454297174, 21993657178539321, 329402210042157606
Offset: 1

Views

Author

N. J. A. Sloane, Feb 21 2004

Keywords

Extensions

More terms from David Wasserman, Feb 28 2006

A000111 Euler or up/down numbers: e.g.f. sec(x) + tan(x). Also for n >= 2, half the number of alternating permutations on n letters (A001250).

Original entry on oeis.org

1, 1, 1, 2, 5, 16, 61, 272, 1385, 7936, 50521, 353792, 2702765, 22368256, 199360981, 1903757312, 19391512145, 209865342976, 2404879675441, 29088885112832, 370371188237525, 4951498053124096, 69348874393137901, 1015423886506852352, 15514534163557086905, 246921480190207983616, 4087072509293123892361
Offset: 0

Views

Author

Keywords

Comments

Number of linear extensions of the "zig-zag" poset. See ch. 3, prob. 23 of Stanley. - Mitch Harris, Dec 27 2005
Number of increasing 0-1-2 trees on n vertices. - David Callan, Dec 22 2006
Also the number of refinements of partitions. - Heinz-Richard Halder (halder.bichl(AT)t-online.de), Mar 07 2008
The ratio a(n)/n! is also the probability that n numbers x1,x2,...,xn randomly chosen uniformly and independently in [0,1] satisfy x1 > x2 < x3 > x4 < ... xn. - Pietro Majer, Jul 13 2009
For n >= 2, a(n-2) = number of permutations w of an ordered n-set {x_1 < ... x_n} with the following properties: w(1) = x_n, w(n) = x_{n-1}, w(2) > w(n-1), and neither any subword of w, nor its reversal, has the first three properties. The count is unchanged if the third condition is replaced with w(2) < w(n-1). - Jeremy L. Martin, Mar 26 2010
A partition of zigzag permutations of order n+1 by the smallest or the largest, whichever is behind. This partition has the same recurrent relation as increasing 1-2 trees of order n, by induction the bijection follows. - Wenjin Woan, May 06 2011
As can be seen from the asymptotics given in the FORMULA section, one has lim_{n->oo} 2*n*a(n-1)/a(n) = Pi; see A132049/A132050 for the simplified fractions. - M. F. Hasler, Apr 03 2013
a(n+1) is the sum of row n in triangle A008280. - Reinhard Zumkeller, Nov 05 2013
M. Josuat-Verges, J.-C. Novelli and J.-Y. Thibon (2011) give a far-reaching generalization of the bijection between Euler numbers and alternating permutations. - N. J. A. Sloane, Jul 09 2015
Number of treeshelves avoiding pattern T321. Treeshelves are ordered binary (0-1-2) increasing trees where every child is connected to its parent by a left or a right link, see A278678 for more definitions and examples. - Sergey Kirgizov, Dec 24 2016
Number of sequences (e(1), ..., e(n-1)), 0 <= e(i) < i, such that no three terms are equal. [Theorem 7 of Corteel, Martinez, Savage, and Weselcouch] - Eric M. Schmidt, Jul 17 2017
Number of self-dual edge-labeled trees with n vertices under "mind-body" duality. Also number of self-dual rooted edge-labeled trees with n vertices. See my paper linked below. - Nikos Apostolakis, Aug 01 2018
The ratio a(n)/n! is the volume of the convex polyhedron defined as the set of (x_1,...,x_n) in [0,1]^n such that x_i + x_{i+1} <= 1 for every 1 <= i <= n-1; see the solutions by Macdonald and Nelsen to the Amer. Math. Monthly problem referenced below. - Sanjay Ramassamy, Nov 02 2018
Number of total cyclic orders on {0,1,...,n} such that the triple (i-1,i,i+1) is positively oriented for every 1 <= i <= n-1; see my paper on cyclic orders linked below. - Sanjay Ramassamy, Nov 02 2018
The number of binary, rooted, unlabeled histories with n+1 leaves (following the definition of Rosenberg 2006). Also termed Tajima trees, Tajima genealogies, or binary, rooted, unlabeled ranked trees (Palacios et al. 2015). See Disanto & Wiehe (2013) for a proof. - Noah A Rosenberg, Mar 10 2019
From Gus Wiseman, Dec 31 2019: (Start)
Also the number of non-isomorphic balanced reduced multisystems with n + 1 distinct atoms and maximum depth. A balanced reduced multisystem is either a finite multiset, or a multiset partition with at least two parts, not all of which are singletons, of a balanced reduced multisystem. The labeled version is A006472. For example, non-isomorphic representatives of the a(0) = 1 through a(4) = 5 multisystems are (commas elided):
{1} {12} {{1}{23}} {{{1}}{{2}{34}}} {{{{1}}}{{{2}}{{3}{45}}}}
{{{12}}{{3}{4}}} {{{{1}}}{{{23}}{{4}{5}}}}
{{{{1}{2}}}{{{3}}{{45}}}}
{{{{1}{23}}}{{{4}}{{5}}}}
{{{{12}}}{{{3}}{{4}{5}}}}
Also the number of balanced reduced multisystems with n + 1 equal atoms and maximum depth. This is possibly the meaning of Heinz-Richard Halder's comment (see also A002846, A213427, A265947). The non-maximum-depth version is A318813. For example, the a(0) = 1 through a(4) = 5 multisystems are (commas elided):
{1} {11} {{1}{11}} {{{1}}{{1}{11}}} {{{{1}}}{{{1}}{{1}{11}}}}
{{{11}}{{1}{1}}} {{{{1}}}{{{11}}{{1}{1}}}}
{{{{1}{1}}}{{{1}}{{11}}}}
{{{{1}{11}}}{{{1}}{{1}}}}
{{{{11}}}{{{1}}{{1}{1}}}}
(End)
With s_n denoting the sum of n independent uniformly random numbers chosen from [-1/2,1/2], the probability that the closest integer to s_n is even is exactly 1/2 + a(n)/(2*n!). (See Hambardzumyan et al. 2023, Appendix B.) - Suhail Sherif, Mar 31 2024
The number of permutations of size n+1 that require exactly n passes through a stack (i.e. have reverse-tier n-1) with an algorithm that prioritizes outputting the maximum possible prefix of the identity in a given pass and reverses the remainder of the permutation for prior to the next pass. - Rebecca Smith, Jun 05 2024

Examples

			G.f. = 1 + x + x^2 + 2*x^3 + 5*x^4 + 16*x^5 + 61*x^6 + 272*x^7 + 1385*x^8 + ...
Sequence starts 1,1,2,5,16,... since possibilities are {}, {A}, {AB}, {ACB, BCA}, {ACBD, ADBC, BCAD, BDAC, CDAB}, {ACBED, ADBEC, ADCEB, AEBDC, AECDB, BCAED, BDAEC, BDCEA, BEADC, BECDA, CDAEB, CDBEA, CEADB, CEBDA, DEACB, DEBCA}, etc. - _Henry Bottomley_, Jan 17 2001
		

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.
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, pages 34, 932.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, pp. 258-260, section #11.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 110.
  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 262.
  • H. Doerrie, 100 Great Problems of Elementary Mathematics, Dover, NY, 1965, p. 66.
  • O. Heimo and A. Karttunen, Series help-mates in 8, 9 and 10 moves (Problems 2901, 2974-2976), Suomen Tehtavaniekat (Proceedings of the Finnish Chess Problem Society) vol. 60, no. 2/2006, pp. 75, 77.
  • L. B. W. Jolley, Summation of Series. 2nd ed., Dover, NY, 1961, p. 238.
  • S. Mukai, An Introduction to Invariants and Moduli, Cambridge, 2003; see p. 444.
  • E. Netto, Lehrbuch der Combinatorik. 2nd ed., Teubner, Leipzig, 1927, p. 110.
  • C. A. Pickover, The Math Book, Sterling, NY, 2009; see p. 184.
  • 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).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 1, 1997 and Vol. 2, 1999; see Problem 5.7.

Crossrefs

Cf. A000364 (secant numbers), A000182 (tangent numbers).
Cf. A181937 for n-alternating permutations.
Cf. A109449 for an extension to an exponential Riordan array.
Column k=2 of A250261.
For 0-1-2 trees with n nodes and k leaves, see A301344.
Matula-Goebel numbers of 0-1-2 trees are A292050.
An overview over generalized Euler numbers gives A349264.

Programs

  • Haskell
    a000111 0 = 1
    a000111 n = sum $ a008280_row (n - 1)
    -- Reinhard Zumkeller, Nov 01 2013
    
  • Maple
    A000111 := n-> n!*coeff(series(sec(x)+tan(x),x,n+1), x, n);
    s := series(sec(x)+tan(x), x, 100): A000111 := n-> n!*coeff(s, x, n);
    A000111:=n->piecewise(n mod 2=1,(-1)^((n-1)/2)*2^(n+1)*(2^(n+1)-1)*bernoulli(n+1)/(n+1),(-1)^(n/2)*euler(n)):seq(A000111(n),n=0..30); A000111:=proc(n) local k: k:=floor((n+1)/2): if n mod 2=1 then RETURN((-1)^(k-1)*2^(2*k)*(2^(2*k)-1)*bernoulli(2*k)/(2*k)) else RETURN((-1)^k*euler(2*k)) fi: end:seq(A000111(n),n=0..30); (C. Ronaldo)
    T := n -> 2^n*abs(euler(n,1/2)+euler(n,1)): # Peter Luschny, Jan 25 2009
    S := proc(n,k) option remember; if k=0 then RETURN(`if`(n=0,1,0)) fi; S(n,k-1)+S(n-1,n-k) end:
    A000364 := n -> S(2*n,2*n);
    A000182 := n -> S(2*n+1,2*n+1);
    A000111 := n -> S(n,n); # Peter Luschny, Jul 29 2009
    a := n -> 2^(n+2)*n!*(sum(1/(4*k+1)^(n+1), k = -infinity..infinity))/Pi^(n+1):
    1, seq(a(n), n = 1..22); # Emeric Deutsch, Aug 17 2009
    # alternative Maple program:
    b:= proc(u, o) option remember;
          `if`(u+o=0, 1, add(b(o-1+j, u-j), j=1..u))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..30);  # Alois P. Heinz, Nov 29 2015
  • Mathematica
    n=22; CoefficientList[Series[(1+Sin[x])/Cos[x], {x, 0, n}], x] * Table[k!, {k, 0, n}] (* Jean-François Alcover, May 18 2011, after Michael Somos *)
    a[n_] := If[EvenQ[n], Abs[EulerE[n]], Abs[(2^(n+1)*(2^(n+1)-1)*BernoulliB[n+1])/(n+1)]]; Table[a[n], {n, 0, 26}] (* Jean-François Alcover, Oct 09 2012, after C. Ronaldo *)
    ee = Table[ 2^n*EulerE[n, 1] + EulerE[n] - 1, {n, 0, 26}]; Table[ Differences[ee, n] // First // Abs, {n, 0, 26}] (* Jean-François Alcover, Mar 21 2013, after Paul Curtz *)
    a[ n_] := If[ n < 0, 0, (2 I)^n If[ EvenQ[n], EulerE[n, 1/2], EulerE[n, 0] I]]; (* Michael Somos, Aug 15 2015 *)
    a[ n_] := If[ n < 1, Boole[n == 0], With[{m = n - 1}, m! SeriesCoefficient[ 1 / (1 - Sin[x]), {x, 0, m}]]]; (* Michael Somos, Aug 15 2015 *)
    s[0] = 1; s[] = 0; t[n, 0] := s[n]; t[n_, k_] := t[n, k] = t[n, k-1] + t[n-1, n-k]; a[n_] := t[n, n]; Array[a, 30, 0](* Jean-François Alcover, Feb 12 2016 *)
    a[n_] := If[n == 0, 1, 2*Abs[PolyLog[-n, I]]]; (* Jean-François Alcover, Dec 02 2023, after M. F. Hasler *)
    a[0] := 1; a[1] := 1; a[n_] := a[n] = Sum[Binomial[n - 2, k] a[k] a[n - 1 - k], {k, 0, n - 2}]; Map[a, Range[0, 26]] (* Oliver Seipel, May 24 2024 after Peter Bala *)
    a[0] := 1; a[1] := 1; a[n_] := a[n] = 1/(n (n-1)) Sum[a[n-1-k] a[k] k, {k, 1, n-1}]; Map[#! a[#]&, Range[0, 26]] (* Oliver Seipel, May 27 2024 *)
  • Maxima
    a(n):=sum((if evenp(n+k) then (-1)^((n+k)/2)*sum(j!*stirling2(n,j)*2^(1-j)*(-1)^(n+j-k)*binomial(j-1,k-1),j,k,n) else 0),k,1,n); /* Vladimir Kruchinin, Aug 19 2010 */
    
  • Maxima
    a(n):=if n<2 then 1 else 2*sum(4^m*(sum((i-(n-1)/2)^(n-1)*binomial(n-2*m-1,i-m)*(-1)^(n-i-1),i,m,(n-1)/2)),m,0,(n-2)/2); /* Vladimir Kruchinin, Aug 09 2011 */
    
  • PARI
    {a(n) = if( n<1, n==0, n--; n! * polcoeff( 1 / (1 - sin(x + x * O(x^n))), n))}; \\ Michael Somos, Feb 03 2004
    
  • PARI
    {a(n) = local(v=[1], t); if( n<0, 0, for(k=2, n+2, t=0; v = vector(k, i, if( i>1, t+= v[k+1-i]))); v[2])}; \\ Michael Somos, Feb 03 2004
    
  • PARI
    {a(n) = local(an); if( n<1, n>=0, an = vector(n+1, m, 1); for( m=2, n, an[m+1] = sum( k=0, m-1, binomial(m-1, k) * an[k+1] * an[m-k]) / 2); an[n+1])}; \\ Michael Somos, Feb 03 2004
    
  • PARI
    z='z+O('z^66); egf = (1+sin(z))/cos(z); Vec(serlaplace(egf)) \\ Joerg Arndt, Apr 30 2011
    
  • PARI
    A000111(n)={my(k);sum(m=0,n\2,(-1)^m*sum(j=0,k=n+1-2*m,binomial(k,j)*(-1)^j*(k-2*j)^(n+1))/k>>k)}  \\ M. F. Hasler, May 19 2012
    
  • PARI
    A000111(n)=if(n,2*abs(polylog(-n,I)),1)  \\ M. F. Hasler, May 20 2012
    
  • Python
    # requires python 3.2 or higher
    from itertools import accumulate
    A000111_list, blist = [1,1], [1]
    for n in range(10**2):
        blist = list(reversed(list(accumulate(reversed(blist))))) + [0] if n % 2 else [0]+list(accumulate(blist))
        A000111_list.append(sum(blist)) # Chai Wah Wu, Jan 29 2015
    
  • Python
    from mpmath import *
    mp.dps = 150
    l = chop(taylor(lambda x: sec(x) + tan(x), 0, 26))
    [int(fac(i) * li) for i, li in enumerate(l)]  # Indranil Ghosh, Jul 06 2017
    
  • Python
    from sympy import bernoulli, euler
    def A000111(n): return abs(((1<Chai Wah Wu, Nov 13 2024
  • Sage
    # Algorithm of L. Seidel (1877)
    def A000111_list(n) :
        R = []; A = {-1:0, 0:1}; k = 0; e = 1
        for i in (0..n) :
            Am = 0; A[k + e] = 0; e = -e
            for j in (0..i) : Am += A[k]; A[k] = Am; k += e
            R.append(Am)
        return R
    A000111_list(22) # Peter Luschny, Mar 31 2012 (revised Apr 24 2016)
    

Formula

E.g.f.: (1+sin(x))/cos(x) = tan(x) + sec(x).
E.g.f. for a(n+1) is 1/(cos(x/2) - sin(x/2))^2 = 1/(1-sin(x)) = d/dx(sec(x) + tan(x)).
E.g.f. A(x) = -log(1-sin(x)), for a(n+1). - Vladimir Kruchinin, Aug 09 2010
O.g.f.: A(x) = 1+x/(1-x-x^2/(1-2*x-3*x^2/(1-3*x-6*x^2/(1-4*x-10*x^2/(1-... -n*x-(n*(n+1)/2)*x^2/(1- ...)))))) (continued fraction). - Paul D. Hanna, Jan 17 2006
E.g.f. A(x) = y satisfies 2y' = 1 + y^2. - Michael Somos, Feb 03 2004
a(n) = P_n(0) + Q_n(0) (see A155100 and A104035), defining Q_{-1} = 0. Cf. A156142.
2*a(n+1) = Sum_{k=0..n} binomial(n, k)*a(k)*a(n-k).
Asymptotics: a(n) ~ 2^(n+2)*n!/Pi^(n+1). For a proof, see for example Flajolet and Sedgewick.
a(n) = (n-1)*a(n-1) - Sum_{i=2..n-2} (i-1)*E(n-2, n-1-i), where E are the Entringer numbers A008281. - Jon Perry, Jun 09 2003
a(2*k) = (-1)^k euler(2k) and a(2k-1) = (-1)^(k-1)2^(2k)(2^(2k)-1) Bernoulli(2k)/(2k). - C. Ronaldo (aga_new_ac(AT)hotmail.com), Jan 17 2005
|a(n+1) - 2*a(n)| = A000708(n). - Philippe Deléham, Jan 13 2007
a(n) = 2^n|E(n,1/2) + E(n,1)| where E(n,x) are the Euler polynomials. - Peter Luschny, Jan 25 2009
a(n) = 2^(n+2)*n!*S(n+1)/(Pi)^(n+1), where S(n) = Sum_{k = -inf..inf} 1/(4k+1)^n (see the Elkies reference). - Emeric Deutsch, Aug 17 2009
a(n) = i^(n+1) Sum_{k=1..n+1} Sum_{j=0..k} binomial(k,j)(-1)^j (k-2j)^(n+1) (2i)^(-k) k^{-1}. - Ross Tang (ph.tchaa(AT)gmail.com), Jul 28 2010
a(n) = sum((if evenp(n+k) then (-1)^((n+k)/2)*sum(j!*Stirling2(n,j)*2^(1-j)*(-1)^(n+j-k)*binomial(j-1,k-1),j,k,n) else 0),k,1,n), n>0. - Vladimir Kruchinin, Aug 19 2010
If n==1(mod 4) is prime, then a(n)==1(mod n); if n==3(mod 4) is prime, then a(n)==-1(mod n). - Vladimir Shevelev, Aug 31 2010
For m>=0, a(2^m)==1(mod 2^m); If p is prime, then a(2*p)==1(mod 2*p). - Vladimir Shevelev, Sep 03 2010
From Peter Bala, Jan 26 2011: (Start)
a(n) = A(n,i)/(1+i)^(n-1), where i = sqrt(-1) and {A(n,x)}n>=1 = [1,1+x,1+4*x+x^2,1+11*x+11*x^2+x^3,...] denotes the sequence of Eulerian polynomials.
Equivalently, a(n) = i^(n+1)*Sum_{k=1..n} (-1)^k*k!*Stirling2(n,k) * ((1+i)/2)^(k-1) = i^(n+1)*Sum_{k = 1..n} (-1)^k*((1+i)/2)^(k-1)* Sum_{j = 0..k} (-1)^(k-j)*binomial(k,j)*j^n.
This explicit formula for a(n) can be used to obtain congruence results. For example, for odd prime p, a(p) = (-1)^((p-1)/2) (mod p), as noted by Vladimir Shevelev above.
For the corresponding type B results see A001586. For the corresponding results for plane increasing 0-1-2 trees see A080635.
For generalized Eulerian, Stirling and Bernoulli numbers associated with the zigzag numbers see A145876, A147315 and A185424, respectively. For a recursive triangle to calculate a(n) see A185414.
(End)
a(n) = I^(n+1)*2*Li_{-n}(-I) for n > 0. Li_{s}(z) is the polylogarithm. - Peter Luschny, Jul 29 2011
a(n) = 2*Sum_{m=0..(n-2)/2} 4^m*(Sum_{i=m..(n-1)/2} (i-(n-1)/2)^(n-1)*binomial(n-2*m-1,i-m)*(-1)^(n-i-1)), n > 1, a(0)=1, a(1)=1. - Vladimir Kruchinin, Aug 09 2011
a(n) = D^(n-1)(1/(1-x)) evaluated at x = 0, where D is the operator sqrt(1-x^2)*d/dx. Cf. A006154. a(n) equals the alternating sum of the nonzero elements of row n-1 of A196776. This leads to a combinatorial interpretation for a(n); for example, a(4*n+2) gives the number of ordered set partitions of 4*n+1 into k odd-sized blocks, k = 1 (mod 4), minus the number of ordered set partitions of 4*n+1 into k odd-sized blocks, k = 3 (mod 4). Cf A002017. - Peter Bala, Dec 06 2011
From Sergei N. Gladkovskii, Nov 14 2011 - Dec 23 2013: (Start)
Continued fractions:
E.g.f.: tan(x) + sec(x) = 1 + x/U(0); U(k) = 4k+1-x/(2-x/(4k+3+x/(2+x/U(k+1)))).
E.g.f.: for a(n+1) is E(x) = 1/(1-sin(x)) = 1 + x/(1 - x + x^2/G(0)); G(k) = (2*k+2)*(2*k+3)-x^2+(2*k+2)*(2*k+3)*x^2/G(k+1).
E.g.f.: for a(n+1) is E(x) = 1/(1-sin(x)) = 1/(1 - x/(1 + x^2/G(0))) ; G(k) = 8*k+6-x^2/(1 + (2*k+2)*(2*k+3)/G(k+1)).
E.g.f.: for a(n+1) is E(x) = 1/(1 - sin(x)) = 1/(1 - x*G(0)); G(k) = 1 - x^2/(2*(2*k+1)*(4*k+3) - 2*x^2*(2*k+1)*(4*k+3)/(x^2 - 4*(k+1)*(4*k+5)/G(k+1))).
E.g.f.: for a(n+1) is E(x) = 1/(1 - sin(x)) = 1/(1 - x*G(0)) where G(k)= 1 - x^2/( (2*k+1)*(2*k+3) - (2*k+1)*(2*k+3)^2/(2*k+3 - (2*k+2)/G(k+1))).
E.g.f.: tan(x) + sec(x) = 1 + 2*x/(U(0)-x) where U(k) = 4k+2 - x^2/U(k+1).
E.g.f.: tan(x) + sec(x) = 1 + 2*x/(2*U(0)-x) where U(k) = 4*k+1 - x^2/(16*k+12 - x^2/U(k+1)).
E.g.f.: tan(x) + sec(x) = 4/(2-x*G(0))-1 where G(k) = 1 - x^2/(x^2 - 4*(2*k+1)*(2*k+3)/G(k+1)).
G.f.: 1 + x/Q(0), 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)).
G.f.: conjecture: 1 + T(0)*x/(1-x), 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)).
E.g.f.: 1+ 4*x/(T(0) - 2*x), where T(k) = 4*(2*k+1) - 4*x^2/T(k+1):
E.g.f.: T(0)-1, where T(k) = 2 + x/(4*k+1 - x/(2 - x/( 4*k+3 + x/T(k+1)))). (End)
E.g.f.: tan(x/2 + Pi/4). - Vaclav Kotesovec, Nov 08 2013
Asymptotic expansion: 4*(2*n/(Pi*e))^(n+1/2)*exp(1/2+1/(12*n) -1/(360*n^3) + 1/(1260*n^5) - ...). (See the Luschny link.) - Peter Luschny, Jul 14 2015
From Peter Bala, Sep 10 2015: (Start)
The e.g.f. A(x) = tan(x) + sec(x) satisfies A''(x) = A(x)*A'(x), hence the recurrence a(0) = 1, a(1) = 1, else a(n) = Sum_{i = 0..n-2} binomial(n-2,i)*a(i)*a(n-1-i).
Note, the same recurrence, but with the initial conditions a(0) = 0 and a(1) = 1, produces the sequence [0,1,0,1,0,4,0,34,0,496,...], an aerated version of A002105. (End)
a(n) = A186365(n)/n for n >= 1. - Anton Zakharov, Aug 23 2016
From Peter Luschny, Oct 27 2017: (Start)
a(n) = abs(2*4^n*(H(((-1)^n - 3)/8, -n) - H(((-1)^n - 7)/8, -n))) where H(z, r) are the generalized harmonic numbers.
a(n) = (-1)^binomial(n + 1, 2)*2^(2*n + 1)*(zeta(-n, 1 + (1/8)*(-7 + (-1)^n)) - zeta(-n, 1 + (1/8)*(-3 + (-1)^n))). (End)
a(n) = i*(i^n*Li_{-n}(-i) - (-i)^n*Li_{-n}(i)), where i is the imaginary unit and Li_{s}(z) is the polylogarithm. - Peter Luschny, Aug 28 2020
Sum_{n>=0} 1/a(n) = A340315. - Amiram Eldar, May 29 2021
a(n) = n!*Re([x^n](1 + I^(n^2 - n)*(2 - 2*I)/(exp(x) + I))). - Peter Luschny, Aug 09 2021

Extensions

Edited by M. F. Hasler, Apr 04 2013
Title corrected by Geoffrey Critzer, May 18 2013

A000918 a(n) = 2^n - 2.

Original entry on oeis.org

-1, 0, 2, 6, 14, 30, 62, 126, 254, 510, 1022, 2046, 4094, 8190, 16382, 32766, 65534, 131070, 262142, 524286, 1048574, 2097150, 4194302, 8388606, 16777214, 33554430, 67108862, 134217726, 268435454, 536870910, 1073741822, 2147483646, 4294967294, 8589934590, 17179869182, 34359738366, 68719476734, 137438953470
Offset: 0

Views

Author

Keywords

Comments

For n > 1, a(n) is the expected number of tosses of a fair coin to get n-1 consecutive heads. - Pratik Poddar, Feb 04 2011
For n > 2, Sum_{k=1..a(n)} (-1)^binomial(n, k) = A064405(a(n)) + 1 = 0. - Benoit Cloitre, Oct 18 2002
For n > 0, the number of nonempty proper subsets of an n-element set. - Ross La Haye, Feb 07 2004
Numbers j such that abs( Sum_{k=0..j} (-1)^binomial(j, k)*binomial(j + k, j - k) ) = 1. - Benoit Cloitre, Jul 03 2004
For n > 2 this formula also counts edge-rooted forests in a cycle of length n. - Woong Kook (andrewk(AT)math.uri.edu), Sep 08 2004
For n >= 1, conjectured to be the number of integers from 0 to (10^n)-1 that lack 0, 1, 2, 3, 4, 5, 6 and 7 as a digit. - Alexandre Wajnberg, Apr 25 2005
Beginning with a(2) = 2, these are the partial sums of the subsequence of A000079 = 2^n beginning with A000079(1) = 2. Hence for n >= 2 a(n) is the smallest possible sum of exactly one prime, one semiprime, one triprime, ... and one product of exactly n-1 primes. A060389 (partial sums of the primorials, A002110, beginning with A002110(1)=2) is the analog when all the almost primes must also be squarefree. - Rick L. Shepherd, May 20 2005
From the second term on (n >= 1), the binary representation of these numbers is a 0 preceded by (n - 1) 1's. This pattern (0)111...1110 is the "opposite" of the binary 2^n+1: 1000...0001 (cf. A000051). - Alexandre Wajnberg, May 31 2005
The numbers 2^n - 2 (n >= 2) give the positions of 0's in A110146. Also numbers k such that k^(k + 1) = 0 mod (k + 2). - Zak Seidov, Feb 20 2006
Partial sums of A155559. - Zerinvary Lajos, Oct 03 2007
Number of surjections from an n-element set onto a two-element set, with n >= 2. - Mohamed Bouhamida, Dec 15 2007
It appears that these are the numbers n such that 3*A135013(n) = n*(n + 1), thus answering Problem 2 on the Mathematical Olympiad Foundation of Japan, Final Round Problems, Feb 11 1993 (see link Japanese Mathematical Olympiad).
Let P(A) be the power set of an n-element set A and R be a relation on P(A) such that for all x, y of P(A), xRy if x is a proper subset of y or y is a proper subset of x and x and y are disjoint. Then a(n+1) = |R|. - Ross La Haye, Mar 19 2009
The permutohedron Pi_n has 2^n - 2 facets [Pashkovich]. - Jonathan Vos Post, Dec 17 2009
First differences of A005803. - Reinhard Zumkeller, Oct 12 2011
For n >= 1, a(n + 1) is the smallest even number with bit sum n. Cf. A069532. - Jason Kimberley, Nov 01 2011
a(n) is the number of branches of a complete binary tree of n levels. - Denis Lorrain, Dec 16 2011
For n>=1, a(n) is the number of length-n words on alphabet {1,2,3} such that the gap(w)=1. For a word w the gap g(w) is the number of parts missing between the minimal and maximal elements of w. Generally for words on alphabet {1,2,...,m} with g(w)=g>0 the e.g.f. is Sum_{k=g+2..m} (m - k + 1)*binomial((k - 2),g)*(exp(x) - 1)^(k - g). a(3)=6 because we have: 113, 131, 133, 311, 313, 331. Cf. A240506. See the Heubach/Mansour reference. - Geoffrey Critzer, Apr 13 2014
For n > 0, a(n) is the minimal number of internal nodes of a red-black tree of height 2*n-2. See the Oct 02 2015 comment under A027383. - Herbert Eberle, Oct 02 2015
Conjecture: For n>0, a(n) is the least m such that A007814(A000108(m)) = n-1. - L. Edson Jeffery, Nov 27 2015
Actually this follows from the procedure for determining the multiplicity of prime p in C(n) given in A000108 by Franklin T. Adams-Watters: For p=2, the multiplicity is the number of 1 digits minus 1 in the binary representation of n+1. Obviously, the smallest k achieving "number of 1 digits" = k is 2^k-1. Therefore C(2^k-2) is divisible by 2^(k-1) for k > 0 and there is no smaller m for which 2^(k-1) divides C(m) proving the conjecture. - Peter Schorn, Feb 16 2020
For n >= 0, a(n) is the largest number you can write in bijective base-2 (a.k.a. the dyadic system, A007931) with n digits. - Harald Korneliussen, May 18 2019
The terms of this sequence are also the sum of the terms in each row of Pascal's triangle other than the ones. - Harvey P. Dale, Apr 19 2020
For n > 1, binomial(a(n),k) is odd if and only if k is even. - Charlie Marion, Dec 22 2020
For n >= 2, a(n+1) is the number of n X n arrays of 0's and 1's with every 2 X 2 square having density exactly 2. - David desJardins, Oct 27 2022
For n >= 1, a(n+1) is the number of roots of unity in the unique degree-n unramified extension of the 2-adic field Q_2. Note that for each p, the unique degree-n unramified extension of Q_p is the splitting field of x^(p^n) - x, hence containing p^n - 1 roots of unity for p > 2 and 2*(2^n - 1) for p = 2. - Jianing Song, Nov 08 2022

Examples

			a(4) = 14 because the 14 = 6 + 4 + 4 rationals (in lowest terms) for n = 3 are (see the Jun 14 2017 formula above): 1/2, 1, 3/2, 2, 5/2, 3; 1/4, 3/4, 5/4, 7/4; 1/8, 3/8, 5/8, 7/8. - _Wolfdieter Lang_, Jun 14 2017
		

References

  • H. T. Davis, Tables of the Mathematical Functions. Vols. 1 and 2, 2nd ed., 1963, Vol. 3 (with V. J. Fisher), 1962; Principia Press of Trinity Univ., San Antonio, TX, Vol. 2, p. 212.
  • Ralph P. Grimaldi, Discrete and Combinatorial Mathematics: An Applied Introduction, Fifth Edition, Addison-Wesley, 2004, p. 134. - Mohammad K. Azarian, Oct 27 2011
  • S. Heubach and T. Mansour, Combinatorics of Compositions and Words, Chapman and Hall, 2009 page 86, Exercise 3.16.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 33.
  • 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).
  • A. H. Voigt, Theorie der Zahlenreihen und der Reihengleichungen, Goschen, Leipzig, 1911, p. 31.

Crossrefs

Row sums of triangle A026998.
Cf. A058809 (3^n-3, n>0).

Programs

  • Haskell
    a000918 = (subtract 2) . (2 ^)
    a000918_list = iterate ((subtract 2) . (* 2) . (+ 2)) (- 1)
    -- Reinhard Zumkeller, Apr 23 2013
    
  • Magma
    [2^n - 2: n in [0..40]]; // Vincenzo Librandi, Jun 23 2011
    
  • Maple
    seq(2^n-2,n=0..20) ;
  • Mathematica
    Table[2^n - 2, {n, 0, 29}] (* Alonso del Arte, Dec 01 2012 *)
  • PARI
    a(n)=2^n-2 \\ Charles R Greathouse IV, Jun 16 2011
    
  • Python
    def A000918(n): return (1<Chai Wah Wu, Jun 10 2025

Formula

a(n) = 2*A000225(n-1).
G.f.: 1/(1 - 2*x) - 2/(1 - x), e.g.f.: (e^x - 1)^2 - 1. - Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Apr 07 2001
For n >= 1, a(n) = A008970(n + 1, 2). - Philippe Deléham, Feb 21 2004
G.f.: (3*x - 1)/((2*x - 1)*(x - 1)). - Simon Plouffe in his 1992 dissertation for the sequence without the leading -1
a(n) = 2*a(n - 1) + 2. - Alexandre Wajnberg, Apr 25 2005
a(n) = A000079(n) - 2. - Omar E. Pol, Dec 16 2008
a(n) = A058896(n)/A052548(n). - Reinhard Zumkeller, Feb 14 2009
a(n) = A164874(n - 1, n - 1) for n > 1. - Reinhard Zumkeller, Aug 29 2009
a(n) = A173787(n,1); a(n) = A028399(2*n)/A052548(n), n > 0. - Reinhard Zumkeller, Feb 28 2010
a(n + 1) = A027383(2*n - 1). - Jason Kimberley, Nov 02 2011
G.f.: U(0) - 1, where U(k) = 1 + x/(2^k + 2^k/(x - 1 - x^2*2^(k + 1)/(x*2^(k + 1) - (k + 1)/U(k + 1) ))); (continued fraction, 3rd kind, 4-step). - Sergei N. Gladkovskii, Dec 01 2012
a(n+1) is the sum of row n in triangle A051601. - Reinhard Zumkeller, Aug 05 2013
a(n+1) = A127330(n,0). - Reinhard Zumkeller, Nov 16 2013
a(n) = Sum_{k=1..n-1} binomial(n, k) for n > 0. - Dan McCandless, Nov 14 2015
From Miquel Cerda, Aug 16 2016: (Start)
a(n) = A000225(n) - 1.
a(n) = A125128(n-1) - A000325(n).
a(n) = A095151(n) - A125128(n) - 1. (End)
a(n+1) = 2*(n + Sum_{j=1..n-1} (n-j)*2^(j-1)), n >= 1. This is the number of the rationals k/2, k = 1..2*n for n >= 1 and (2*k+1)/2^j for j = 2..n, n >= 2, and 2*k+1 < n-(j-1). See the example for n = 3 below. Motivated by the proposal A287012 by Mark Rickert. - Wolfdieter Lang, Jun 14 2017

Extensions

Maple programs fixed by Vaclav Kotesovec, Dec 13 2014

A059427 Triangle read by rows: T(n,k) is the number of permutations of [n] with k alternating runs (n>=2, k>=1).

Original entry on oeis.org

2, 2, 4, 2, 12, 10, 2, 28, 58, 32, 2, 60, 236, 300, 122, 2, 124, 836, 1852, 1682, 544, 2, 252, 2766, 9576, 14622, 10332, 2770, 2, 508, 8814, 45096, 103326, 119964, 69298, 15872, 2, 1020, 27472, 201060, 650892, 1106820, 1034992, 505500, 101042, 2, 2044
Offset: 2

Views

Author

N. J. A. Sloane, Jan 31 2001

Keywords

Comments

The permutation 732569148 has 4 alternating runs: 732, 2569, 91 and 148.

Examples

			T(3,2) = 4 because each of the permutations 132, 312, 213, 231 has two alternating runs: (13, 32), (31, 12), (21, 13), (23, 31); each of 123 and 321 has 1 alternating run.
Triangle (with rows n >= 2 and columns k >= 1) begins as follows:
  2;
  2,   4;
  2,  12,  10;
  2,  28,  58,   32;
  2,  60, 236,  300,  122;
  2, 124, 836, 1852, 1682, 544;
  ...
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, Dordrecht, Holland, 1974, p. 261, #13.
  • F. N. David and D. E. Barton, Combinatorial Chance, Hafner, NY, 1962, pp. 157-162.
  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 262, Table 7.2.1 doubled.
  • D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, 1973, Vol. 3, pp. 46 and 587-8.

Crossrefs

Diagonals give A001250, A001758. Column k = 2 is A028399.
Cf. A008303 (circular version of this array), A008970.
T(2n,n) gives 2*A360426.

Programs

  • Maple
    P := proc(n,k) if n<2 or k<1 or k>=n then 0 elif n=2 and k=1 then 2 else k*P(n-1,k)+2*P(n-1,k-1)+(n-k)*P(n-1,k-2) fi end: p:=(n,k)->P(n+1,k): matrix(9,9,p);
  • Mathematica
    t[n_, k_] := t[n, k] = k*t[n-1, k] + 2*t[n-1, k-1] + (n-k)*t[n-1, k-2];
    t[2, 1] = 2; t[n_, k_] /; n < 2 || k < 1 || k >= n = 0;
    Flatten[Table[t[n, k], {n,2,11}, {k, 1, n-1}]][[1 ;; 47]]
    (* Jean-François Alcover, Jun 16 2011, after recurrence *)

Formula

P(n, k) = 0 if n < 2 or k < 1 or k >= n; P(2, 1) = 2; P(n, k) = k*P(n-1, k) + 2*P(n-1, k-1) + (n-k)*P(n-1, k-2) [André]. - Emeric Deutsch, Feb 21 2004
The row generating polynomials P[n] satisfy P[n] = t*[(1 - t^2) * dP[n-1]/dt + (2 + (n-2) * t) * P[n-1]] and P[2] = 2*t.
T(n, n-1) = 2*A000111(n) = A001250(n-1).
T(n, k) = k*T(n-1, k) + 2*T(n-1, k-1) + (n-k)*T(n-1, k-2), where we set T(2, 1) = 2 and T(n, k) = 0 if n < 2 or k < 1 or k >= n.
E.g.f.: Sum_{n, k >= 0} T(n, k) * x^n * t^k/n! = 2*(1 - t^2 + t * sqrt(1-t^2) * sinh(x * sqrt(1 - t^2)))/((1 + t)^2*(1-t*cosh(x * sqrt(1 - t^2)))) - 2(1 + t*x)/(1 + t).
T(n, k) = 2*A008970(n, k).

Extensions

Edited by Emeric Deutsch and Ira M. Gessel, Dec 06 2004
André reference from Philippe Deléham, Jul 26 2006

A000708 a(n) = E(n+1) - 2*E(n), where E(i) is the Euler number A000111(i).

Original entry on oeis.org

-1, -1, 0, 1, 6, 29, 150, 841, 5166, 34649, 252750, 1995181, 16962726, 154624469, 1505035350, 15583997521, 171082318686, 1985148989489, 24279125761950, 312193418011861, 4210755676649046, 59445878286889709, 876726137720576550, 13483686390543382201
Offset: 0

Views

Author

Keywords

Comments

a(n) mod 10 for n >= 2 is the periodic sequence repeat: 0, 1, 6, 9.
For n >= 2, a(n) is the number of permutations on [n] that have n-2 "sequences" (which are maximal monotone runs in Comtet terminology) and start increasing. - Michael Somos, Aug 28 2013
From Petros Hadjicostas, Aug 07 2019: (Start)
With regard to the comment by Michael Somos above, a "sequence" in a permutation according to Ex. 13 (pp. 260-261) of Comtet (1974) is actually a "séquence" in a permutation according to André. He uses this terminology in several of his papers cited in the links below.
In the terminology of array A059427, these so-called "séquences" in permutations defined by Comtet and André are called "alternate runs" (or just "runs"). We discuss these so-called "sequences" below.
We clarify that a(n) is actually one-half the number of permutations on [n] that have n-2 "séquences" as defined by Comtet and André.
André (1884) defines a "maximum" of a permutation of [n] to be any number in the permutation that is greater than both of its neighbors, if it is an interior number, or greater than its single neighbor, if it is either at the beginning or at the end of the permutation.
André (1884) also defines a "minimum" of a permutation of [n] to be any number in the permutation that is less than both of its neighbors, if it is an interior number, or less than its single neighbor, if it is either at the beginning or at the end of the permutation.
A "séquence" in a permutation of [n] according to André and Comtet is a list of consecutive numbers in the permutation that begins with a maximum and ends with a minimum, or vice versa, but has no interior maxima and minima. As mentioned above, other authors call these so-called "séquences" "alternate runs" (or just "runs").
For example, in the permutation 78125436 of [8], we have three maxima, 8, 5, and 6; three minima, 7, 1, and 3; and the so-called "séquences" ("alternate runs") 78, 81, 125, 543, 36 (see p. 122 in André (1884)).
If in the above permutation we take the difference 8-7, 1-8, 2-1, 5-2, 4-5, 3-4, 6-3, we may form a word (list) of signs of consecutive differences: +-++--+.
In general, if in a permutation of [n], say a_1,a_2,...,a_n (written in one-line notation, but not in cycle notation), we form the differences a_2 - a_1, a_3 - a_2, ..., a_n - a_{n-1}, then we get a list of n-1 signs (+ or -).
For n >= 2, André (1885) calls a permutation of [n] "alternate" if it has n - 1 so-called "séquences" ("alternate runs"); i.e., if the corresponding list of signs alternates between + and -. See the documentation and references for sequences A000111 and A001250.
For n >= 2, André (1885) calls a permutation of [n] "quasi-alternate" if it has n - 2 so-called "séquences" ("alternate runs"); i.e., if the corresponding list of signs alternates between + and - except for a single ++ or a single --, but not both.
In the above example, the permutation 78125436 has 5 so-called "séquences" ("alternate signs") and 5 < 8-2 < 8-1; that is, it is neither alternate nor quasi-alternate. We can reach the same conclusion by looking at its corresponding list of signs +-++--+. The permutation is neither alternate nor quasi-alternate because we have one ++ and one --.
On p. 316, André (1885) gives the following two examples of permutations of [8]: 31426587 and 32541768 (using one-line notation for permutations). The first one has list of signs -+-+-+- while the second one has list of signs -+--+-+. The first one is alternate while the second one is quasi-alternate (because of a single --). Alternatively, the first one has n-1 = 7 so-called "séquences" ("alternate runs")--31, 14, 42, 26, 65, 58, 87--while the second one has n-2 = 6 so-called "séquences" ("alternate runs")--32, 25, 541, 17, 76, 68.
Here 2*a(n) is the total number of quasi-alternate permutations of [n]. Actually, André (1884, 1885) uses P_{n,s} to denote the number of permutations of [n] with exactly s of his so-called "séquences" ("alternate runs"). He uses the notation A_n to denote half the number of alternate permutations of [n] and B_n to denote half the number of quasi-alternate permutations of [n].
Thus, P_{n,n-1} = 2*A_n = 2*A000111(n) = A001250(n) for n >= 2 and P_{n,n-2} = 2*B_n = 2*a(n) for n >= 2.
We have P_{n,s} = A059427(n,s) for n >= 2 and s >= 1. See also p. 261 in Comtet (1974). They satisfy André's recurrence P_{n,s} = s*P_{n-1,s} + 2*P_{n-1,s-1} + (n-s)*P_{n-1,s-2} for n >= 3 and s >= 3 with P(n, 1) = 2 for n >= 2 and P(n, s) = 0 for s >= n.
The numbers Q(n,s) that count the circular permutations of [n] with exactly s so-called "séquences" ("alternate runs") appear in array A008303. They have also been studied by Désiré André (see the references there).
(End)

Examples

			G.f. = -1 - x + x^3 + 6*x^4 + 29*x^5 + 150*x^6 + 841*x^7 + 5166*x^8 + 34649*x^9 + ...
a(3) = 1 with permutation 123. a(4) = 6 with permutations 1243, 1342, 1432, 2341, 2431, 3421.
From _Petros Hadjicostas_, Aug 07 2019: (Start)
We elaborate on the example above. For the permutations of [3], we have the following sign sequences:
123 -> ++; 132 --> +-; 213 -> -+; 213 -> 213; 231 -> +-; 312 -> -+; 321 --> --.
Thus, 123 and 321 are quasi-alternate and a(3) = 2/2 = 1.
For the permutations of [4] we have:
  1234 -> +++ (neither alternate nor quasi-alternate);
  1243 -> ++- (quasi-alternate);
  1324 -> +-+ (alternate);
  1342 -> ++- (quasi-alternate);
  1423 -> +-+ (alternate);
  1432 -> +-- (quasi-alternate);
  2134 -> -++ (quasi-alternate);
  2143 -> -+- (alternate);
  2314 -> +-+ (alternate);
  2341 -> ++- (quasi-alternate);
  2413 -> +-+ (alternate);
  2431 -> +-- (quasi-alternate);
  3124 -> -++ (quasi-alternate);
  3142 -> -+- (alternate);
  3214 -> --+ (quasi-alternate);
  3241 -> -+- (alternate);
  3412 -> +-+ (alternate);
  3421 -> +-- (quasi-alternate);
  4123 -> -++ (quasi-alternate);
  4132 -> -+- (alternate);
  4213 -> --+ (quasi-alternate);
  4231 -> -+- (alternate);
  4312 -> --+ (quasi-alternate);
  4321 -> --- (neither alternate nor quasi-alternate).
Thus we have 10 = 2*A000111(4) = A001250(4) alternate permutations of [4] and 2*a(4) = 2*6 = 12 quasi-alternate permutations of [4]. The remaining 2 permutations (1234 and 4321) each have one so-called "séquence" ("alternate run").
Thus, P_{n=4, s=1} = 2, P_{n=4, s=2} = 12, and P_{n=4, s=10} = 10 (see row n = 4 for array A059427).
(End)
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 261.
  • E. Netto, Lehrbuch der Combinatorik. 2nd ed., Teubner, Leipzig, 1927, p. 113.
  • 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

Apart from initial terms, equals (1/2)*A001758. A diagonal of A008970.

Programs

  • Maple
    seq(i! * coeff(series((1 + (tan(t) + sec(t))^2 - 4*(tan(t) + sec(t))) / 2, t, 35), t, i), i=0..24); # Barbara Haas Margolius (margolius(AT)math.csuohio.edu), Mar 12 2001
  • Mathematica
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ (1 - 2 Cos[x]) / (1 - Sin[x]), {x, 0, n}]]; (* Michael Somos, Aug 28 2013 *)
    nmax = 22; ee = Table[2^n*EulerE[n, 1] + EulerE[n], {n, 0, nmax+1}]; dd = Table[Differences[ee, n][[1]] // Abs, {n, 0, nmax+1}]; a[n_] := dd[[n+2]] - 2dd[[n+1]]; a[0] = -1; Table[a[n], {n, 0, nmax}] (* Jean-François Alcover, Feb 10 2016, after Paul Curtz *)
    Table[If[n == 0, -1, 2 Abs[PolyLog[-n-1, I]] - 4 Abs[PolyLog[-n, I]]], {n, 0, 22}] (* Jean-François Alcover, Jul 01 2017 *)
  • PARI
    x='x+O('x^99); Vec(serlaplace((1-2*cos(x))/(1-sin(x))))
    
  • Python
    from mpmath import polylog, j, mp
    mp.dps=20
    def a(n): return -1 if n==0 else int(2*abs(polylog(-n - 1, j)) - 4*abs(polylog(-n, j)))
    print([a(n) for n in range(23)])  # Indranil Ghosh, Jul 02 2017
    
  • Python
    from itertools import count, islice, accumulate
    def A000708_gen(): # generator of terms
        yield -1
        blist = (0,1)
        for n in count(2):
            yield -2*blist[-1]+(blist:=tuple(accumulate(reversed(blist),initial=0)))[-1]
    A000708_list = list(islice(A000708_gen(),40)) # Chai Wah Wu, Jun 09-11 2022

Formula

E.g.f.: (1 - 2*cos(x)) / (1 - sin(x)).
a(n) ~ n! * 2*n*(2/Pi)^(n+2). - Vaclav Kotesovec, Oct 08 2013
a(n) = 2*abs(PolyLog(-n-1, i)) - 4*abs(PolyLog(-n, i)) for n > 0, with a(0) = -1. - Jean-François Alcover, Jul 02 2017

Extensions

More terms from Barbara Haas Margolius (margolius(AT)math.csuohio.edu), Mar 12 2001
Corrected and extended by T. D. Noe, Oct 25 2006
Edited by N. J. A. Sloane, Aug 27 2012

A226441 T(n,k) = number of permutations of {1..n} with fewer than k interior elements having values lying between the values of their neighbors.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 1, 2, 6, 10, 1, 2, 6, 22, 32, 1, 2, 6, 24, 90, 122, 1, 2, 6, 24, 118, 422, 544, 1, 2, 6, 24, 120, 658, 2226, 2770, 1, 2, 6, 24, 120, 718, 4078, 13102, 15872, 1, 2, 6, 24, 120, 720, 4914, 27724, 85170, 101042, 1, 2, 6, 24, 120, 720, 5038, 37300, 205134, 606542, 707584
Offset: 1

Views

Author

R. H. Hardin, Jun 06 2013

Keywords

Comments

Table starts
.......1........1.........1.........1.........1.........1.........1.........1
.......2........2.........2.........2.........2.........2.........2.........2
.......4........6.........6.........6.........6.........6.........6.........6
......10.......22........24........24........24........24........24........24
......32.......90.......118.......120.......120.......120.......120.......120
.....122......422.......658.......718.......720.......720.......720.......720
.....544.....2226......4078......4914......5038......5040......5040......5040
....2770....13102.....27724.....37300.....40066.....40318.....40320.....40320
...15872....85170....205134....308460....353556....362370....362878....362880
..101042...606542...1641534...2748354...3399246...3600306...3627778...3628798
..707584..4697946..14132390..26194542..35142546..38963958..39830282..39914754
.5405530.39330982.130299584.265691456.387129588.453658380.475089392.478739984

Examples

			Some solutions for n=8 k=4
..5....8....1....7....5....5....8....4....7....5....3....4....7....6....5....1
..8....1....7....3....1....4....1....7....2....4....5....2....2....5....3....2
..6....5....2....6....3....8....7....5....1....3....7....1....5....4....7....7
..7....6....6....8....6....6....6....1....5....8....2....7....1....7....6....4
..3....7....3....2....7....3....3....3....6....1....6....5....8....1....1....3
..4....3....8....1....4....7....2....8....4....7....4....8....3....8....2....6
..1....4....5....5....8....2....5....6....3....6....1....6....4....3....4....8
..2....2....4....4....2....1....4....2....8....2....8....3....6....2....8....5
		

Crossrefs

Column 1 is A001250.

A008971 Triangle read by rows: T(n,k) is the number of permutations of [n] with k increasing runs of length at least 2.

Original entry on oeis.org

1, 1, 1, 1, 1, 5, 1, 18, 5, 1, 58, 61, 1, 179, 479, 61, 1, 543, 3111, 1385, 1, 1636, 18270, 19028, 1385, 1, 4916, 101166, 206276, 50521, 1, 14757, 540242, 1949762, 1073517, 50521, 1, 44281, 2819266, 16889786, 17460701, 2702765, 1, 132854, 14494859
Offset: 0

Views

Author

Keywords

Comments

Row n has 1+floor(n/2) terms.
T(n,k) is also the number of permutations of [n] with k "exterior peaks" where we count peaks in the usual way, but add a peak at the beginning if the permutation begins with a descent, e.g. 213 has one exterior peak. T(3,1) = 5 since all permutations of [3] have an exterior peak except 123. This is also the definition for peaks of signed permutations, where we assume that a signed permutation always begins with a zero. - Kyle Petersen, Jan 14 2005
From Petros Hadjicostas, Aug 09 2019: (Start)
In their book, David and Barton (1962) use the notation T_{N,v*}^* for this array, where N is the length of the permutation and v* is the so-called "number of runs up" in the permutation. In modern terminology, a "run up" in a permutation is an increasing run of length >= 2. See their discussion on p. 154 of their book and see p. 163 for the definition of T_{N,v*}^*.
They do not consider as "runs up" single elements b_i in a permutation b = (b_1, b_2, ..., b_n) even if they satisfy b_{i-1} > b_i > b_{i+1} (with b_{n-1} > b_n when i = n and b_1 > b_2 when i = 1). (The command Runs[b] for permutation b in Mathematica, using the package Combinatorica`, will generate not only the "runs up" of b but also the single elements in the permutation b that satisfy one of the above inequalities. For example, Runs[{3,2,1}] gives the set of runs {{3}, {2}, {1}}, none of which is a "run up".)
So, here n = N and k = v*. On p. 163 of their book they give the recurrence shown below in the FORMULA section from Charalambides' (2002) book: T(n+1, k) = (2*k + 1) * T(n,k) + (n - 2*k + 2) * T(n, k-1) for n >= 0 and 1 <= k <= floor(n/2) + 1. The values of T_{N,v*}^* = T(n, k) appear in Table 10.5 (p. 163) of their book.
Since the complement of a permutation (b_1, b_2, ..., b_n) is (n+1-b_1, n+1-b_2, ..., n+1-b_n), it is clear that the current array T(n, k) is also the number of permutations of [n] with k decreasing runs of length >= 2 (i.e., the number of permutations of [n] with k "runs down" according to David and Barton (1962)).
Note that the number of permutations of [n] with k runs of length >= 2 that are either increasing or decreasing (i.e., the number of permutations of [n] that contain k "runs up" and "runs down" in total) is given by array A059427. One half of array A059427 is given in Table 10.4 (p. 159) in David and Barton (1962)--see also array A008970.
A run that is either a "run up" or "run down" (i.e., an ascending or a descending run of length >= 2) is called "séquence" by André (19th century) and Comtet (1974). See the references for sequence A000708 or for array A059427. (Again, recall that David and Barton do not consider single numbers as either a "run up" or a "run down".)
Morley (1897) proved that in a permutation of [n], #("runs up") + #("runs down") + #(monotonic triplets of adjacent numbers in the permutation) = n - 1. (His definition of a run is highly non-standard!) See the example below.
The number Q(n,k) of circular permutations of [n] that contain k runs that are either "runs up" or "runs down" (that is, k ascending or descending runs of length >= 2) is given by array A008303. More precisely, Q(n+1, 2*(k+1)) = A008303(n, k) for n >= 1 and 0 <= k <= ceiling(n/2)-1. In addition, Q(n, s) = 0 when either s is odd, or n <= 1, or s > n. Also, Q_{n,2} = 2^(n-2) for n >= 2.
The numbers in array A008303 appear in Table 10.6 (p. 163) in David and Barton (1962).
(End)

Examples

			Triangle T(n,k) (with rows n >= 0 and columns k >= 0) starts as follows:
  1;
  1;
  1,   1;
  1,   5;
  1,  18,       5;
  1,  58,      61;
  1, 179,     479,     61;
  1, 543,    3111,   1385;
  1, 1636,  18270,  19028,  1385;
  1, 4916, 101166, 206276, 50521;
  ...
Example: T(3,1) = 5 because all permutations of [3] with the exception of 321 have one increasing run of length at least 2.
From _Peter Bala_, Jan 23 2016: (Start)
Row 6: cos(x)^7*(d/dx)^6(1/cos(x)) = sin(x)^6 + 179*sin(x)^4 + 479*sin(x)^2 + 61.
Equivalently, (sqrt(1 - x^2))^7*D^6(1/sqrt(1 - x^2)) = x^6 + 179*x^4 + 479*x^2 + 61, where D = sqrt(1 - x^2)*d/dx. (End)
From _Petros Hadjicostas_, Aug 09 2019: (Start)
Consider the permutations of [4]. We list the increasing runs of length at least 2 (= "runs up"), the decreasing runs of length at least 2 (= "runs down"), and the monotonic triplets of adjacent numbers in the permutation (which we abbreviate to MTAN for simplicity). The sum of the numbers of these three should be n-1 (see Morley (1897) but notice that his use of the word "run" is highly non-standard).
1234 -> "runs up" = {1234}, "runs down" = {}, MTAN = {123, 234}.
1243 -> "runs up" = {124}, "runs down" = {43}, MTAN = {124}.
1324 -> "runs up" = {13, 24}, "runs down" = {32}, MTAN = {}.
1342 -> "runs up" = {134}, "runs down" = {42}, MTAN = {134}.
1423 -> "runs up" = {14, 23}, "runs down" = {42}, MTAN = {}.
1432 -> "runs up" = {14}, "runs down" = {432}, MTAN = {432}.
2134 -> "runs up" = {134}, "runs down" = {21}, MTAN = {134}.
2143 -> "runs up" = {14}, "runs down" = {21, 43}, MTAN = {}.
2314 -> "runs up" = {23, 14}, "runs down" = {31}, MTAN = {}.
2341 -> "runs up" = {234}, "runs down" = {41}, MTAN = {234}.
2413 -> "runs up" = {24, 13}, "runs down" = {41}, MTAN = {}.
2431 -> "runs up" = {24}, "runs down" = {431}, MTAN = {431}.
3124 -> "runs up" = {124}, "runs down" = {31}, MTAN = {124}.
3142 -> "runs up" = {14}, "runs down" = {31, 42}, MTAN = {}.
3214 -> "runs up" = {14}, "runs down" = {321}, MTAN = {321}.
3241 -> "runs up" = {24}, "runs down" = {32, 41}, MTAN = {}.
3412 -> "runs up" = {34, 12}, "runs down" = {41}, MTAN = {}.
3421 -> "runs up" = {34}, "runs down" = {421}, MTAN = {421}.
4123 -> "runs up" = {123}, "runs down" = {41}, MTAN = {123}.
4132 -> "runs up" = {13}, "runs down" = {41, 32}, MTAN = {}.
4213 -> "runs up" = {13}, "runs down" = {421}, MTAN = {421}.
4231 -> "runs up" = {23}, "runs down" = {42, 31}, MTAN = {}.
4312 -> "runs up" = {12}, "runs down" = {431}, MTAN = {431}.
4321 -> "runs up" = {}, "runs down" = {4321}, MTAN = {432, 321}.
If we let k = number of increasing runs of length >= 2 (= number of "runs up") in a permutation of [4], then (from above) the possible values of k are 0, 1, 2, and we have T(n=4, k=0) = 1, T(n=4, k=1) = 18, and T(n=4, k=2) = 5.
If we let k = number of decreasing runs of length >= 2 (= number of "runs down") in a permutation of [4], then again the possible values of k are 0, 1, 2, and we have T(n=4, k=0) = 1, T(n=4, k=1) = 18, and T(n=4, k=2) = 5.
Finally, note that if b_i, b_{i+1}, b_{i+2} is an increasing triplet of adjacent numbers in permutation b, then n+1-b_i, n+1-b_{i+1}, n+1-b_{i+2} is a decreasing triplet of adjacent numbers in the complement of b, and vice versa. For example, 4213 is the complement of 1342. Their set of monotonic triplets of adjacent numbers are {421} and {134}, respectively, and we have 4 + 1 = 2 + 3 = 1 + 4 = 5.
(End)
		

References

  • Ch. A. Charalambides, Enumerative Combinatorics, Chapman & Hall/CRC, Boca Raton, Florida, 2002.
  • F. N. David and D. E. Barton, Combinatorial Chance, Charles Griffin, 1962; see Table 10.5, p. 163.
  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 260.

Crossrefs

A160486 is a sub-triangle.
A000340, A000363, A000507 equal the second, third and fourth left hand columns.
T(2n,n) gives A000364.

Programs

  • Maple
    G:=sqrt(1-t)/(sqrt(1-t)*cosh(x*sqrt(1-t))-sinh(x*sqrt(1-t))): Gser:=simplify(series(G,x=0,15)): for n from 0 to 14 do P[n]:=sort(expand(n!*coeff(Gser,x,n))) od: seq(seq(coeff(t*P[n],t^k),k=1..1+floor(n/2)),n=0..14); # edited by Johannes W. Meijer, May 15 2009
    # second Maple program:
    T:= proc(n, k) option remember; `if`(k=0, 1, `if`(k>iquo(n, 2), 0,
          (2*k+1)*T(n-1, k) +(n+1-2*k)*T(n-1, k-1)))
        end:
    seq(seq(T(n, k), k=0..n/2), n=0..14); # Alois P. Heinz, Oct 16 2013
  • Mathematica
    t[n_, 0] = 1; t[n_, k_] /; k > Floor[n/2] = 0;
    t[n_ , k_ ] /; k <= Floor[n/2] := t[n, k] = (2 k + 1) t[n - 1, k] + (n - 2 k + 1) t[n - 1, k - 1];
    Flatten[Table[t[n, k], {n, 0, 12}, {k, 0, Floor[n/2]}]][[1 ;; 45]] (* Jean-François Alcover, May 30 2011, after given formula *)

Formula

E.g.f.: G(t,x) = sum(T(n,k) t^k x^n/n!, 0<=k<=floor(n/2), n>=0) = sqrt(1-t)/(sqrt(1-t)*cosh(x*sqrt(1-t))-sinh(x*sqrt(1-t))) (Ira M. Gessel).
T(n+1,k) = (2*k+1)*T(n,k) + (n-2*k+2)*T(n,k-1) (see p. 542 of the Charalambides reference or p. 163 in the David and Barton book).
G.f.: T(0)/(1-x), where T(k) = 1 - y*x^2*(k+1)^2/(y*x^2*(k+1)^2 - (1 -x -2*x*k)*(1 -3*x -2*x*k)/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Nov 08 2013
From Peter Bala, Jan 23 2016: (Start)
cos(x)^(n+1)*(d/dx)^n(1/cos(x)) = Sum_{k = 0..floor(n/2)} T(n,k)*sin(x)^(n-2*k).
Equivalently, let D be the differential operator sqrt(1 - x^2)*d/dx. Then sqrt(1 - x^2)^(n+1)*D^n(1/sqrt(1 - x^2)) = Sum_{k = 0..floor(n/2)} T(n,k)*x^(n-2*k). (End)

Extensions

Edited by Emeric Deutsch and Ira M. Gessel, Aug 28 2004
Crossrefs added by Johannes W. Meijer, May 24 2009

A001758 Number of quasi-alternating permutations of length n.

Original entry on oeis.org

0, 2, 12, 58, 300, 1682, 10332, 69298, 505500, 3990362, 33925452, 309248938, 3010070700, 31167995042, 342164637372, 3970297978978, 48558251523900, 624386836023722, 8421511353298092, 118891756573779418, 1753452275441153100, 26967372781086764402
Offset: 2

Views

Author

Keywords

Comments

The number of permutations of [n] with n-2 sequences (see Comtet).
From Petros Hadjicostas, Aug 08 2019: (Start)
We clarify the word "sequences" used above because it may not be standard. On pp. 260-261 of his book, Comtet (1974) defines a so-called "sequence" in a permutation b of [n]. Using one-line notation (not cycle notation), write b = (b_1, b_2, ..., b_n) for the elements of a permutation of [n]. A maximal list of indices of length l (where l >= 2) is called a "sequence" in the permutation b if it is of the form {i, i+1, ..., i+l-1} for some integer i (with 1 <= i <= n-l+1) such that b_i < b_{i+1} < ... < b_{i+l-1} or b_i > b_{i+1} > ... > b_{i+l-1}. (The word "maximal" means that in the first case, b_{i-1} > b_i and b_{i+l} < b_{i+l-1}, while in the second case, b_{i-1} < b_i and b_{i+l} > b_{i+l-1}, provided that b_{i-1} and b_{i+l} can be defined.) The assumption l >= 2 is important; i.e., these so-called "sequences" should have length >= 2.
Comtet (1974) has borrowed this confusing terminology about "séquences" in permutations from André (see links to some of his papers below). André actually uses the term "séquence" for the list of terms (b_i, b_{i+1}, ..., b_{i+l-1}) rather than the index set {i, i+1, ..., i+l-1}.
Some authors today use the term "alternate runs" (or just "runs") to discuss these so-called "séquences" defined by Comtet and André but we must have l >= 2.
Thus, here a(n) is the number of permutations of [n] with n-2 such "séquences" ("alternate runs").
For an extensive discussion of these so-called "séquences" in permutations ("alternate runs"), maxima and minima in a permutation, alternate and quasi-alternate permutations, and other related information, see the four papers by André, or see my comments for sequence A000708 (which equals one-half of the current sequence).
David and Barton (1962, p. 154) call these "séquences" "runs up" if they are ascending and "runs down" if they are descending. In modern terminology, "runs up" are ascending runs of length >= 2 while "runs down" are descending runs of length >= 2. Thus, a modern terminology for these "séquences" is "ascending or descending runs of length >= 2".
(End)

Examples

			G.f. = 2*x^3 + 12*x^4 + 58*x^5 + 300*x^6 + 1682*x^7 + 10332*x^8 + 69298*x^9 + ...
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 261.
  • F. N. David and D. E. Barton, Combinatorial Chance, Charles Griffin, 1962.
  • E. Netto, Lehrbuch der Combinatorik. 2nd ed., Teubner, Leipzig, 1927, p. 113.
  • 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

Essentially the same as 2*A000708.
The diagonal P(n, n-2) of A059427.
See A008970 for formulas.

Programs

  • Maple
    seq(i!*coeff(series((tan(t)+sec(t))^2-4*(tan(t)+sec(t)),t,35),t,i),i=2..24); # Barbara Haas Margolius (margolius(AT)math.csuohio.edu), Mar 12 2001
  • Mathematica
    With[{nn=30}, Join[{1}, Drop[CoefficientList[Series[(Tan[x]+Sec[x])^2- 4(Tan[x]+Sec[x]),{x,0,nn}],x] Range[0,nn]!,3]]] (* Harvey P. Dale, Oct 01 2011 *)
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ (u (u - 4) /. u -> Tan[x] + Sec[x]) + 3 + 2 x, {x, 0, n}]]; (* Michael Somos, Oct 24 2015 *)
    Table[4 Abs[PolyLog[-n-1, I]] - 8 Abs[PolyLog[-n, I]], {n, 2, 23}] (* Jean-François Alcover, Jul 01 2017 *)
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); 2 * n! * polcoeff( 1 + x + (1 - 2 * cos(x + A)) / (1 - sin(x + A)), n))}; /* Michael Somos, Aug 28 2012 */
    
  • PARI
    x='x+O('x^99); concat(0, Vec(serlaplace(2*(1+x+(1-2*cos(x))/(1-sin(x)))))) \\ Altug Alkan, Jul 01 2017

Formula

E.g.f.: 3 + 2*x + u(x)^2 - 4*u(x) where u(x) = tan(x) + sec(x). - Barbara Haas Margolius (margolius(AT)math.csuohio.edu), Mar 12 2001
E.g.f.: 2 * (1 + x + (1 - 2*cos(x)) / (1 - sin(x))). - Michael Somos, Aug 28 2012
Asymptotics: a(n) ~ 8*(2/Pi)^(n+1)*((n+1)/Pi-1)*n!.
a(n) = A001250(n+1) - 2*A001250(n). - Barbara Haas Margolius (margolius(AT)math.csuohio.edu), Mar 12 2001

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Feb 01 2001
Edited by N. J. A. Sloane, Aug 27 2012

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

Original entry on oeis.org

5, 29, 118, 418, 1383, 4407, 13736, 42236, 128761, 390385, 1179354, 3554454, 10696139, 32153963, 96592972, 290041072, 870647517, 2612991141, 7841070590, 23527406090, 70590606895, 211788597919, 635399348208, 1906265153508, 5718929678273, 17157057470297
Offset: 4

Views

Author

Keywords

Examples

			a(4)=5 because the permutations of [4] with three sign runs are 1324, 1423, 2143, 2314, 2413 and their reversals.
		

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(n) = T(n, 3), where T(n, k) is the array defined in A008970.

Programs

  • Maple
    A000352:=-(-5+6*z)/(3*z-1)/(2*z-1)/(z-1)**2; # [Conjectured by Simon Plouffe in his 1992 dissertation.] [correct up to offset]
    # second Maple program:
    a:= n-> (<<0|0|1|2>>. <<7|1|0|0>, <-17|0|1|0>, <17|0|0|1>, <-6|0|0|0>>^n)[1, 4]:
    seq(a(n), n=4..30);  # Alois P. Heinz, Aug 26 2008
  • Mathematica
    nn = 40; CoefficientList[Series[x^4*(5 - 6*x)/((1 - 3*x)*(1 - 2*x)*(1 - x)^2), {x, 0, nn}], x] (* T. D. Noe, Jun 19 2012 *)
  • PARI
    a(n) = (3^n-4*2^n-2*n+11)/4;

Formula

a(n) = (3^n-4*2^n-2*n+11)/4, n>=4. - Tim Monahan, Jul 14 2011
G.f.: x^4*(5-6*x)/((1-3*x)*(1-2*x)*(1-x)^2).
Limit_{n->infinity} 4*a(n)/3^n = 1. - Philippe Deléham, Feb 22 2004

Extensions

Edited by Emeric Deutsch, Feb 18 2004

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

Original entry on oeis.org

16, 150, 926, 4788, 22548, 100530, 433162, 1825296, 7577120, 31130190, 126969558, 515183724, 2082553132, 8395437930, 33776903714, 135691891272, 544517772984, 2183315948550, 8748985781230, 35043081823140, 140313684667076
Offset: 5

Views

Author

Keywords

Examples

			a(5)=16 because the permutations of [5] with four sign runs are 13254, 14253, 14352, 15342, 15243, 21435, 21534, 23154, 24153, 25143, 31425, 31524, 32415, 32514, 41325, 42315 and their reversals.
		

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(n) = T(n, 4), where T(n, k) is the array defined in A008970.
Equals 1/2 * A060158(n).

Programs

  • Mathematica
    CoefficientList[Series[2 (24 x^2 - 29 x + 8)/((x - 1)^2 (2 x - 1)^2 (3 x - 1) (4 x - 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Oct 13 2013 *)
  • PARI
    a(n)=([0,1,0,0,0,0; 0,0,1,0,0,0; 0,0,0,1,0,0; 0,0,0,0,1,0; 0,0,0,0,0,1; -48,172,-244,175,-67,13]^(n-5)*[16;150;926;4788;22548;100530])[1,1] \\ Charles R Greathouse IV, Jun 23 2020

Formula

Limit_{n->infinity} 8*a(n)/4^n = 1. - Philippe Deléham, Feb 22 2004
G.f.: 2*x^5*(24*x^2-29*x+8) / ((x-1)^2*(2*x-1)^2*(3*x-1)*(4*x-1)). - Colin Barker, Dec 21 2012

Extensions

Edited by Emeric Deutsch, Feb 18 2004
Showing 1-10 of 13 results. Next