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-6 of 6 results.

A000680 a(n) = (2n)!/2^n.

Original entry on oeis.org

1, 1, 6, 90, 2520, 113400, 7484400, 681080400, 81729648000, 12504636144000, 2375880867360000, 548828480360160000, 151476660579404160000, 49229914688306352000000, 18608907752179801056000000, 8094874872198213459360000000, 4015057936610313875842560000000
Offset: 0

Views

Author

Keywords

Comments

Denominators in the expansion of cos(sqrt(2)*x) = 1 - (sqrt(2)*x)^2/2! + (sqrt(2)*x)^4/4! - (sqrt(2)*x)^6/6! + ... = 1 - x^2 + x^4/6 - x^6/90 + ... By Stirling's formula in A000142: a(n) ~ 2^(n+1) * (n/e)^(2n) * sqrt(Pi*n) - Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 20 2001
a(n) is also the constant term in the product: Product_{1<=i, j<=n, i!=j} (1 - x_i/x_j)^2. - Sharon Sela (sharonsela(AT)hotmail.com), Feb 12 2002
a(n) is also the number of lattice paths in the n-dimensional lattice [0..2]^n. - T. D. Noe, Jun 06 2002
Representation as the n-th moment of a positive function on the positive half-axis: a(n) = Integral_{x>=0} (x^n*exp(-sqrt(2*x))/sqrt(2*x)), n=0,1,... - Karol A. Penson, Mar 10 2003
Number of permutations of [2n] with no increasing runs of odd length. Example: a(2) = 6 because we have 1234, 13/24, 14/23, 23/14, 24/13 and 34/12 (runs separated by slashes). - Emeric Deutsch, Aug 29 2004
This is also the number of ways of arranging the elements of n distinct pairs, assuming the order of elements is significant and the pairs are distinguishable. When the pairs are not distinguishable, see A001147 and A132101. For example, there are 6 ways of arranging 2 pairs [1,1], [2,2]: {[1122], [1212], [1221], [2211], [2121], [2112]}. - Ross Drewe, Mar 16 2008
n married couples are seated in a row so that every wife is to the left of her husband. The recurrence a(n+1) = a(n)*((2*n + 1) + binomial(2*n+1, 2)) conditions on whether the (n+1)st couple is seated together or separated by at least one other person. - Geoffrey Critzer, Jun 10 2009
a(n) is the number of functions f:[2n]->[n] such that the preimage of {y} has cardinality 2 for every y in [n]. Note that [k] denotes the set {1,2,...,k} and [0] denotes the empty set. - Dennis P. Walsh, Nov 17 2009
a(n) is also the number of n X 2n (0,1)-matrices with row sum 2 and column sum 1. - Shanzhen Gao, Feb 12 2010
Number of ways that 2n people of different heights can be arranged (for a photograph) in two rows of equal length so that every person in the front row is shorter than the person immediately behind them in the back row.
a(n) is the number of functions f:[n]->[n^2] such that, if floor((f(x))^.5) = floor((f(y))^.5), then x = y. For example, with n = 4, the range of f consists of one element from each of the four sets {1,2,3}, {4,5,6,7,8}, {9,10,11,12,13,14,15}, and {16}. Hence there are 1*3*5*7 = 105 ways to choose the range for f, and there are 4! ways to injectively map {1,2,3,4} to the four elements of the range. Thus there are 105*24 = 2520 such functions. Note also that a(n) = n!*(product of the first n odd numbers). - Dennis P. Walsh, Nov 28 2012
a(n) is also the 2*n th difference of n-powers of A000217 (triangular numbers). For example a(2) is the 4th difference of the squares of triangular numbers. - Enric Reverter i Bigas, Jun 24 2013
a(n) is the multinomial coefficient (2*n) over (2, 2, 2, ..., 2) where there are n 2's in the last parenthesis. It is therefore also the number of words of length 2n obtained with n letters, each letter appearing twice. - Robert FERREOL, Jan 14 2018
Number of ways to put socks and shoes on an n-legged animal, if a sock must be put on before a shoe. - Daniel Bishop, Jan 29 2018

