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 61-70 of 231 results. Next

A000903 Number of inequivalent ways of placing n nonattacking rooks on n X n board up to rotations and reflections of the board.

Original entry on oeis.org

1, 1, 2, 7, 23, 115, 694, 5282, 46066, 456454, 4999004, 59916028, 778525516, 10897964660, 163461964024, 2615361578344, 44460982752488, 800296985768776, 15205638776753680, 304112757426239984, 6386367801916347184
Offset: 1

Views

Author

Keywords

Examples

			For n=4 the 7 solutions may be taken to be 1234,1243,1324,1423,1432,2143,2413.
		

References

  • L. C. Larson, The number of essentially different nonattacking rook arrangements, J. Recreat. Math., 7 (No. 3, 1974), circa pages 180-181.
  • R. C. Read, personal communication.
  • 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).
  • Z. Stankova and J. West, A new class of Wilf-equivalent permutations, J. Algeb. Combin., 15 (2002), 271-290.

Crossrefs

Programs

  • Maple
    Maple programs for A000142, A037223, A122670, A001813, A000085, A000898, A000407, A000902, A000900, A000901, A000899, A000903
    P:=n->n!; # Gives A000142
    G:=proc(n) local k; k:=floor(n/2); k!*2^k; end; # Gives A037223, A000165
    R:=proc(n) local m; if n mod 4 = 2 or n mod 4 = 3 then RETURN(0); fi; m:=floor(n/4); (2*m)!/m!; end; # Gives A122670, A001813
    unprotect(D); D:=proc(n) option remember; if n <= 1 then 1 else D(n-1)+(n-1)*D(n-2); fi; end; # Gives A000085
    B:=proc(n) option remember; if n <= 1 then RETURN(1); fi; if n mod 2 = 1 then RETURN(B(n-1)); fi; 2*B(n-2) + (n-2)*B(n-4); end; # Gives A000898 (doubled up)
    rho:=n->R(n)/2; # Gives A000407, aerated
    beta:=n->B(n)/2; # Gives A000902, doubled up
    delta:=n->(D(n)-B(n))/2; # Gives A000900
    unprotect(gamma); gamma:=n-> if n <= 1 then RETURN(0) else (G(n)-B(n)-R(n))/4; fi; # Gives A000901, doubled up
    alpha:=n->P(n)/8-G(n)/8+B(n)/4-D(n)/4; # Gives A000899
    unprotect(sigma); sigma:=n-> if n <= 1 then RETURN(1); else P(n)/8+G(n)/8+R(n)/4+D(n)/4; fi; #Gives A000903
  • Mathematica
    c[n_] := Floor[n/2]! 2^Floor[n/2];
    r[n_] := If[Mod[n, 4] > 1, 0, m = Floor[n/4]; If[m == 0, 1, (2 m)!/m!]];
    d[0] = d[1] = 1; d[n_] := d[n] = (n - 1)d[n - 2] + d[n - 1];
    a[1] = 1; a[n_] := (n! + c[n] + 2 r[n] + 2 d[n])/8;
    Array[a, 21] (* Jean-François Alcover, Apr 06 2011, after Matthias Engelhardt, further improved by Robert G. Wilson v *)

Formula

If n>1 then a(n) = 1/8 * (F(n) + C(n) + 2 * R(n) + 2 * D(n)), where F(n) = A000142(n) [all solutions, i.e., factorials], C(n) = A037223(n) [central symmetric solutions], R(n) = A037224(n) [rotationally symmetric solutions] and D(n) = A000085(n) [symmetric solutions by reflection at a diagonal]. - Matthias Engelhardt, Apr 05 2000
For asymptotics see the Robinson paper.

Extensions

More terms from David W. Wilson, Jul 13 2003

A039757 Triangle of coefficients in expansion of (x-1)*(x-3)*(x-5)*...*(x-(2*n-1)).

Original entry on oeis.org

1, -1, 1, 3, -4, 1, -15, 23, -9, 1, 105, -176, 86, -16, 1, -945, 1689, -950, 230, -25, 1, 10395, -19524, 12139, -3480, 505, -36, 1, -135135, 264207, -177331, 57379, -10045, 973, -49, 1, 2027025, -4098240, 2924172, -1038016, 208054, -24640, 1708, -64, 1, -34459425, 71697105, -53809164, 20570444, -4574934, 626934, -53676, 2796, -81, 1
Offset: 0

Views

Author

Ruedi Suter (suter(AT)math.ethz.ch)

Keywords

Comments

Triangle of B-analogs of Stirling numbers of first kind.

Examples

			The triangle T(n, k) begins:
n\k        0        1         2        3        4      5      6    7   8  9
0:         1
1:        -1        1
2:         3       -4         1
3:       -15       23        -9        1
4:       105     -176        86      -16        1
5:      -945     1689      -950      230      -25      1
6:     10395   -19524     12139    -3480      505    -36      1
7:   -135135   264207   -177331    57379   -10045    973    -49    1
8:   2027025 -4098240   2924172 -1038016   208054 -24640   1708  -64   1
9: -34459425 71697105 -53809164 20570444 -4574934 626934 -53676 2796 -81  1
...
row n = 10 :654729075 -1396704420 1094071221 -444647600 107494190 -16486680 1646778 -106800 4335 -100 1
... reformatted and extended. - _Wolfdieter Lang_, May 09 2017
		

