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 47 results. Next

A063886 Number of n-step walks on a line starting from the origin but not returning to it.

Original entry on oeis.org

1, 2, 2, 4, 6, 12, 20, 40, 70, 140, 252, 504, 924, 1848, 3432, 6864, 12870, 25740, 48620, 97240, 184756, 369512, 705432, 1410864, 2704156, 5408312, 10400600, 20801200, 40116600, 80233200, 155117520, 310235040, 601080390, 1202160780, 2333606220, 4667212440
Offset: 0

Views

Author

Henry Bottomley, Aug 28 2001

Keywords

Comments

A Chebyshev transform of A007877(n+1). The g.f. is transformed to (1+x)/((1-x)(1+x^2)) under the mapping G(x)->(1/(1+x^2))G(1/(1+x^2)). - Paul Barry, Oct 12 2004
a(n-1) = 2*C(n-2, floor((n-2)/2)) is also the number of bit strings of length n in which the number of 00 substrings is equal to the number of 11 substrings. For example, when n = 4 we have 4 such bit strings: 0011, 0101, 1010, and 1100. - Angel Plaza, Apr 23 2009
Hankel transform is A120617. - Paul Barry, Aug 10 2009
The Hankel transform of a(n) is (-2)^C(n+1,2). The Hankel transform of (-1)^C(n+1,2)*a(n) is (-1)^C(n+1,2)*A164584(n). - Paul Barry, Aug 17 2009
For n > 1, a(n) is also the number of n-step walks starting from the origin and returning to it exactly once. - Geoffrey Critzer, Jan 24 2010
-a(n) is the Z-sequence for the Riordan array A130777. (See the W. Lang link under A006232 for A- and Z-sequences for Riordan matrices). - Wolfdieter Lang, Jul 12 2011
Number of subsets of {1,...,n} in which the even elements appear as often at even positions as at odd positions. - Gus Wiseman, Mar 17 2018

Examples

			a(4) = 6 because there are six length four walks that do not return to the origin: {-1, -2, -3, -4}, {-1, -2, -3, -2}, {-1, -2, -1, -2}, {1, 2, 1, 2}, {1, 2, 3, 2}, {1, 2, 3, 4}. There are also six such walks that return exactly one time: {-1, -2, -1, 0}, {-1, 0, -1, -2}, {-1, 0, 1, 2}, {1, 0, -1, -2}, {1, 0, 1, 2}, {1, 2, 1, 0}. - _Geoffrey Critzer_, Jan 24 2010
The a(5) = 12 subsets in which the even elements appear as often at even positions as at odd positions: {}, {1}, {3}, {5}, {1,3}, {1,5}, {2,4}, {3,5}, {1,2,4}, {1,3,5}, {2,4,5}, {1,2,4,5}. - _Gus Wiseman_, Mar 17 2018
		

Crossrefs