Examples

			For n = 2, a(2) = 6 since there are 6 functions f:[4]->[2] with size 2 preimages for both {1} and {2}. In this case, there are binomial(4, 2) = 6 ways to choose the 2 elements of [4] f maps to {1} and the 2 elements of [4] that f maps to {2}. - _Dennis P. Walsh_, Nov 17 2009
		

References

  • G. E. Andrews, R. Askey and R. Roy, Special Functions, Cambridge University Press, 1998.
  • 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. 283.
  • A. Fletcher, J. C. P. Miller, L. Rosenhead and L. J. Comrie, An Index of Mathematical Tables. Vols. 1 and 2, 2nd ed., Blackwell, Oxford and Addison-Wesley, Reading, MA, 1962, Vol. 1, p. 112.
  • Shanzhen Gao and Kenneth Matheis, Closed formulas and integer sequences arising from the enumeration of (0,1)-matrices with row sum two and some constant column sums. In Proceedings of the Forty-First Southeastern International Conference on Combinatorics, Graph Theory and Computing. Congr. Numer. 202 (2010), 45-53.
  • 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).
  • C. B. Tompkins, Methods of successive restrictions in computational problems involving discrete variables. 1963, Proc. Sympos. Appl. Math., Vol. XV pp. 95-106; Amer. Math. Soc., Providence, R.I.

Crossrefs

A diagonal of the triangle in A241171.
Main diagonal of A267479, row sums of A267480.
Row n=2 of A089759.
Column n=2 of A187783.
Even bisection of column k=0 of A097591.