Crossrefs

A028338 is unsigned version.
From Johannes W. Meijer, Jun 08 2009: (Start)
A161198 is an unsigned scaled triangle version.
A109692 is an unsigned transposed triangle version.
A000007 equals the row sums. (End)
A000165(n)*(-1)^n (alternating row sums).

Programs

  • Maple
    nmax:=8; mmax:=nmax: for n from 0 to nmax do a(n, 0) := (-1)^n*doublefactorial(2*n-1) od: for n from 0 to nmax do a(n, n) := 1 od: for n from 2 to nmax do for m from 1 to n-1 do a(n, m) := a(n-1, m-1)-(2*n-1)*a(n-1, m) od; od: seq(seq(a(n, m), m=0..n), n=0..nmax); # Johannes W. Meijer, Jun 08 2009, revised Nov 29 2012
  • Mathematica
    a[n_, m_] := a[n, m] = a[n-1, m-1] - (2*n-1)*a[n-1, m]; a[n_, 0] := (-1)^n*(2*n-1)!!; a[n_, n_] = 1; Table[a[n, m], {n, 0, 9}, {m, 0, n}] // Flatten (* Jean-François Alcover, Oct 16 2012, after Johannes W. Meijer *)
  • PARI
    row(n)=Vecrev(prod(i=1,n,'x-2*i+1)) \\ Charles R Greathouse IV, Feb 09 2017

Formula

Triangle T(n, k), read by rows, given by [ -1, -2, -3, -4, -5, -6, -7, ...] DELTA [1, 0, 1, 0, 1, 0, 1, 0, ...], where DELTA is the operator defined in A084938. - Philippe Deléham, Feb 20 2005
a(n,m) = a(n-1,m-1) - (2*n-1)*a(n-1,m) with a(n,0) = (-1)^n*(2*n-1)!! and a(n,n) = 1. - Johannes W. Meijer, Jun 08 2009
Exponential Riordan array [1/sqrt(1 + 2*x), 1/2*log(1 + 2*x)] with e.g.f. (1 + 2*x)^((t - 1)/2) = 1 + (t-1)*x + (t-1)*(t-3)*x^2/2! + .... - Peter Bala, Jun 23 2014

A084948 a(n) = Product_{i=0..n-1} (8*i+2).

Original entry on oeis.org

1, 2, 20, 360, 9360, 318240, 13366080, 668304000, 38761632000, 2558267712000, 189311810688000, 15523568476416000, 1397121162877440000, 136917873961989120000, 14513294639970846720000, 1654515588956676526080000, 201850901852714536181760000, 26240617240852889703628800000
Offset: 0

Views

Author

Daniel Dockery (peritus(AT)gmail.com), Jun 13 2003

Keywords

Crossrefs

Programs

  • GAP
    List([0..20], n-> Product([0..n-1], k-> 8*k+2) ); # G. C. Greubel, Aug 18 2019
  • Magma
    [1] cat [(&*[8*k+2: k in [0..n-1]]): n in [1..20]]; // G. C. Greubel, Aug 18 2019
    
  • Maple
    a := n->product(8*i+2,i=0..n-1); [seq(a(j),j=0..30)];
  • Mathematica
    Table[8^n*Pochhammer[1/4, n], {n,0,20}] (* G. C. Greubel, Aug 18 2019 *)
  • PARI
    vector(20, n, n--; prod(k=0, n-1, 8*k+2)) \\ G. C. Greubel, Aug 18 2019
    
  • Sage
    [product(8*k+2 for k in (0..n-1)) for n in (0..20)] # G. C. Greubel, Aug 18 2019
    

Formula

a(n) = A084943(n)/A000142(n)*A000079(n) = 8^n*Pochhammer(1/4, n) = 1/2*Gamma(n+1/4)*sqrt(2)*Gamma(3/4)*8^n/Pi.
a(n) = (-6)^n*Sum_{k=0..n} (4/3)^k*s(n+1,n+1-k), where s(n,k) are the Stirling numbers of the first kind, A048994. - Mircea Merca, May 03 2012
G.f.: 2/G(0), where G(k)= 1 + 1/(1 - 2*x*(8*k+2)/(2*x*(8*k+2) - 1 + 16*x*(k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 30 2013
From Ilya Gutkovskiy, Mar 23 2017: (Start)
E.g.f.: 1/(1 - 8*x)^(1/4).
a(n) ~ sqrt(2*Pi)*8^n*n^n/(exp(n)*n^(1/4)*Gamma(1/4)). (End)
Sum_{n>=0} 1/a(n) = 1 + (e/8^6)^(1/8)*(Gamma(1/4) - Gamma(1/4, 1/8)). - Amiram Eldar, Dec 20 2022

A084949 a(n) = Product_{i=0..n-1} (9*i+2).

Original entry on oeis.org

1, 2, 22, 440, 12760, 484880, 22789360, 1276204160, 82953270400, 6138542009600, 509498986796800, 46873906785305600, 4734264585315865600, 520769104384745216000, 61971523421784680704000, 7932354997988439130112000, 1086732634724416160825344000, 158662964669764759480500224000
Offset: 0

Views

Author

Daniel Dockery (peritus(AT)gmail.com), Jun 13 2003

Keywords

Crossrefs

Programs

  • GAP
    List([0..20], n-> Product([0..n-1], k-> 9*k+2) ); # G. C. Greubel, Aug 19 2019
  • Magma
    [1] cat [(&*[9*k+2: k in [0..n-1]]): n in [1..20]]; // G. C. Greubel, Aug 19 2019
    
  • Maple
    a:= n-> product(9*i+2,i=0..n-1); seq(a(j),j=0..20);
  • Mathematica
    Table[9^n*Pochhammer[2/9, n], {n,0,20}] (* G. C. Greubel, Aug 19 2019 *)
  • PARI
    vector(20, n, n--; prod(k=0, n-1, 9*k+2)) \\ G. C. Greubel, Aug 19 2019
    
  • Sage
    [product(9*k+2 for k in (0..n-1)) for n in (0..20)] # G. C. Greubel, Aug 19 2019
    

Formula

a(n) = A084944(n)/A000142(n)*A000079(n) = 9^n*Pochhammer(2/9, n) = 9^n*Gamma(n+2/9)/Gamma(2/9).
a(n) = (-7)^n*Sum_{k=0..n} (9/7)^k*s(n+1,n+1-k), where s(n,k) are the Stirling numbers of the first kind, A048994. - Mircea Merca, May 03 2012
E.g.f.: (1-9*x)^(-2/9). - Robert Israel, Mar 22 2017
D-finite with recurrence: a(n) + (-9*n+7)*a(n-1) = 0. - R. J. Mathar, Jan 20 2020
Sum_{n>=0} 1/a(n) = 1 + (e/9^7)^(1/9)*(Gamma(2/9) - Gamma(2/9, 1/9)). - Amiram Eldar, Dec 21 2022
a(n) ~ sqrt(2*Pi) * (9/e)^n * n^(n-5/18) / Gamma(2/9). - Amiram Eldar, Aug 30 2025

A129890 a(n) = (2*n+2)!! - (2*n+1)!!.

Original entry on oeis.org

1, 5, 33, 279, 2895, 35685, 509985, 8294895, 151335135, 3061162125, 68000295825, 1645756410375, 43105900812975, 1214871076343925, 36659590336994625, 1179297174137457375, 40288002704636061375, 1456700757237661060125
Offset: 0

Views

Author

Keywords

Comments

Previous name was: Difference between the double factorial of the n-th nonnegative even number and the double factorial of the n-th nonnegative odd number.
In other words, a(n) = b(2n+2)-b(2n+1), where b = A006882. - N. J. A. Sloane, Dec 14 2011 [Corrected Peter Luschny, Dec 01 2014]
a(n) is the number of linear chord diagrams on 2n+2 vertices with one marked chord such that none of the remaining n chords are contained within the marked chord, see [Young]. - Donovan Young, Aug 11 2020

Examples

			2!! - 1!! =  2 -  1 =  1;
4!! - 3!! =  8 -  3 =  5;
6!! - 5!! = 48 - 15 = 33.
		

Crossrefs

Programs

  • Maple
    seq(doublefactorial(2*n+2)-doublefactorial(2*n+1),n=0..9); # Peter Luschny, Dec 01 2014
  • Mathematica
    a[n_] := (2n+2)!! - (2n+1)!!;
    Table[a[n], {n, 0, 17}] (* Jean-François Alcover, Jul 30 2018 *)

Formula

E.g.f.: 2/((1-2*x)^2)-1/[(1-2*x)*sqrt(1-2*x)]. - Sergei N. Gladkovskii, Dec 04 2011
a(n) = (2*n+1)*a(n-1) + A000165(n). - Philippe Deléham, Oct 28 2013
Conjecture: a(n) = (2*n + 2)*(2*n + 2)! * Sum_{k >= 1} (-1)^(k+1)/Product_{j = 0..n+1} (k + 2*j). - Peter Bala, Jul 06 2025

Extensions

New name from Peter Luschny, Dec 01 2014

A051579 a(n) = (2*n+5)!!/5!!, related to A001147 (odd double factorials).

Original entry on oeis.org

1, 7, 63, 693, 9009, 135135, 2297295, 43648605, 916620705, 21082276215, 527056905375, 14230536445125, 412685556908625, 12793252264167375, 422177324717523375, 14776206365113318125, 546719635509192770625
Offset: 0

Views

Author

Keywords

Comments

Row m=5 of the array A(3; m,n) := (2*n+m)!!/m!!, m >= 0, n >= 0.

Crossrefs

Cf. A000165, A001147(n+1), A002866(n+1), A051577, A051578 (rows m=0..4).

Programs

  • GAP
    List([0..20], n-> Product([0..n-1], j-> 2*j+7) ); # G. C. Greubel, Nov 12 2019
  • Magma
    [1] cat [(&*[2*j+7: j in [0..n-1]]): n in [1..20]]; // G. C. Greubel, Nov 12 2019
    
  • Maple
    df:=doublefactorial; seq(df(2*n+5)/df(5), n = 0..20); # G. C. Greubel, Nov 12 2019
  • Mathematica
    Table[2^n*Pochhammer[7/2, n], {n,0,20}] (* G. C. Greubel, Nov 12 2019 *)
  • PARI
    vector(20, n, prod(j=1,n-1, 2*j+5) ) \\ G. C. Greubel, Nov 12 2019
    
  • Sage
    [product( (2*j+7) for j in (0..n-1)) for n in (0..20)] # G. C. Greubel, Nov 12 2019
    

Formula

a(n) = (2*n+5)!!/4!!.
E.g.f.: 1/(1-2*x)^(7/2).
a(n) ~ 8/15*sqrt(2)*n^3*2^n*e^-n*n^n*(1 + 107/24*n^-1 + ...). - Joe Keane (jgk(AT)jgk.org), Nov 23 2001
G.f.: G(0)/(10*x) -1/(5*x), where G(k)= 1 + 1/(1 - x*(2*k+5)/(x*(2*k+5) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 13 2013
From Peter Bala, May 26 2017: (Start)
a(n+1) = (2*n + 7)*a(n) with a(0) = 1.
O.g.f. satisfies the Riccati differential equation 2*x^2*A(x)' = (1 - 7*x)*A(x) - 1 with A(0) = 1.
G.f. as an S-fraction: A(x) = 1/(1 - 7*x/(1 - 2*x/(1 - 9*x/(1 - 4*x/(1 - 11*x/(1 - 6*x/(1 - ... - (2*n + 5)*x/(1 - 2*n*x/(1 - ...))))))))) (by Stokes 1982).
Reciprocal as an S-fraction: 1/A(x) = 1/(1 + 7*x/(1 - 9*x/(1 - 2*x/(1 - 11*x/(1 - 4*x/(1 - 13*x/(1 - 6*x/(1 - ... - (2*n + 7)*x/(1 - 2*n*x/(1 - ...)))))))))). (End)
From Amiram Eldar, Dec 11 2022: (Start)
Sum_{n>=0} 1/a(n) = 15 * sqrt(e*Pi/2) * erf(1/sqrt(2)) - 20, where erf is the error function.
Sum_{n>=0} (-1)^n/a(n) = 15 * sqrt(Pi/(2*e)) * erfi(1/sqrt(2)) - 10, where erfi is the imaginary error function. (End)

A132062 Sheffer triangle (1,1-sqrt(1-2*x)). Extended Bessel triangle A001497.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 3, 3, 1, 0, 15, 15, 6, 1, 0, 105, 105, 45, 10, 1, 0, 945, 945, 420, 105, 15, 1, 0, 10395, 10395, 4725, 1260, 210, 21, 1, 0, 135135, 135135, 62370, 17325, 3150, 378, 28, 1, 0, 2027025, 2027025, 945945, 270270, 51975, 6930, 630, 36, 1, 0
Offset: 0

Views

Author

Wolfdieter Lang Sep 14 2007

Keywords

Comments

This is a Jabotinsky type exponential convolution triangle related to A001147 (double factorials). For Jabotinsky type triangles See the D. E. Knuth reference given under A039692.
The subtriangle (n>=m>=1) is A001497(n,m) (Bessel).
For the combinatorial interpretation in terms of unordered forests of increasing plane trees see the W. Lang comment and example under A001497.
This is a special type of Sheffer triangle. See the S. Roman reference given under A048854 (the notation here differs).
This triangle (or the A001497 subtriangle) appears as generalized Stirling numbers of the second kind, S2p(-1,n,m):=S2(-k;m,m)*(-1)^(n-m) for k=1, eqs. (27)-(29) of the W. Lang reference.
Also the Bell transform of the double factorial of odd numbers A001147. For the Bell transform of the double factorial of even numbers A000165 see A039683. For the definition of the Bell transform see A264428. - Peter Luschny, Dec 20 2015

Examples

			[1]
[0,      1]
[0,      1,      1]
[0,      3,      3,     1]
[0,     15,     15,     6,     1]
[0,    105,    105,    45,    10,    1]
[0,    945,    945,   420,   105,   15,   1]
[0,  10395,  10395,  4725,  1260,  210,  21,  1]
[0, 135135, 135135, 62370, 17325, 3150, 378, 28, 1]
		

References

  • Toufik Mansour, Matthias Schork and Mark Shattuck, On the Stirling numbers associated with the meromorphic Weyl algebra, Applied Mathematics Letters, Volume 25, Issue 11, November 2012, Pages 1767-1771. - From N. J. A. Sloane, Sep 15 2012
  • Steven Roman, The Umbral Calculus, Pure and Applied Mathematics, 111, Academic Press, 1984. (p. 78) [Emanuele Munarini, Oct 10 2017]

Crossrefs

Columns m=1: A001147.
Row sums give [1, A001515]. Alternating row sums give [1, -A000806].
Cf. A122850. - R. J. Mathar, Mar 20 2009

Programs

  • Maple
    # The function BellMatrix is defined in A264428.
    BellMatrix(n -> doublefactorial(2*n-1), 9); # Peter Luschny, Jan 27 2016
    # Alternative:
    egf := exp(y*(1 - sqrt(1 - 2*x))): serx := series(egf, x, 12):
    coefx := n -> n!*coeff(serx, x, n): row := n -> seq(coeff(coefx(n), y, k), k = 0..n): for n from 0 to 8 do row(n) od;  # Peter Luschny, Apr 25 2024
  • Mathematica
    Table[If[k <= n, Binomial[2n-2k,n-k] Binomial[2n-k-1,k-1] (n-k)!/2^(n-k), 0], {n, 0, 6}, {k, 0, n}] // Flatten (* Emanuele Munarini, Oct 10 2017 *)
    BellMatrix[f_Function, len_] := With[{t = Array[f, len, 0]}, Table[BellY[n, k, t], {n, 0, len - 1}, {k, 0, len - 1}]];
    rows = 10;
    M = BellMatrix[(2#-1)!!&, rows];
    Table[M[[n, k]], {n, 1, rows}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jun 23 2018, after Peter Luschny *)
  • Sage
    # uses[bell_transform from A264428]
    def A132062_row(n):
        a = sloane.A001147
        dblfact = a.list(n)
        return bell_transform(n, dblfact)
    [A132062_row(n) for n in (0..9)] # Peter Luschny, Dec 20 2015

Formula

a(n,m)=0 if n
E.g.f. m-th column ((x*f2p(1;x))^m)/m!, m>=0. with f2p(1;x):=1-sqrt(1-2*x)= x*c(x/2) with the o.g.f.of A000108 (Catalan).
From Emanuele Munarini, Oct 10 2017: (Start)
a(n,k) = binomial(2*n-2*k,n-k)*binomial(2*n-k-1,k-1)*(n-k)!/2^(n-k).
The row polynomials p_n(x) (studied by Carlitz) satisfy the recurrence: p_{n+2}(x) - (2*n+1)*p_{n+1}(x) - x^2*p_n(x) = 0. (End)
T(n, k) = n! [y^k] [x^n] exp(y*(1 - sqrt(1 - 2*x))). - Peter Luschny, Apr 25 2024

A185896 Triangle of coefficients of (1/sec^2(x))*D^n(sec^2(x)) in powers of t = tan(x), where D = d/dx.

Original entry on oeis.org

1, 0, 2, 2, 0, 6, 0, 16, 0, 24, 16, 0, 120, 0, 120, 0, 272, 0, 960, 0, 720, 272, 0, 3696, 0, 8400, 0, 5040, 0, 7936, 0, 48384, 0, 80640, 0, 40320, 7936, 0, 168960, 0, 645120, 0, 846720, 0, 362880, 0, 353792, 0, 3256320, 0, 8951040, 0, 9676800, 0, 3628800
Offset: 0

Author

Peter Bala, Feb 07 2011

Keywords

Comments

DEFINITION
Define polynomials R(n,t) with t = tan(x) by
... (d/dx)^n sec^2(x) = R(n,tan(x))*sec^2(x).
The first few are
... R(0,t) = 1
... R(1,t) = 2*t
... R(2,t) = 2 + 6*t^2
... R(3,t) = 16*t + 24*t^3.
This triangle shows the coefficients of R(n,t) in ascending powers of t called the tangent number triangle in [Hodges and Sukumar].
The polynomials R(n,t) form a companion polynomial sequence to Hoffman's two polynomial sequences - P(n,t) (A155100), the derivative polynomials of the tangent and Q(n,t) (A104035), the derivative polynomials of the secant. See also A008293 and A008294.
COMBINATORIAL INTERPRETATION
A combinatorial interpretation for the polynomial R(n,t) as the generating function for a sign change statistic on certain types of signed permutation can be found in [Verges].
A signed permutation is a sequence (x_1,x_2,...,x_n) of integers such that {|x_1|,|x_2|,...|x_n|} = {1,2...,n}. They form a group, the hyperoctahedral group of order 2^n*n! = A000165(n), isomorphic to the group of symmetries of the n dimensional cube.
Let x_1,...,x_n be a signed permutation.
Then 0,x_1,...,x_n,0 is a snake of type S(n;0,0) when 0 < x_1 > x_2 < ... 0.
For example, 0 4 -3 -1 -2 0 is a snake of type S(4;0,0).
Let sc be the number of sign changes through a snake
... sc = #{i, 1 <= i <= n-1, x_i*x_(i+1) < 0}.
For example, the snake 0 4 -3 -1 -2 0 has sc = 1. The polynomial R(n,t) is the generating function for the sign change statistic on snakes of type S(n+1;0,0):
... R(n,t) = sum {snakes in S(n+1;0,0)} t^sc.
See the example section below for the cases n=1 and n=2.
PRODUCTION MATRIX
Define three arrays R, L, and S as
... R = superdiag[2,3,4,...]
... L = subdiag[1,2,3,...]
... S = diag[2,4,6,...]
with the indicated sequences on the main superdiagonal, the main subdiagonal and main diagonal, respectively, and 0's elsewhere. The array R+L is the production array for this triangle: the first row of (R+L)^n produces the n-th row of the triangle.
On the vector space of complex polynomials the array R, the raising operator, represents the operator p(x) - > d/dx (x^2*p(x)), and the array L, the lowering operator, represents the differential operator d/dx - see Formula (4) below.
The three arrays satisfy the commutation relations
... [R,L] = S, [R,S] = 2*R, [L,S] = -2*L
and hence give a representation of the Lie algebra sl(2).

Examples

			Table begins
  n\k|.....0.....1.....2.....3.....4.....5.....6
  ==============================================
  0..|.....1
  1..|.....0.....2
  2..|.....2.....0.....6
  3..|.....0....16.....0....24
  4..|....16.....0...120.....0...120
  5..|.....0...272.....0...960.....0...720
  6..|...272.....0..3696.....0..8400.....0..5040
Examples of recurrence relation
  T(4,2) = 3*(T(3,1) + T(3,3)) = 3*(16 + 24) = 120;
  T(6,4) = 5*(T(5,3) + T(5,5)) = 5*(960 + 720) = 8400.
Example of integral formula (6)
... Integral_{t = -1..1} (1-t^2)*(16-120*t^2+120*t^4)*(272-3696*t^2+8400*t^4-5040*t^6) dt = 2830336/1365 = -2^13*Bernoulli(12).
Examples of sign change statistic sc on snakes of type (0,0)
= = = = = = = = = = = = = = = = = = = = = =
.....Snakes....# sign changes sc.......t^sc
= = = = = = = = = = = = = = = = = = = = = =
n=1
...0 1 -2 0...........1................t
...0 2 -1 0...........1................t
yields R(1,t) = 2*t;
n=2
...0 1 -2 3 0.........2................t^2
...0 1 -3 2 0.........2................t^2
...0 2 1 3 0..........0................1
...0 2 -1 3 0.........2................t^2
...0 2 -3 1 0.........2................t^2
...0 3 1 2 0..........0................1
...0 3 -1 2 0.........2................t^2
...0 3 -2 1 0.........2................t^2
yields
R(2,t) = 2 + 6*t^2.
		

Crossrefs

Programs

  • Maple
    R = proc(n) option remember;
    if n=0 then RETURN(1);
    else RETURN(expand(diff((u^2+1)*R(n-1), u))); fi;
    end proc;
    for n from 0 to 12 do
    t1 := series(R(n), u, 20);
    lprint(seriestolist(t1));
    od:
  • Mathematica
    Table[(-1)^(n + 1)*(-1)^((n - k)/2)*Sum[j!*StirlingS2[n + 1, j]*2^(n + 1 - j)*(-1)^(n + j - k)*Binomial[j - 1, k], {j, k + 1, n + 1}], {n, 0, 10}, {k, 0, n}] // Flatten (* G. C. Greubel, Jul 22 2017 *)
  • PARI
    {T(n, k) = if( n<0 || k<0 || k>n, 0, if(n==k, n!, (k+1)*(T(n-1, k-1) + T(n-1, k+1))))};
    
  • PARI
    {T(n, k) = my(A); if( n<0 || k>n, 0, A=1; for(i=1, n, A = ((1 + x^2) * A)'); polcoeff(A, k))}; /* Michael Somos, Jun 24 2017 */

Formula

GENERATING FUNCTION
E.g.f.:
(1)... F(t,z) = 1/(cos(z)-t*sin(z))^2 = Sum_{n>=0} R(n,t)*z^n/n! = 1 + (2*t)*z + (2+6*t^2)*z^2/2! + (16*t+24*t^3)*z^3/3! + ....
The e.g.f. equals the square of the e.g.f. of A104035.
Continued fraction representation for the o.g.f:
(2)... F(t,z) = 1/(1-2*t*z - 2*(1+t^2)*z^2/(1-4*t*z -...- n*(n+1)*(1+t^2)*z^2/(1-2*n*(n+1)*t*z -....
RECURRENCE RELATION
(3)... T(n,k) = (k+1)*(T(n-1,k-1) + T(n-1,k+1)).
ROW POLYNOMIALS
The polynomials R(n,t) satisfy the recurrence relation
(4)... R(n+1,t) = d/dt{(1+t^2)*R(n,t)} with R(0,t) = 1.
Let D be the derivative operator d/dt and U = t, the shift operator.
(5)... R(n,t) = (D + DUU)^n 1
RELATION WITH OTHER SEQUENCES
A) Derivative Polynomials A155100
The polynomials (1+t^2)*R(n,t) are the polynomials P_(n+2)(t) of A155100.
B) Bernoulli Numbers A000367 and A002445
Put S(n,t) = R(n,i*t), where i = sqrt(-1). We have the definite integral evaluation
(6)... Integral_{t = -1..1} (1-t^2)*S(m,t)*S(n,t) dt = (-1)^((m-n)/2)*2^(m+n+3)*Bernoulli(m+n+2).
The case m = n is equivalent to the result of [Grosset and Veselov]. The methods used there extend to the general case.
C) Zigzag Numbers A000111
(7)... R_n(1) = A000828(n+1) = 2^n*A000111(n+1).
D) Eulerian Numbers A008292
The polynomials R(n,t) are related to the Eulerian polynomials A(n,t) via
(8)... R(n,t) = (t+i)^n*A(n+1,(t-i)/(t+i))
with the inverse identity
(9)... A(n+1,t) = (-i/2)^n*(1-t)^n*R(n,i*(1+t)/(1-t)),
where {A(n,t)}n>=1 = [1,1+t,1+4*t+t^2,1+11*t+11*t^2+t^3,...] is the sequence of Eulerian polynomials and i = sqrt(-1).
E) Ordered set partitions A019538
(10)... R(n,t) = (-2*i)^n*T(n+1,x)/x,
where x = i/2*t - 1/2 and T(n,x) is the n-th row po1ynomial of A019538;
F) Miscellaneous
Column 1 is the sequence of tangent numbers - see A000182.
A000670(n+1) = (-i/2)^n*R(n,3*i).
A004123(n+2) = 2*(-i/2)^n*R(n,5*i).
A080795(n+1) =(-1)^n*(sqrt(-2))^n*R(n,sqrt(-2)). - Peter Bala, Aug 26 2011
From Leonid Bedratyuk, Aug 12 2012: (Start)
T(n,k) = (-1)^(n+1)*(-1)^((n-k)/2)*Sum_{j=k+1..n+1} j! *stirling2(n+1,j) *2^(n+1-j) *(-1)^(n+j-k) *binomial(j-1,k), see A059419.
Sum_{j=i+1..n+1}((1-(-1)^(j-i))/(2*(j-i))*(-1)^((n-j)/2)*T(n,j))=(n+1)*(-1)^((n-1-i)/2)*T(n-1,i), for n>1 and 0
G.f.: 1/G(0,t,x), where G(k,t,x) = 1 - 2*t*x - 2*k*t*x - (1+t^2)*(k+2)*(k+1)*x^2/G(k+1,t,x); (continued fraction due to T. J. Stieltjes). - Sergei N. Gladkovskii, Dec 27 2013

A217626 First differences of A215940, or first differences of permutations of (0,1,2,...,m-1) reading them as decimal numbers, divided by 9 (with 10>=m, and m! > n).

Original entry on oeis.org

1, 9, 2, 9, 1, 78, 1, 19, 3, 8, 2, 77, 2, 8, 3, 19, 1, 78, 1, 9, 2, 9, 1, 657, 1, 9, 2, 9, 1, 178, 1, 29, 4, 7, 3, 66, 2, 18, 4, 18, 2, 67, 1, 19, 3, 8, 2, 646, 1, 19, 3, 8, 2, 67, 1, 29, 4, 7, 3, 176, 3, 7, 4, 29, 1, 67, 2, 8, 3, 19, 1, 646, 2, 8, 3, 19, 1
Offset: 1

Author

R. J. Cano, Oct 04 2012

Keywords

Comments

Terms do not depend on the choice of m, provided that m!>n (the index of the considered term), and the numbers associated to a permutation s of {0,...,m-1} are N(s) = Sum_{i=1..m} s(i)*10^(m-i). This defines the present sequence for any arbitrarily large index, not limited to n <= 10!, for example.
Similar sequences might be built in another base b, they would always start (1, b-1, 2, b-1, 1, ...). The partial sums of this kind of sequence would yield the analog of A215940 in the corresponding base.
There are at least two palindromic patterns which are repeated throughout this sequence: one of them is "1,b-1,2,b-1,1" (It is optional here whether or not to include the 1's), another is built from the first 4!-1 terms (See the corresponding link for details).
Also, for 1<=n<=(9!)-1: The repeating parts in the first differences of A030299 divided by nine, i.e. a(n) = A219664(n)/9. - Antti Karttunen, Dec 18 2012. Edited by: R. J. Cano, May 09 2017
There are more palindromic patterns than those mentioned above: Similar to the first 3!-1 and the first 4!-1 terms, the first k!-1 terms are repeated for all other k>4. Frequent are also multiples of these, e.g., k*[1,9,2,9,1] = [2,18,4,18,2], [3,27,6,27,3], ...), [1, 19, 3, 8, 2, 67, 1, 29, 4, 7, 3, 176, 3, 7, 4, 29, 1, 67, 2, 8, 3, 19, 1], and others. The "middle part" of roughly half the length (e.g., [9,2,9] or [67,...,67] in the last example), is repeated even more frequently. - M. F. Hasler, Jan 14 2013
From R. J. Cano, Apr 04 2016: (Start)
Conjecture 1: Given 1A217626 and so on).
Lemma: Let P be an arbitrary set consisting of m integers; let x[i] be an element in P (with 1<=i<=m); let y[j] = x[j+1] - x[j] (with 1 <= j <= m-1) be the 1st differences of P. These differences are symmetric if y[j]=y[m-j] which for P implies the condition x[j]+x[m-j+1]=x[j+1]+x[m-j];
Consequence: When m=n! and P is a set with all the permutations for the letters 0..n-1, the preceding lemma implies P has associated at least a set Q such that 1st differences in Q are symmetric.
Generating algorithm: Such Q can be built based upon P and the condition given by the preceding lemma if it is removed from P (until P becomes empty) its 1st element tau, inserting them both in Q tau and its arithmetic complement to repdigit (n-1)*111...1 (n times 1) removing the mentioned complement from P.
Conjecture 2: The autosimilarity shown by a(n) is a consequence of the fact that the corresponding P is the set of the n! permutations in increasing sequence for the letters 0..n-1, and Q=P (it holds if they are replaced "a(n)" and "increasing" respectively with "-1*a(n)" and "decreasing").
Note: "Q=P" is a necessary but not sufficient condition for observing the autosimilarity in a(n).
Application: The "generating algorithm" described previously might be potentially useful for parallel computing. In combination with the partition scheme proposed at links in A237265, and multiple indirection. For example notice that in such sense an algorithm for generating k! permutations with an increasing sequence would require only k!/2 iterations because the other half would be already determined by symmetry.
Conjecture 3: For n>2, given P the set of permutations in increasing sequence for the letters 0..n-1, there are distributed with a symmetric pattern among its (n!)! permutations all those A000165(n!\2) of them such that their 1st differences are symmetric. Moreover by setting to zero the other elements whose 1st differences are not symmetric, we obtain an antisymmetric sequence.
(End)
Conjecture 4: If 2<=mR. J. Cano, Apr 19 2017
Consider the first y!-1 terms for even y; The central term a(y!/2) is determined by the difference between the (y/2+1)th row from the y-th matrix defining the irregular table in A237265 and the consecutive permutation preceding it in lexicographic order (See EXAMPLE). - R. J. Cano, May 09 2017

Examples

			a(1)= A215940(2) - A215940(1) = 1 - 0 = 1.
a(2)= A215940(3) - A215940(2) = 10-01 = 9.
a(3)= A215940(4) - A215940(3) = 12-10 = 2.
a(4)= A215940(5) - A215940(4) = 21-12 = 9.
a(5)= A215940(6) - A215940(5) = 22-21 = 1.
From _R. J. Cano_, May 09 2017: (Start)
On the central terms for subsequences consisting of the first y!-1 terms with even y: Let us pick y=4; The first y!-1=23 terms are: (1,9,2,9,1,78,1,19,3,8,2,77,2,8,3,19,1,78,1,9,2,9,1) the central term there is a(12)=77.
If we look into A237265, the 4th matrix defining it contains as its (4/2+1)th or third row, the permutation 3124 which in lexicographic order is preceded by 2431, therefore by subtracting and dividing by 9 we obtain: (3124-2431)/9 = 693/9 = (2013-1320)/9 = 77 = a(12). (End)
		

Crossrefs

Cf. A219995 [ On the summation of 1/a(n) ].

Programs

  • C
    // See LINKS.
    
  • Maple
    A217626:=n->A215940(n+1)-A215940(n);
  • Mathematica
    maxm = 5; Table[dd = FromDigits /@ Permutations[Range[m]]; (Drop[dd, If[m == 1, 0, (m - 1)!]] - First[dd])/9, {m, 1, maxm}] // Flatten // Differences (* Jean-François Alcover, Apr 25 2013 *)
  • PARI
    first_terms(n)={n=max(3,n);my(m:small=n!);my(a:vec=vector(m-1),i:small=0,x:vec=numtoperm(n,0),y:vec,z:vec,u:small,B:small=11);m\=2;m--;while(i++<=m,u=!(i%6);y=numtoperm(n,i);z=(y-x)[1..n-1];if(u,z=vector(#z,j,vecsum(z[1..j])));a[i]=fromdigits(z,B-u);a[#a-i+1]=a[i];x=y;);z=(numtoperm(n,m+1)-y)[1..n-1];a[m+1]=fromdigits(vector(#z,j,vecsum(z[1..j])),B--);return(a)} \\ Computes the first either 5 or n!-1 terms. - R. J. Cano, May 28 2017
  • Scheme
    (define (A217626 n) (/ (A219664 n) 9)) ;; - Antti Karttunen, Dec 18 2012
    

Formula

a(n) = A215940(n+1) - A215940(n).
a(n) = A219664(n)/9, for n=1..362879. - Antti Karttunen, Dec 18 2012
a(n) = A209280(n)/9, for n < 9!. - M. F. Hasler, Jan 12 2013

Extensions

Definition simplified by M. F. Hasler, Jan 12 2013

A334380 Decimal expansion of Sum_{k>=0} (-1)^k/((2*k)!!)^2.

Original entry on oeis.org

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

Author

Ilya Gutkovskiy, Apr 25 2020

Keywords

Comments

This constant is transcendental.

Examples

			1/(4^0*0!^2) - 1/(4^1*1!^2) + 1/(4^2*2!^2) - 1/(4^3*3!^2) + ... = 0.765197686557966551449717526...
		

Crossrefs

Bessel function values: this sequence (J(0,1)), A334383 (J(0,sqrt(2))), A091681 (J(0,2)), A197036 (I(0,1)), A334381 (I(0,sqrt(2))), A070910 (I(0,2)).

Programs

  • Mathematica
    RealDigits[BesselJ[0, 1], 10, 110] [[1]]
  • PARI
    besselj(0, 1) \\ Michel Marcus, Apr 26 2020

Formula

Equals BesselJ(0,1).
Equals BesselI(0,i), where BesselI is the modified Bessel function of order 0. - Jianing Song, Sep 18 2021
Previous Showing 61-70 of 231 results. Next