Programs

  • Magma
    [1] cat [2*Binomial(n-1, Floor((n-1)/2)): n in [1..40]]; // G. C. Greubel, Jun 07 2023
    
  • Maple
    seq(seq(binomial(2*j,j)*i, i=1..2),j=0..16); # Zerinvary Lajos, Apr 28 2007
    # second Maple program:
    a:= proc(n) option remember; `if`(n<2, n+1,
           4*a(n-2) +2*(a(n-1) -4*a(n-2))/n)
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Feb 10 2014
    # third program:
    A063886 := series(BesselI(0, 2*x)*(1 + x*2 + x*Pi*StruveL(1, 2*x)) - Pi*x*BesselI(1, 2*x)*StruveL(0, 2*x), x = 0, 34): seq(n!*coeff(A063886, x, n), n = 0 .. 33); # Mélika Tebni, Jun 17 2024
  • Mathematica
    Table[Length[Select[Map[Accumulate, Strings[{-1, 1}, n]], Count[ #, 0] == 0 &]], {n, 0, 20}] (* Geoffrey Critzer, Jan 24 2010 *)
    CoefficientList[Series[Sqrt[(1+2x)/(1-2x)],{x,0,40}],x] (* Harvey P. Dale, Apr 28 2016 *)
  • PARI
    a(n)=(n==0)+2*binomial(n-1,(n-1)\2)
    
  • PARI
    a(n) = 2^n*prod(k=0,n-1,(k/n+1/n)^((-1)^k)); \\ Michel Marcus, Dec 03 2013
    
  • Python
    from math import ceil
    from sympy import binomial
    def a(n):
        if n==0: return 1
        return 2*binomial(n-1,(n-1)//2)
    print([a(n) for n in range(18)])
    # David Nacin, Feb 29 2012
    
  • SageMath
    [2*binomial(n-1, (n-1)//2) + int(n==0) for n in range(41)] # G. C. Greubel, Jun 07 2023

Formula

G.f.: sqrt((1+2*x)/(1-2*x)).
a(n+1) = 2*C(n, floor(n/2)) = 2*A001405(n); a(2n) = C(2n, n) = A000984(n) = 4*a(2n-2)-|A002420(n)| = 4*a(2n-2)-2*A000108(n-1) = 2*A001700(n-1); a(2n+1) = 2*a(2n) = A028329(n).
2*a(n) = A047073(n+1).
a(n) = Sum_{k=0..n} abs(A106180(n,k)). - Philippe Deléham, Oct 06 2006
a(n) = Sum_{k=0..n} (k+1)binomial(n, (n-k)/2) ( 1-cos((k+1)*Pi/2) (1+(-1)^(n-k))/(n+k+2) ). - Paul Barry, Oct 12 2004
G.f.: 1/(1-2*x/(1+x/(1+x/(1-x/(1-x/(1+x/(1+x/(1-x/(1-x/(1+ ... (continued fraction). - Paul Barry, Aug 10 2009
G.f.: 1 + 2*x/(G(0)-x+x^2) where G(k)= 1 - 2*x^2 - x^4/G(k+1); (continued fraction, 1-step). - Sergei N. Gladkovskii, Aug 10 2012
D-finite with recurrence: n*a(n) = 2*a(n-1) + 4*(n-2)*a(n-2). - R. J. Mathar, Dec 03 2012
From Sergei N. Gladkovskii, Jul 26 2013: (Start)
G.f.: 1/G(0), where G(k) = 1 - 2*x/(1 + 2*x/(1 + 1/G(k+1) )); (continued fraction).
G.f.: G(0), where G(k) = 1 + 2*x/(1 - 2*x/(1 + 1/G(k+1) )); (continued fraction).
G.f.: W(0)/2*(1+2*x), where W(k) = 1 + 1/(1 - 2*x/(2*x + (k+1)/(x*(2*k+1))/W(k+1) )), abs(x) < 1/2; (continued fraction). (End)
a(n) = 2^n*Product_{k=0..n-1} (k/n + 1/n)^((-1)^k). - Peter Luschny, Dec 02 2013
G.f.: G(0), where G(k) = 1 + 2*x*(4*k+1)/((2*k+1)*(1+2*x) - (2*k+1)*(4*k+3)*x*(1+2*x)/((4*k+3)*x + (k+1)*(1+2*x)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jan 19 2014
From Peter Bala, Mar 29 2024: (Start)
a(n) = 2^n * Sum_{k = 0..n} (-1)^(n+k)*binomial(1/2, k)*binomial(- 1/2, n-k) = 2^n * A000246(n)/n!.
a(n) = (1/2^n) * binomial(2*n, n) * hypergeom([-1/2, -n], [1/2 - n], -1). (End)
E.g.f.: BesselI(0, 2*x)*(1 + x*(2 + Pi)*StruveL(1, 2*x)) - Pi*x*BesselI(1, 2*x)*StruveL(0, 2*x). - Stefano Spezia, May 11 2024
a(n) = A089849(n) + A138364(n). - Mélika Tebni, Jun 17 2024
From Amiram Eldar, Aug 15 2025: (Start)
Sum_{n>=0} 1/a(n) = Pi/(3*sqrt(3)) + 2.
Sum_{n>=0} (-1)^n/a(n) = 2/3 + Pi/(9*sqrt(3)). (End)

A005803 Second-order Eulerian numbers: a(n) = 2^n - 2*n.

Original entry on oeis.org

1, 0, 0, 2, 8, 22, 52, 114, 240, 494, 1004, 2026, 4072, 8166, 16356, 32738, 65504, 131038, 262108, 524250, 1048536, 2097110, 4194260, 8388562, 16777168, 33554382, 67108812, 134217674, 268435400, 536870854, 1073741764, 2147483586
Offset: 0

Views

Author

Keywords

Comments

Starting with n=2, a(n) is the second-order Eulerian number <> (see A008517).
Also, number of 3 X n binary matrices avoiding simultaneously the right-angled numbered polyomino patterns (ranpp) (00;1), (01;0) and (01;1). An occurrence of a ranpp (xy;z) in a matrix A=(a(i,j)) is a triple (a(i1,j1), a(i1,j2), a(i2,j1)) where i1Sergey Kitaev, Nov 11 2004
This is the number of target DNA sequences of the correct length present after each successive cycle of the Polymerase Chain Reaction (PCR). The first two cycles produce 0 target sequences, there are 2 target sequences present after the third cycle, then 8 after the fourth cycle, and so forth. - A. Timothy Royappa, Jun 16 2012
a(n+2) = the row sums of A222403. - J. M. Bergot, Apr 04 2018

Examples

			G.f. = 1 + 2*x^3 + 8*x^4 + 22*x^5 + 52*x^6 + 114*x^7 + 240*x^8 + 494*x^9 + ...
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, 2nd ed. Addison-Wesley, Reading, MA, 1994, p. 270.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Equivalent to second column of A008517.
a(n) = A070313 + 1 = A052515 + 2. Bisection of A077866.
Equals for n =>3 the third right hand column of A163936.
Cf. A000918 (first differences).

Programs

  • Haskell
    a005803 n = 2 ^ n - 2 * n
    a005803_list = 1 : f 1 [0, 2 ..] where
       f x (z:zs@(z':_)) = y : f y zs  where y = (x + z) * 2 - z'
    -- Reinhard Zumkeller, Jan 19 2014
    
  • Magma
    [2^n-2*n: n in [0..30]]; // Wesley Ivan Hurt, Jun 04 2014
  • Maple
    A005803:=-2*z/(2*z-1)/(z-1)**2; # conjectured by Simon Plouffe in his 1992 dissertation. Gives sequence except for three leading terms
  • Mathematica
    Table[2^n-2n,{n,0,50}] (* or *) LinearRecurrence[{4,-5,2},{1,0,0},51] (* Harvey P. Dale, May 21 2011 *)
  • PARI
    {a(n) = if( n<0, 0, 2^n - 2*n)}; /* Michael Somos, Oct 13 2002 */
    

Formula

G.f.: 1 + 2*x^3/((1-x)^2*(1-2*x)). a(n) = A008517(n-1, 2). - Michael Somos, Oct 13 2002
Equals binomial transform of [1, -1, 1, 1, 1, ...]. - Gary W. Adamson, Jul 14 2008
a(0) = 1 and a(n) = Sum_{k=0..n-3} ((-1)^(n+k+1)*binomial(2*n-1,k)*stirling1(2*n-k-3,n-k-2)), n=>1. - Johannes W. Meijer, Oct 16 2009
a(0)=1, a(1)=0, a(2)=0, a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3). - Harvey P. Dale, May 21 2011
a(n) = A000225(n+1) - A081494(n+1), n > 1. In other words, a(n) equals the sum of the elements in a Pascal triangle of depth n+1 minus the sum of the elements on its perimeter. - Ivan N. Ianakiev, Jun 01 2014
a(n) = A165900(n-1) + Sum_{i=0..n-1} a(i), for n > 0. - Ivan N. Ianakiev, Nov 24 2014
a(n) = A000225(n) - A005408(n-1). - Miquel Cerda, Nov 25 2016
E.g.f.: exp(x)*(exp(x) - 2*x). - Ilya Gutkovskiy, Nov 25 2016

A079484 a(n) = (2n-1)!! * (2n+1)!!, where the double factorial is A006882.

Original entry on oeis.org

1, 3, 45, 1575, 99225, 9823275, 1404728325, 273922023375, 69850115960625, 22561587455281875, 9002073394657468125, 4348001449619557104375, 2500100833531245335015625, 1687568062633590601135546875, 1321365793042101440689133203125
Offset: 0

Views

Author

Benoit Cloitre, Jan 17 2003

Keywords

Comments

a(n) is the determinant of M(2n+1) where M(k) is the k X k matrix with m(i,j)=j if i+j=k m(i,j)=i otherwise. - Adapted to offset 0, Rainer Rosenthal, Jun 19 2024
In the following two comments on the calculation of the terms using permanents, offset 1 is assumed. In the corresponding PARI code, this is implemented with offset 0. - Hugo Pfoertner, Jun 23 2024
(-1)^n*a(n)/2^(2n-1) is the permanent of the (m X m) matrix {1/(x_i-y_j), 1<=i<=m, 1<=j<=m}, where x_1,x_2,...,x_m are the zeros of x^m-1 and y_1,y_2,...,y_m the zeros of y^m+1 and m=2n-1.
In 1881, R. F. Scott posed a conjecture that the absolute value of permanent of square matrix with elements a(i,j)= (x_i - y_j)^(-1), where x_1,...,x_n are roots of x^n=1, while y_1,...,y_n are roots of y^n=-1, equals a((n-1)/2)/2^n, if n>=1 is odd, and 0, if n>=2 is even. After a century (in 1979), the conjecture was proved by H. Minc. - Vladimir Shevelev, Dec 01 2013
a(n) is the number of permutations in S_{2n+1} in which all cycles have odd length. - José H. Nieto S., Jan 09 2012
Number of 3-bundled increasing bilabeled trees with 2n labels. - Markus Kuba, Nov 18 2014
a(n) is the number of rooted, binary, leaf-labeled topologies with 2n+2 leaves that have n+1 cherry nodes. - Noah A Rosenberg, Feb 12 2019

Examples

			G.f. = 1 + 3*x + 45*x^2 + 1575*x^3 + 99225*x^4 + 9823275*x^5 + ...
M(5) =
  [1, 2, 3, 1, 5]
  [1, 2, 2, 4, 5]
  [1, 3, 3, 4, 5]
  [4, 2, 3, 4, 5]
  [1, 2, 3, 4, 5].
Integral_{x=0..oo} x^3*BesselK(1, sqrt(x)) = 1575*Pi. - _Olivier Gérard_, May 20 2009
		

References

  • Miklós Bóna, A walk through combinatorics, World Scientific, 2006.

Crossrefs

Bisection of A000246, A053195, |A013069|, |A046126|. Cf. A000909.
Cf. A001044, A010791, |A129464|, A114779, are also values of similar moments.
Equals the row sums of A162005.
Cf. A316728.
Diagonal elements of A306364 in even-numbered rows.

Programs

  • Magma
    I:=[1, 3]; [n le 2 select I[n] else (4*n^2-8*n+3)*Self(n-1): n in [1..20]]; // Vincenzo Librandi, Nov 18 2014
    
  • Maple
    a:= n-> (d-> d(2*n-1)*d(2*n+1))(doublefactorial):
    seq(a(n), n=0..15);  # Alois P. Heinz, Jan 30 2013
    # second Maple program:
    A079484 := n-> LinearAlgebra[Determinant](Matrix(2*n+1, (i, j)-> `if`(i+j=2*n+1, j, i))): seq(A079484(n), n=0..14); # Rainer Rosenthal, Jun 18 2024
  • Mathematica
    a[n_] := (2n - 1)!!*(2n + 1)!!; Table[a[n], {n, 0, 13}] (* Jean-François Alcover, Jan 30 2013 *)
  • PARI
    /* Formula using the zeta function and a log integral:*/
    L(n)= intnum(t=0, 1, log(1-1/t)^n);
    Zetai(n)= -I*I^n*(2*Pi)^(n-1)/(n-1)*L(1-n);
    a(m)={my(n=m+1);round(real(-I*2^(2*n-1)*Zetai(1/2-n)*L(-1/2+n)/(Zetai(-1/2+n)*L(1/2-n))))};
    /* Gerry Martens, Mar 07 2011, adapted to offset 0 by Hugo Pfoertner, Jun 19 2024 */
    
  • PARI
    {a(n) = if( n<0, -1 / self()(-1-n), (2*n + 1)! * (2*n)! / (n! * 2^n)^2 )}; /* Michael Somos, May 04 2017 */
    
  • PARI
    {a(n) = if( n<0, -1 / self()(-1-n), my(m = 2*n + 1); m! * polcoeff( x / sqrt( 1 - x^2 + x * O(x^m) ), m))}; /* Michael Somos, May 04 2017 */
    
  • PARI
    \\ using the Pochhammer symbol
    a(n) = {my(P(x,k)=gamma(x+k)/gamma(x)); 4^n*round(P(1/2,n)*P(3/2,n))} \\ Hugo Pfoertner, Jun 20 2024
    
  • PARI
    \\ Scott's (1881) method
    a(n) = {my(m=2*n+1, X = polroots(x^m-1), Y = polroots(x^m+1), M = matrix(m, m, i, j, 1/(X[i]-Y[j]))); (-1)^n * round(2^m * real(matpermanent(M)))}; \\ Hugo Pfoertner, Jun 23 2024

Formula

D-finite with recurrence a(n) = (4*n^2 - 1) * a(n-1) for all n in Z.
a(n) = A001147(n)*A001147(n+1).
E.g.f.: 1/(1-x^2)^(3/2) (with interpolated zeros). - Paul Barry, May 26 2003
a(n) = (2n+1)! * C(2n, n) / 2^(2n). - Ralf Stephan, Mar 22 2004.
Alternatingly signed values have e.g.f. sqrt(1+x^2).
a(n) is the value of the n-th moment of (1/Pi)*BesselK(1, sqrt(x)) on the positive part of the real line. - Olivier Gérard, May 20 2009
a(n) = -2^(2*n-1)*exp(i*n*Pi)*gamma(1/2+n)/gamma(3/2-n). - Gerry Martens, Mar 07 2011
E.g.f. (odd powers) tan(arcsin(x)) = Sum_{n>=0} (2n-1)!!*(2n+1)!!*x^(2*n+1)/(2*n+1)!. - Vladimir Kruchinin, Apr 22 2011
G.f.: 1 + x*(G(0) - 1)/(x-1) where G(k) = 1 - ((2*k+2)^2-1)/(1-x/(x - 1/G(k+1))); ( continued fraction ). - Sergei N. Gladkovskii, Jan 15 2013
a(n) = (2^(2*n+3)*Gamma(n+3/2)*Gamma(n+5/2))/Pi. - Jean-François Alcover, Jul 20 2015
Limit_{n->oo} 4^n*(n!)^2/a(n) = Pi/2. - Daniel Suteu, Feb 05 2017
From Michael Somos, May 04 2017: (Start)
a(n) = (2*n + 1) * A001818(n).
E.g.f.: Sum_{n>=0} a(n) * x^(2*n+1) / (2*n+1)! = x / sqrt(1 - x^2) = tan(arcsin(x)).
Given e.g.f. A(x) = y, then x * y' = y + y^3.
a(n) = -1 / a(-1-n) for all n in Z.
0 = +a(n)*(+288*a(n+2) -60*a(n+3) +a(n+4)) +a(n+1)*(-36*a(n+2) -4*a(n+3)) +a(n+2)*(+3*a(n+2)) for all n in Z. (End)
a(n) = Sum_{k=0..2n} (k+1) * A316728(n,k). - Alois P. Heinz, Jul 12 2018
From Amiram Eldar, Mar 18 2022: (Start)
Sum_{n>=0} 1/a(n) = 1 + L_1(1)*Pi/2, where L is the modified Struve function.
Sum_{n>=0} (-1)^n/a(n) = 1 - H_1(1)*Pi/2, where H is the Struve function. (End)

Extensions

Simpler description from Daniel Flath (deflath(AT)yahoo.com), Mar 05 2004

A262124 Number A(n,k) of permutations p of [n] such that the up-down signature of p has nonnegative partial sums with a maximal value <= k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 2, 0, 1, 1, 1, 3, 5, 0, 1, 1, 1, 3, 8, 16, 0, 1, 1, 1, 3, 9, 40, 61, 0, 1, 1, 1, 3, 9, 44, 162, 272, 0, 1, 1, 1, 3, 9, 45, 219, 1134, 1385, 0, 1, 1, 1, 3, 9, 45, 224, 1445, 6128, 7936, 0, 1, 1, 1, 3, 9, 45, 225, 1568, 9985, 55152, 50521, 0
Offset: 0

Views

Author

Alois P. Heinz, Sep 11 2015

Keywords

Examples

			p = 1423 is counted by T(4,1) because the up-down signature of p = 1423 is 1,-1,1 with partial sums 1,0,1.
q = 1432 is not counted by any T(4,k) because the up-down signature of q = 1432 is 1,-1,-1 with partial sums 1,0,-1.
A(4,1) = 5: 1324, 1423, 2314, 2413, 3412.
A(4,2) = 8: 1243, 1324, 1342, 1423, 2314, 2341, 2413, 3412.
A(4,3) = 9: 1234, 1243, 1324, 1342, 1423, 2314, 2341, 2413, 3412.
Square array A(n,k) begins:
  1,   1,    1,    1,    1,    1,    1,    1, ...
  1,   1,    1,    1,    1,    1,    1,    1, ...
  0,   1,    1,    1,    1,    1,    1,    1, ...
  0,   2,    3,    3,    3,    3,    3,    3, ...
  0,   5,    8,    9,    9,    9,    9,    9, ...
  0,  16,   40,   44,   45,   45,   45,   45, ...
  0,  61,  162,  219,  224,  225,  225,  225, ...
  0, 272, 1134, 1445, 1568, 1574, 1575, 1575, ...
		

Crossrefs

Main diagonal gives A000246.

Programs

  • Maple
    b:= proc(u, o, c) option remember; `if`(c<0, 0, `if`(u+o=0, x^c,
          (p-> add(coeff(p, x, i)*x^max(i, c), i=0..degree(p)))(add(
           b(u-j, o-1+j, c-1), j=1..u)+add(b(u+j-1, o-j, c+1), j=1..o))))
        end:
    A:= (n,k)-> `if`(n=0, 1, (p-> add(coeff(p, x, i), i=0..min(n, k))
                  )(add(b(j-1, n-j, 0), j=1..n))):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    b[u_, o_, c_] := b[u, o, c] = If[c<0, 0, If[u+o == 0, x^c, Function[p, Sum[ Coefficient[p, x, i]*x^Max[i, c], {i, 0, Exponent[p, x]}]][Sum[b[u-j, o - 1+j, c-1], {j, 1, u}] + Sum[b[u+j-1, o-j, c+1], {j, 1, o}]]]]; A[n_, k_] := If[n==0, 1, Function[p, Sum[Coefficient[p, x, i], {i, 0, Min[n, k]}]][ Sum[b[j-1, n-j, 0], {j, 1, n}]]]; Table[Table[A[n, d-n], {n, 0, d}], {d, 0, 12}] // Flatten (* Jean-François Alcover, Feb 22 2016, after Alois P. Heinz *)

Formula

A(n,k) = Sum_{i=0..k} A262125(n,i).

A262125 Number T(n,k) of permutations p of [n] such that the up-down signature of p has nonnegative partial sums with a maximal value of k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 0, 0, 1, 0, 0, 2, 1, 0, 0, 5, 3, 1, 0, 0, 16, 24, 4, 1, 0, 0, 61, 101, 57, 5, 1, 0, 0, 272, 862, 311, 123, 6, 1, 0, 0, 1385, 4743, 3857, 778, 254, 7, 1, 0, 0, 7936, 47216, 27589, 14126, 1835, 514, 8, 1, 0, 0, 50521, 322039, 355751, 111811, 47673, 4189, 1031, 9, 1, 0
Offset: 0

Views

Author

Alois P. Heinz, Sep 11 2015

Keywords

Examples

			T(4,1) = 5: 1324, 1423, 2314, 2413, 3412.
T(4,2) = 3: 1243, 1342, 2341.
T(4,3) = 1: 1234.
Triangle T(n,k) begins:
  1;
  1,    0;
  0,    1,    0;
  0,    2,    1,    0;
  0,    5,    3,    1,   0;
  0,   16,   24,    4,   1,   0;
  0,   61,  101,   57,   5,   1, 0;
  0,  272,  862,  311, 123,   6, 1, 0;
  0, 1385, 4743, 3857, 778, 254, 7, 1, 0;
		

Crossrefs

Columns k=1-10 give: A000111 (for n>1), A320976, A320977, A320978, A320979, A320980, A320981, A320982, A320983, A320984.
Row sums give A000246.
T(2n,n) gives A262127.

Programs

  • Maple
    b:= proc(u, o, c) option remember; `if`(c<0, 0, `if`(u+o=0, x^c,
          (p-> add(coeff(p, x, i)*x^max(i, c), i=0..degree(p)))(add(
           b(u-j, o-1+j, c-1), j=1..u)+add(b(u+j-1, o-j, c+1), j=1..o))))
        end:
    T:= n-> `if`(n=0, 1, (p-> seq(coeff(p, x, i), i=0..n)
                 )(add(b(j-1, n-j, 0), j=1..n))):
    seq(T(n), n=0..10);
  • Mathematica
    b[u_, o_, c_] := b[u, o, c] = If[c<0, 0, If[u+o==0, x^c, Sum[Coefficient[ #, x, i]*x^Max[i, c], {i, 0, Exponent[#, x]}]]& @ Sum[b[u-j, o-1+j, c-1], {j, 1, u}] + Sum[b[u+j-1, o-j, c+1], {j, 1, o}]];
    T[n_] := If[n==0, {1}, Table[Coefficient[#, x, i], {i, 0, n}]]& @ Sum[b[j-1, n-j, 0], {j, 1, n}];
    T /@ Range[0, 10] // Flatten (* Jean-François Alcover, Jan 19 2020, after Alois P. Heinz *)

Formula

T(n,k) = A262124(n,k) - A262124(n,k-1) for k>0, T(n,0) = A262124(n,0).

A111594 Triangle of arctanh numbers.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 0, 8, 0, 1, 0, 24, 0, 20, 0, 1, 0, 0, 184, 0, 40, 0, 1, 0, 720, 0, 784, 0, 70, 0, 1, 0, 0, 8448, 0, 2464, 0, 112, 0, 1, 0, 40320, 0, 52352, 0, 6384, 0, 168, 0, 1, 0, 0, 648576, 0, 229760, 0, 14448, 0, 240, 0, 1
Offset: 0

Views

Author

Wolfdieter Lang, Aug 23 2005

Keywords

Comments

Sheffer triangle associated to Sheffer triangle A060524.
For Sheffer triangles (matrices) see the explanation and S. Roman reference given under A048854.
The inverse matrix of A with elements a(n,m), n,m>=0, is given in A111593.
In the umbral calculus notation (see the S. Roman reference) this triangle would be called associated to (1,tanh(y)).
The row polynomials p(n,x):=sum(a(n,m)*x^m,m=0..n), together with the row polynomials s(n,x) of A060524 satisfy the exponential (or binomial) convolution identity s(n,x+y) = sum(binomial(n,k)*s(k,x)*p(n-k,y),k=0..n), n>=0.
Without the n=0 row and m=0 column and signed, this will become the Jabotinsky triangle A049218 (arctan numbers). For Jabotinsky matrices see the Knuth reference under A039692.
The row polynomials p(n,x) (defined above) have e.g.f. exp(x*arctanh(y)).
Exponential Riordan array [1, arctanh(x)] = [1, log(sqrt((1+x)/(1-x)))]. - Paul Barry, Apr 17 2008
Also the Bell transform of A005359. For the definition of the Bell transform see A264428. - Peter Luschny, Jan 27 2016

Examples

			Binomial convolution of row polynomials:
p(3,x)= 2*x+x^3; p(2,x)=x^2, p(1,x)= x, p(0,x)= 1,
together with those from A060524:
s(3,x)= 5*x+x^3; s(2,x)= 1+x^2, s(1,x)= x, s(0,x)= 1; therefore:
5*(x+y)+(x+y)^3 = s(3,x+y) = 1*s(0,x)*p(3,y) + 3*s(1,x)*p(2,y) + 3*s(2,x)*p(1,y) +1*s(3,x)*p(0,y) = 2*y+y^3 + 3*x*y^2 + 3*(1+x^2)*y + (5*x+x^3).
Triangle begins:
  1;
  0,   1;
  0,   0,    1;
  0,   2,    0,   1;
  0,   0,    8,   0,    1;
  0,  24,    0,  20,    0,  1;
  0,   0,  184,   0,   40,  0,   1;
  0, 720,    0, 784,    0, 70,   0, 1;
  0,   0, 8448,   0, 2464,  0, 112, 0, 1;
...
		

Crossrefs

Programs

  • Maple
    # The function BellMatrix is defined in A264428.
    BellMatrix(n -> `if`(n::even, n!, 0), 10); # Peter Luschny, Jan 27 2016
  • Mathematica
    rows = 10;
    t = Table[If[EvenQ[n], n!, 0], {n, 0, rows}];
    T[n_, k_] := BellY[n, k, t];
    Table[T[n, k], {n, 0, rows}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 22 2018, after Peter Luschny *)
  • Sage
    # uses[riordan_array from A256893]
    riordan_array(1, atanh(x), 9, exp=true) # Peter Luschny, Apr 19 2015

Formula

E.g.f. for column m>=0: ((arctanh(x))^m)/m!.
a(n, m) = coefficient of x^n of ((arctanh(x))^m)/m!, n>=m>=0, else 0.
a(n, m) = a(n-1, m-1) + (n-2)*(n-1)*a(n-2, m), a(n, -1):=0, a(0, 0)=1, a(n, m)=0 for n

A296676 Expansion of e.g.f. 1/(1 - arctanh(x)).

Original entry on oeis.org

1, 1, 2, 8, 40, 264, 2048, 18864, 196992, 2330112, 30519552, 440998656, 6940852224, 118501542912, 2177222879232, 42886017982464, 900748014944256, 20107190510714880, 475167358873239552, 11854636521914695680, 311291779253770911744, 8583598112533040332800, 247944624171011289907200
Offset: 0

Author

Ilya Gutkovskiy, Dec 18 2017

Keywords

Examples

			1/(1 - arctanh(x)) = 1 + x/1! + 2*x^2/2! + 8*x^3/3! + 40*x^4/4! + 264*x^5/5! + ...
		

Programs

  • Maple
    S:= series(1/(1-arctanh(x)),x,41):
    seq(coeff(S,x,j)*j!,j=0..40); # Robert Israel, Dec 18 2017
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 1, add(`if`(j::odd,
          a(n-j)*binomial(n, j)*(j-1)!, 0), j=1..n))
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Jun 22 2021
  • Mathematica
    nmax = 22; CoefficientList[Series[1/(1 - ArcTanh[x]), {x, 0, nmax}], x] Range[0, nmax]!
    nmax = 22; CoefficientList[Series[1/(1 + (Log[1 - x] - Log[1 + x])/2), {x, 0, nmax}], x] Range[0, nmax]!
  • PARI
    x='x+O('x^99); Vec(serlaplace(1/(1+(log(1-x)-log(1+x))/2))) \\ Altug Alkan, Dec 18 2017

Formula

E.g.f.: 1/(1 + (log(1 - x) - log(1 + x))/2).
a(n) ~ n! * 4*exp(2) * (exp(2)+1)^(n-1) / (exp(2)-1)^(n+1). - Vaclav Kotesovec, Dec 18 2017
a(n) = Sum_{k=0..n} k! * A111594(n,k). - Seiichi Manyama, Jun 30 2025

A002019 a(n) = a(n-1) - (n-1)(n-2)a(n-2).

Original entry on oeis.org

1, 1, 1, -1, -7, 5, 145, -5, -6095, -5815, 433025, 956375, -46676375, -172917875, 7108596625, 38579649875, -1454225641375, -10713341611375, 384836032842625, 3663118565923375, -127950804666254375, -1519935859717136875
Offset: 0

Keywords

References

  • Dwight, Tables of Integrals ..., Eq. 552.5, page 133.
  • 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

Bisections are A102058 and A102059.
Cf. A006228.
Row sums of signed triangle A049218.
Cf. A000246.

Programs

  • Haskell
    a002019 n = a002019_list !! n
    a002019_list = 1 : 1 : zipWith (-)
       (tail a002019_list) (zipWith (*) a002019_list a002378_list)
    -- Reinhard Zumkeller, Feb 27 2012
    
  • Magma
    I:=[1,1]; [1] cat [ n le 2 select I[n] else Self(n-1)-(n^2-3*n+2)*Self(n-2): n in [1..35]]; // Vincenzo Librandi, May 02 2015
  • Mathematica
    RecurrenceTable[{a[0]==1,a[1]==1,a[n]==a[n-1]-(n-1)(n-2)a[n-2]}, a[n],{n,30}] (* Harvey P. Dale, May 02 2011 *)
    CoefficientList[Series[E^(ArcTan[x]),{x,0,20}],x]*Range[0,20]! (* Vaclav Kotesovec, Nov 06 2014 *)
  • Maxima
    a(n):=n!*sum(if oddp(m+n) then 0 else (-1)^((3*n+m)/2)/(2^m*m!)*sum(2^i*binomial(n-1,i-1)*m!/i!*stirling1(i,m),i,m,n),m,1,n); /* Vladimir Kruchinin, Aug 05 2010 */
    

Formula

E.g.f.: exp(arctan(x)).
a(n) = n!*sum(if oddp(m+n) then 0 else (-1)^((3*n+m)/2)/(2^m*m!)*sum(2^i*binomial(n-1,i-1)*m!/i!*stirling1(i,m),i,m,n),m,1,n), n>0. - Vladimir Kruchinin, Aug 05 2010
E.g.f.: exp(arctan(x)) = 1 + 2x/(H(0)-x); H(k) = 4k + 2 + x^2*(4k^2 + 8k + 5)/H(k+1); (continued fraction). - Sergei N. Gladkovskii, Nov 15 2011
a(n+1) = a(n) - a(n-1) * A002378(n-2). - Reinhard Zumkeller, Feb 27 2012
E.g.f.: -2i*(B((1+ix)/2; (2-i)/2, (2+i)/2) - B(1/2; (2-i)/2, (2+i)/2)), for a(0)=0, a(1)=a(2)=a(3)=1, B(x;a,b) is the incomplete Beta function. - G. C. Greubel, May 01 2015
a(n) = i^n*n!*Sum_{r+s=n} (-1)^s*binomial(-i/2, r)*binomial(i/2,s) where i is the imaginary unit. See the Fib. Quart. link. - Michel Marcus, Jan 22 2017

Extensions

More terms from Herman P. Robinson

A049218 Triangle T(n,k) of arctangent numbers: expansion of arctan(x)^n/n!.

Original entry on oeis.org

1, 0, 1, -2, 0, 1, 0, -8, 0, 1, 24, 0, -20, 0, 1, 0, 184, 0, -40, 0, 1, -720, 0, 784, 0, -70, 0, 1, 0, -8448, 0, 2464, 0, -112, 0, 1, 40320, 0, -52352, 0, 6384, 0, -168, 0, 1, 0, 648576, 0, -229760, 0, 14448, 0, -240, 0, 1, -3628800, 0, 5360256, 0, -804320, 0, 29568, 0, -330, 0, 1
Offset: 1

Keywords

Comments

|T(n,k)| gives the sum of the M_2 multinomial numbers (A036039) for those partitions of n with exactly k odd parts. E.g.: |T(6,2)| = 144 + 40 = 184 from the partitions of 6 with exactly two odd parts, namely (1,5) and (3,3), with M_2 numbers 144 and 40. Proof via the general Jabotinsky triangle formula for |T(n,k)| using partitions of n into k parts and their M_3 numbers (A036040). Then with the special e.g.f. of the (unsigned) k=1 column, f(x):= arctanh(x), only odd parts survive and the M_3 numbers are changed into the M_2 numbers. For the Knuth reference on Jabotinsky triangles see A039692. - Wolfdieter Lang, Feb 24 2005 [The first two sentences have been corrected thanks to the comment by José H. Nieto S. given below. - Wolfdieter Lang, Jan 16 2012]
|T(n,k)| gives the number of permutations of {1,2,...,n} (degree n permutations) with the number of odd cycles equal to k. E.g.: |T(5,3)|= 20 from the 20 degree 5 permutations with cycle structure (.)(.)(...). Proof: Use the cycle index polynomial for the symmetric group S_n (see the M_2 array A036039 or A102189) together with the partition interpretation of |T(n,k)| given above. - Wolfdieter Lang, Feb 24 2005 [See the following José H. Nieto S. correction. - Wolfdieter Lang, Jan 16 2012]
The first sentence of the above comment is inexact, it should be "|T(n,k)| gives the number of degree n permutations which decompose into exactly k odd cycles". The number of degree n permutations with k odd cycles (and, possibly, other cycles of even length) is given by A060524. - José H. Nieto S., Jan 15 2012
The unsigned triangle with e.g.f. exp(x*arctanh(z)) is the associated Jabotinsky type triangle for the Sheffer type triangle A060524. See the comments there. - Wolfdieter Lang, Feb 24 2005
Also the Bell transform of the sequence (-1)^(n/2)*A005359(n) without column 0. For the definition of the Bell transform see A264428. - Peter Luschny, Jan 28 2016

Examples

			Triangle begins:
   1;
   0,   1;
  -2,   0,   1;
   0,  -8,   0,   1;
  24,   0, -20,   0,   1;
   0, 184,   0, -40,   0,   1;
  ...
O.g.f. for fifth subdiagonal: (24*t+16*t^2)/(1-t)^7 = 24*t + 184*t^2 + 784*t^3 + 2404*t^4 + ....
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 260.

Crossrefs

Essentially same as A008309, which is the main entry for this sequence.
Row sums (unsigned) give A000246(n); signed row sums give A002019(n), n>=1. A137513.

Programs

  • Maple
    A049218 := proc(n,k)(-1)^((3*n+k)/2) *add(2^(j-k)*n!/j! *stirling1(j,k) *binomial(n-1,j-1),j=k..n) ; end proc: # R. J. Mathar, Feb 14 2011
    # The function BellMatrix is defined in A264428.
    # Adds (1,0,0,0, ..) as column 0.
    BellMatrix(n -> `if`(n::odd, 0, (-1)^(n/2)*n!), 10); # Peter Luschny, Jan 28 2016
  • Mathematica
    t[n_, k_] := (-1)^((3n+k)/2)*Sum[ 2^(j-k)*n!/j!*StirlingS1[j, k]*Binomial[n-1, j-1], {j, k, n}]; Flatten[ Table[ t[n, k], {n, 1, 11}, {k, 1, n}]] (* Jean-François Alcover, Dec 06 2011, after Vladimir Kruchinin *)
    BellMatrix[f_Function, len_] := With[{t = Array[f, len, 0]}, Table[BellY[n, k, t], {n, 0, len-1}, {k, 0, len-1}]];
    rows = 12;
    M = BellMatrix[If[OddQ[#], 0, (-1)^(#/2)*#!]&, rows];
    Table[M[[n, k]], {n, 2, rows}, {k, 2, n}] // Flatten (* Jean-François Alcover, Jun 23 2018, after Peter Luschny *)
  • PARI
    T(n,k)=polcoeff(serlaplace(atan(x)^k/k!), n)

Formula

E.g.f.: arctan(x)^k/k! = Sum_{n>=0} T(n, k) x^n/n!.
T(n,k) = ((-1)^((3*n+k)/2)*n!/2^k)*Sum_{i=k..n} 2^i*binomial(n-1,i-1)*Stirling1(i,k)/i!. - Vladimir Kruchinin, Feb 11 2011
E.g.f.: exp(t*arctan(x)) = 1 + t*x + t^2*x^2/2! + t*(t^2-2)*x^3/3! + .... The unsigned row polynomials are the Mittag-Leffler polynomials M(n,t/2). See A137513. The compositional inverse (with respect to x) (x-t/2*log((1+x)/(1-x)))^(-1) = x/(1-t) + 2*t/(1-t)^4*x^3/3!+ (24*t+16*t^2)/(1-t)^7*x^5/5! + .... The rational functions in t generate the (unsigned) diagonals of the table. See the Bala link. - Peter Bala, Dec 04 2011

Extensions

Additional comments from Michael Somos

A001900 Successive numerators of Wallis's approximation to Pi/2 (unreduced).

Original entry on oeis.org

1, 2, 4, 16, 64, 384, 2304, 18432, 147456, 1474560, 14745600, 176947200, 2123366400, 29727129600, 416179814400, 6658877030400, 106542032486400, 1917756584755200, 34519618525593600, 690392370511872000, 13807847410237440000, 303772643025223680000
Offset: 0

Keywords

Comments

a(n) = number of permutations of [n+1] all of whose non-initial left-to-right minima are at even positions in the permutation. For example, a(2) = 4 counts 123, 132, 213, 312. - David Callan, Jul 22 2008
Number of self-avoiding planar walks starting at (0,0), ending at (n,0), remaining in the first quadrant and using steps (0,1), (1,0), (-1,1), and (1,-1) with the restriction that (0,1) is never used below the diagonal and (1,0) is never used above the diagonal. a(2) = 4: [(0,0),(1,0),(2,0)], [(0,0),(0,1),(1,0),(2,0)], [(0,0),(0,1),(0,2),(1,1),(2,0)], [(0,0),(1,0),(0,1),(0,2),(1,1),(2,0)]. - Alois P. Heinz, Mar 23 2017
a(n+1) is the number of 0-1 square matrices of order n+1 with 2n+1 nonzero entries where the cell (i,j) is 1 for all i+j=n+2 and every diagonal, parallel to the main diagonal, has exactly one 1. For example, a(2) = 4: [(0,1,1), (1,1,0), (1,0,0)], [(0,1,1), (0,1,0), (1,1,0)], [(0,0,1), (1,1,1), (1,0,0)], [(0,0,1), (0,1,1), (1,1,0)]. - Christian Barrientos, Jul 17 2021

Examples

			From _Wolfdieter Lang_, Dec 06 2017: (Start)
Partial products of the rows N (for numerators a(n)) and D (for denominators b(n) = A000246(n+1)) begin:
n:    0  1  2  3  4   5    6     7      8       9       10 ...
N:    1  2  2  4  4   6    6     8      8      10       10 ...
D:    1  1  3  3  5   5    7     7      9       9       11 ...
a(n): 1  2  4 16 64 384 2304 18432 147456 14745601 4745600 ...
b(n): 1  1  3  9 45 225 1575 11025  99225   893025 9823275 ...  (End)
		

References

  • H.-D. Ebbinghaus et al., Numbers, Springer, 1990, p. 146.

Crossrefs

For the reduced form see A001901(n)/A001902(n), n >= 0.

Programs

  • Mathematica
    a[n_] := a[n] = If[n==0, 1, (n+Mod[n, 2]) a[n-1]];
    a /@ Range[0, 21] (* Jean-François Alcover, Jan 31 2020 *)
  • PARI
    a(n)=if(n<0,0,prod(k=1,n,if(k%2,k+1,k)))

Formula

2.2.4.4.6.6....2n.2n.../1.3.3.5.5.7.7....(2n-1).(2n+1) ...for n >= 1.
a(n) = 2^n * A010551(n) = 2^n * [n/2]! * [(n+1)/2]!. - Ralf Stephan, Mar 11 2004
Conjecture: a(n) - a(n-1) - n*(n-1)*a(n-2) = 0. - R. J. Mathar, Jun 07 2013 [The proof, for n >= 2, follows from the bisection recurrence given below. - Wolfdieter Lang, Dec 07 2017]
E.g.f.: E(0), where E(k)= 1 + 2*x*(k+1)/((2*k+1) - x*(2*k+1)/(x + 1/E(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 08 2013
G.f.: G(0), where G(k)= 1 + 2*x*(k+1)/(1 - 2*x*(k+1)/(2*x*(k+1) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 08 2013
Bisection: a(2*k+1) = ((2*k+1)+1)*a(2*k), a(2*k) = 2*k*a(2*k-1), k >= 0, with a(0) = 1. The proof is obvious from the numbers in the numerator (see the row N in the example). From a proposal by David James Sycamore, Nov 02 2017 based on the fractions 4/1, 8/3, 32/9, 128/45, ... converging very slowly to Pi, given on p. 16 of the Derbyshire link. - Wolfdieter Lang, Dec 06 2017
From Mathias Zechmeister, Jul 24 2022: (Start)
Let J_0(x) and J_1(x) denote the Bessel functions and i = sqrt(-1).
a(n) = denominator([x^n](J_0(x) + J_1(x))).
a(n) = denominator([x^n](J_0(i*x) - i*J_1(i*x))).
Bisection: a(2*k) = A002454(k), a(2*k+1) = A002474(k).
G.f. for 1/a(n): J_0(i*x) - i*J_1(i*x). (End)
Showing 1-10 of 47 results. Next