Programs

  • Maple
    A000680 := n->(2*n)!/(2^n);
    a[0]:=1:a[1]:=1:for n from 2 to 50 do a[n]:=a[n-1]*(2*n-1)*n od: seq(a[n], n=0..16); # Zerinvary Lajos, Mar 08 2008
    seq(product(binomial(2*n-2*k,2),k=0..n-1),n=0..16); # Dennis P. Walsh, Nov 17 2009
  • Mathematica
    Table[Product[Binomial[2 i, 2], {i, 1, n}], {n, 0, 16}]
    polygorial[k_, n_] := FullSimplify[ n!/2^n (k -2)^n*Pochhammer[2/(k -2), n]]; Array[ polygorial[6, #] &, 17, 0] (* Robert G. Wilson v, Dec 26 2016 *)
    Table[(2n)!/2^n,{n,0,20}] (* Harvey P. Dale, Sep 21 2020 *)
  • PARI
    a(n) = (2*n)! / 2^n

Formula

E.g.f.: 1/(1 - x^2/2) (with interpolating zeros). - Paul Barry, May 26 2003
a(n) = polygorial(n, 6) = (A000142(n)/A000079(n))*A001813(n) = (n!/2^n)*Product_{i=0..n-1} (4*i + 2) = (n!/2^n)*4^n*Pochhammer(1/2, n) = gamma(2*n+1)/2^n. - Daniel Dockery (peritus(AT)gmail.com), Jun 13 2003
a(n) = A087127(n,2*n) = Sum_{i=0..2*n} (-1)^(2*n-i)*binomial(2*n, i)*binomial(i+2, 2)^n. Let T(n,k,j) = ((n - k + j)*(2*n - 2*k + 1))^n*binomial(2*n, 2*k-j+1) then a(n) = Sum{k=0..n} (T(n,k,1) - T(n,k,0)). For example a(12) = A087127(12,24) = Sum_{k=0..12} (T(12,k,1) - T(12,k,0)) = 24!/2^12. - André F. Labossière, Mar 29 2004 [Corrected by Jianing Song, Jan 08 2019]
For even n, a(n) = binomial(2n, n)*(a(n/2))^2. For odd n, a(n) = binomial(2n, n+1)*a((n+1)/2)*a((n-1)/2). For positive n, a(n) = binomial(2n, 2)*a(n-1) with a(0) = 1. - Dennis P. Walsh, Nov 17 2009
a(n) = Product_{i=1..n} binomial(2i, 2).
a(n) = a(n-1)*binomial(2n, 2).
From Peter Bala, Feb 21 2011: (Start)
a(n) = Product_{k = 0..n-1} (T(n) - T(k)), where T(n) = n*(n + 1)/2 is the n-th triangular number.
Compare with n! = Product_{k = 0..n-1} (n - k).
Thus we may view a(n) as a generalized factorial function associated with the triangular numbers A000217. Cf. A010050. The corresponding generalized binomial coefficients a(n)/(a(k)*a(n-k)) are triangle A086645. Also cf. A186432.
a(n) = n*(n + n-1)*(n + n-1 + n-2)*...*(n + n-1 + n-2 + ... + 1).
For example, a(5) = 5*(5+4)*(5+4+3)*(5+4+3+2)*(5+4+3+2+1) = 113400. (End).
G.f.: 1/U(0) where U(k)= x*(2*k - 1)*k + 1 - x*(2*k + 1)*(k + 1)/U(k+1); (continued fraction, Euler's 1st kind, 1-step). - Sergei N. Gladkovskii, Oct 28 2012
a(n) = n!*(product of the first n odd integers). - Dennis P. Walsh, Nov 28 2012
a(0) = 1, a(n) = a(n-1)*T(2*n-1), where T(n) is the n-th triangular number. For example: a(4) = a(3)*T(7) = 90*28 = 2520. - Enric Reverter i Bigas, Jun 24 2013
E.g.f.: 1/(1 - x/(1 - 2*x/(1 - 3*x/(1 - 4*x/(1 - 5*x/(1 - ...)))))), a continued fraction. - Ilya Gutkovskiy, May 10 2017
From Amiram Eldar, Jun 25 2020: (Start)
Sum_{n>=0} 1/a(n) = cosh(sqrt(2)).
Sum_{n>=0} (-1)^n/a(n) = cos(sqrt(2)). (End)
D-finite with recurrence a(n) -n*(2*n-1)*a(n-1)=0. - R. J. Mathar, Jan 28 2022
a(n) = n *A007019(n-1), n>0. - R. J. Mathar, Jan 28 2022

A097592 Triangle read by rows: T(n,k) is the number of permutations of [n] with exactly k increasing runs of even length.

Original entry on oeis.org

1, 1, 1, 1, 2, 4, 7, 12, 5, 25, 52, 43, 102, 299, 258, 61, 531, 1750, 1853, 906, 3141, 11195, 15634, 8965, 1385, 20218, 83074, 133697, 94398, 31493, 146215, 675304, 1207256, 1088575, 460929, 50521, 1174889, 5880354, 11974457, 12625694, 6632158
Offset: 0

Views

Author

Emeric Deutsch, Aug 29 2004

Keywords

Comments

Row n has 1+floor(n/2) entries.

Examples

			Triangle starts:
    1;
    1;
    1,   1;
    2,   4;
    7,  12,   5;
   25,  52,  43;
  102, 299, 258, 61;
Example: T(4,2) = 5 because we have 13/24, 14/23, 23/14, 24/13 and 34/12.
		

Crossrefs

Row sums give A000142.
T(n,floor(n/2)) gives A317139.
T(2n,n) gives A000364.
T(2n+1,n) gives A317140.

Programs

  • Maple
    G:=2*(t-1)*u/(-2*u+(2-t+t*u)*exp((-1+u)*x/2)+(t-2+t*u)*exp(-(1+u)*x/2)): u:=sqrt(5-4*t): Gser:=simplify(series(G,x=0,12)): P[0]:=1: for n from 1 to 11 do P[n]:=sort(n!*coeff(Gser,x^n)) od: seq(seq(coeff(t*P[n],t^k),k=1..1+floor(n/2)),n=0..11);
    # second Maple program:
    b:= proc(u, o, t) option remember; `if`(u+o=0, x^t, expand(
          add(b(u+j-1, o-j, irem(t+1, 2)), j=1..o)+
          add(b(u-j, o+j-1, 0)*x^t, j=1..u)))
        end:
    T:= n->(p->seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0$2)):
    seq(T(n), n=0..12);  # Alois P. Heinz, Nov 19 2013
  • Mathematica
    b[u_, o_, t_] := b[u, o, t] = If[u+o == 0, x^t, Expand[Sum[b[u+j-1, o-j, Mod[t+1, 2]], {j, 1, o}] + Sum[b[u-j, o+j-1, 0]*x^t, {j, 1, u}]]]; T[n_] := Function[ {p}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, 0, 0]]; Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Apr 29 2015, after Alois P. Heinz *)

Formula

E.g.f.: 2(t-1)u/[ -2u+(2-t+tu)exp((-1+u)x/2)+(t-2+tu)exp(-(1+u)x/2)], where u=sqrt(5-4t).
Sum_{k=1..floor(n/2)} k * T(n,k) = A097593(n). - Alois P. Heinz, Jul 04 2019

A096654 Denominators of self-convergents to 1/(e-2).

Original entry on oeis.org

1, 2, 8, 38, 222, 1522, 11986, 106542, 1054766, 11506538, 137119578, 1772006854, 24681524038, 368577425634, 5874202721042, 99515904921182, 1785757627196766, 33835407673201882, 675016383080377546, 14143200407398386678, 310507536216973671158, 7128173005328786885714
Offset: 0

Views

Author

Clark Kimberling, Jul 01 2004

Keywords

Comments

The self-continued fraction of r>0 is here introduced as the sequence (b(0), b(1), b(2), ...) defined as follows: put r(0)=r, b(0)=[r(0)] and for n>=1, put r(n)=b(n-1)/(r(n-1)-b(n-1)) and b(n)=[r(n)]. This differs from simple continued fraction, for which r(n)=1/(r(n-1)-b(n-1)). Now r=lim(p(n)/q(n)), where p(0)=b(1), q(0)=1, p(1)=b(0)(b(1)+1), q(1)=b(1) and for n>=2, p(n)=b(n)*p(n-1)+b(n-1)*p(n-2), q(n)=b(n)*q(n-1)+b(n-1)*q(n-2); p(0),p(1),... are the numerators of the self-convergents to r; q(0),q(1),... are the denominators of the self-convergents to r. Thus A096654 is given by a(n)=(n+1)*a(n-1)+n*a(n-2), a(0)=1, a(1)=2.
Number of increasing runs of odd length in all permutations of [n+1]. Example: a(2) = 8 because we have (123), 13(2), (3)12, (2)13, 23(1), (3)(2)(1) (the runs of odd length are shown between parentheses). - Emeric Deutsch, Aug 29 2004

Examples

			a(2)=q(2)=3*2+2*1=8, a(3)=q(3)=4*8+3*2=38. The convergents p(0)/q(0) to p(4)/q(4) are 1/1, 3/2, 11/8, 53/38, 309/222.
		

Crossrefs

Programs

  • Maple
    G:=(3-x-2*(1+x)*exp(-x))/(1-x)^3: Gser:=series(G,x=0,22): 1,seq(n!*coeff(Gser,x^n),n=1..21);
  • Mathematica
    With[{g = (3 - x - 2*(1 + x)*Exp[-x])/(1 - x)^3},CoefficientList[Series[g, {x, 0, 21}], x]*Table[k!, {k, 0, 21}]] (* Shenghui Yang, Oct 15 2024 *)
  • PARI
    x='x+O('x^66); Vec(serlaplace((3-x-2*(1+x)*exp(-x))/(1-x)^3)) /* Joerg Arndt, Aug 06 2012 */
  • Python
    prpr = 1
    prev = 2
    for n in range(2, 77):
        print(prpr, end=', ')
        curr = (n+1)*prev + n*prpr
        prpr = prev
        prev = curr
    # Alex Ratushnyak, Aug 05 2012
    

Formula

a(n) = (n+1)*a(n-1) + n*a(n-2), with a(0)=1, a(1)=2. - Alex Ratushnyak, Aug 05 2012
E.g.f.: (3-x-2*(1+x)*exp(-x))/(1-x)^3. - Emeric Deutsch, Aug 29 2004
From Gary Detlefs, Apr 12 2010: (Start)
a(n) = A055596(n+1) + A055596(n+2).
a(n) = (n+1)!+(n+2)! -2*( A000166(n+1) + A000166(n+2)).
a(n) = (n+1)! - 2*floor(((n+1)!+1)/e) + (n+2)!-2*floor(((n+2)!+1)/e). (End)
a(n) = ((n+3)!-2*floor(((n+3)!+1)/e))/(n+2). - Gary Detlefs, Jul 11 2010 [corrected by Gary Detlefs, Oct 26 2020]
a(n) = Sum_{k=1..n+1} A097591(n+1,k). - Alois P. Heinz, Jul 03 2019

Extensions

More terms from Emeric Deutsch, Aug 29 2004

A302910 Determinant of n X n matrix whose main diagonal consists of the first n 6-gonal numbers and all other elements are 1's.

Original entry on oeis.org

1, 5, 70, 1890, 83160, 5405400, 486486000, 57891834000, 8799558768000, 1663116607152000, 382516819644960000, 105192125402364000000, 34082248630365936000000, 12849007733647957872000000, 5576469356403213716448000000, 2760352331419590789641760000000
Offset: 1

Views

Author

Muniru A Asiru, Apr 15 2018

Keywords

Examples

			The matrix begins:
  1  1  1  1  1  1  1 ...
  1  6  1  1  1  1  1 ...
  1  1 15  1  1  1  1 ...
  1  1  1 28  1  1  1 ...
  1  1  1  1 45  1  1 ...
  1  1  1  1  1 66  1 ...
  1  1  1  1  1  1 91 ...
		

Crossrefs

Cf. A000384 (hexagonal numbers).
Cf. Determinant of n X n matrix whose main diagonal consists of the first n k-gonal numbers and all other elements are 1's: A000142 (k=2), A067550 (k=3), A010791 (k=4, with offset 1), A302909 (k=5), this sequence (k=6), A302911 (k=7), A302912 (k=8), A302913 (k=9), A302914 (k=10).
Odd bisection of column k=1 of A097591.

Programs

  • Maple
    d:=(i,j)->`if`(i<>j,1,i*(2*i-1)):
    seq(LinearAlgebra[Determinant](Matrix(n,d)),n=1..20);
  • Mathematica
    nmax = 20; Table[Det[Table[If[i == j, i*(2*i - 1), 1], {i, 1, k}, {j, 1, k}]], {k, 1, nmax}] (* Vaclav Kotesovec, Apr 16 2018 *)
    Table[(n + 1/2) * (2*n - 1)! / (3 * 2^(n - 2)), {n, 1, 20}] (* Vaclav Kotesovec, Apr 16 2018 *)
    Table[Det[DiagonalMatrix[PolygonalNumber[6,Range[n]]]/.(0->1)],{n,20}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 23 2020 *)
  • PARI
    a(n) = matdet(matrix(n, n, i, j, if (i!=j, 1, i*(2*i-1)))); \\ Michel Marcus, Apr 16 2018

Formula

a(n) = (n + 1/2) * (2*n-1)! / (3 * 2^(n-2)). - Vaclav Kotesovec, Apr 16 2018

A317327 Number T(n,k) of permutations of [n] with exactly k distinct lengths of increasing runs; triangle T(n,k), n>=0, 0<=k<=A003056(n), read by rows.

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 2, 4, 0, 7, 17, 0, 2, 118, 0, 82, 436, 202, 0, 2, 3294, 1744, 0, 1456, 18164, 20700, 0, 1515, 140659, 220706, 0, 50774, 1096994, 2317340, 163692, 0, 2, 10116767, 27136103, 2663928, 0, 3052874, 94670868, 328323746, 52954112, 0, 2, 1021089326, 4317753402, 888178070
Offset: 0

Views

Author

Alois P. Heinz, Jul 25 2018

Keywords

Examples

			T(4,1) = 7: 1234, 1324, 1423, 2314, 2413, 3412, 4321.
Triangle T(n,k) begins:
  1;
  0,       1;
  0,       2;
  0,       2,        4;
  0,       7,       17;
  0,       2,      118;
  0,      82,      436,       202;
  0,       2,     3294,      1744;
  0,    1456,    18164,     20700;
  0,    1515,   140659,    220706;
  0,   50774,  1096994,   2317340,   163692;
  0,       2, 10116767,  27136103,  2663928;
  0, 3052874, 94670868, 328323746, 52954112;
  ...
		

Crossrefs

Columns k=0-1 give: A000007, A317329.
Row sums give A000142.

Programs

  • Maple
    b:= proc(u, o, t, s) option remember;
          `if`(u+o=0, x^(nops(s union {t})-1),
           add(b(u-j, o+j-1, 1, s union {t}), j=1..u)+
           add(b(u+j-1, o-j, t+1, s), j=1..o))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0$2, {})):
    seq(T(n), n=0..16);
  • Mathematica
    b[u_, o_, t_, s_] := b[u, o, t, s] = If[u + o == 0, x^(Length[s ~Union~  {t}] - 1), Sum[b[u - j, o + j - 1, 1, s ~Union~ {t}], {j, 1, u}] + Sum[b[u + j - 1, o - j, t + 1, s], {j, 1, o}]];
    T[n_] := With[{p = b[n, 0, 0, {}]}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]];
    T /@ Range[0, 16] // Flatten (* Jean-François Alcover, Jan 27 2021, after Alois P. Heinz *)

Formula

T(n*(n+1)/2,n) = A317273(n).
Sum_{k=0..floor((sqrt(1+8*n)-1)/2)} k * T(n,k) = A317328(n).

A308962 Number of permutations of [4n] with exactly 2n increasing runs of odd length.

Original entry on oeis.org

1, 17, 13930, 77296296, 1568558071080, 84938094880524600, 10128482222614148352960, 2336936362896740255803152000, 950622895076910219544822877635200, 635598214592375283010356491822548022400, 661314598267382330509313757278639302452192000
Offset: 0

Views

Author

Alois P. Heinz, Jul 03 2019

Keywords

Examples

			a(1) = 17: (124)(3), (134)(2), 14(3)(2), (2)(134), (2)14(3), (234)(1), 24(3)(1), (3)(124), (3)14(2), (3)(2)14, (3)24(1), 34(2)(1), (4)(123), (4)13(2), (4)(2)13, (4)23(1), (4)(3)12; (odd length runs are shown between parentheses).
		

Crossrefs

Cf. A097591.

Programs

  • Mathematica
    Flatten[{1, Table[(4 n)! * Coefficient[Expand[Normal[Series[t^2/(1 - t*x - (1 - t^2)*E^(-t*x)), {x, 0, 4*n}, {t, 0, 2*n}]]], x^(4*n)*t^(2*n)], {n, 1, 10}]}] (* Vaclav Kotesovec, Jul 09 2019 *)

Formula

a(n) = (4n)! * [x^(4n) t^(2n)] t^2/(1-t*x-(1-t^2)*exp(-t*x)). [corrected by Vaclav Kotesovec, Jul 09 2019]
a(n) = A097591(4n,2n).
From Vaclav Kotesovec, Jul 09 2019: (Start)
a(n)/(4*n)! ~ c * d^n / sqrt(n), where
d = 0.49313160144517183347479521733129940030484540928084707469774969650583707...
c = 3.44699229707824751737600849250650265725079793249740793784564520854062204...
a(n) ~ c * d^n * n^(4*n), where
d = 2.31219720619339615667811172118287009649702081583503593066663730992576726...
c = 17.2806567085831933774093124549232969200598807738253988225436890867215712...
(End)
Showing 1-6 of 6 results.