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-7 of 7 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

A214015 Number of permutations A(n,k) in S_n with longest increasing subsequence of length <= k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 1, 0, 1, 1, 2, 5, 1, 0, 1, 1, 2, 6, 14, 1, 0, 1, 1, 2, 6, 23, 42, 1, 0, 1, 1, 2, 6, 24, 103, 132, 1, 0, 1, 1, 2, 6, 24, 119, 513, 429, 1, 0, 1, 1, 2, 6, 24, 120, 694, 2761, 1430, 1, 0, 1, 1, 2, 6, 24, 120, 719, 4582, 15767, 4862, 1, 0
Offset: 0

Views

Author

Alois P. Heinz, Jul 01 2012

Keywords

Comments

A(n,k) is also the sum of the squares of numbers of standard Young tableaux (SYT) of height <= k over all partitions of n.
This array is a larger and reflected version of A047888.
Column k>1 is asymptotic to (Product_{j=1..k} j!) * k^(2*n + k^2/2) / (Pi^((k-1)/2) * 2^((k-1)*(k+2)/2) * n^((k^2-1)/2)). - Vaclav Kotesovec, Sep 10 2014

Examples

			A(4,2) = 14 because 14 permutations of {1,2,3,4} do not contain an increasing subsequence of length > 2: 1432, 2143, 2413, 2431, 3142, 3214, 3241, 3412, 3421, 4132, 4213, 4231, 4312, 4321.  Permutation 1423 is not counted because it contains the noncontiguous increasing subsequence 123.
A(4,2) = 14 = 2^2 + 3^2 + 1^2 because the partitions of 4 with <= 2 parts are [2,2], [3,1], [4] with 2, 3, 1 standard Young tableaux, respectively:
  +------+  +------+  +---------+  +---------+  +---------+  +------------+
  | 1  3 |  | 1  2 |  | 1  3  4 |  | 1  2  4 |  | 1  2  3 |  | 1  2  3  4 |
  | 2  4 |  | 3  4 |  | 2 .-----+  | 3 .-----+  | 4 .-----+  +------------+
  +------+  +------+  +---+        +---+        +---+
Square array A(n,k) begins:
  1,  1,   1,    1,    1,    1,    1,    1, ...
  0,  1,   1,    1,    1,    1,    1,    1, ...
  0,  1,   2,    2,    2,    2,    2,    2, ...
  0,  1,   5,    6,    6,    6,    6,    6, ...
  0,  1,  14,   23,   24,   24,   24,   24, ...
  0,  1,  42,  103,  119,  120,  120,  120, ...
  0,  1, 132,  513,  694,  719,  720,  720, ...
  0,  1, 429, 2761, 4582, 5003, 5039, 5040, ...
		

Crossrefs

Differences between A000142 and columns k=0-9 give: A000142 (for n>0), A033312, A056986, A158005, A158432, A159139, A159175, A217675, A217676, A217677.
Main diagonal and first lower diagonal give: A000142, A033312.
A(2n,n-1) gives A269042(n) for n>0.

Programs

  • Maple
    h:= proc(l) local n; n:=nops(l); add(i, i=l)! /mul(mul(1+l[i]-j
          +add(`if`(l[k]>=j, 1, 0), k=i+1..n), j=1..l[i]), i=1..n)
        end:
    g:= (n, i, l)-> `if`(n=0 or i=1, h([l[], 1$n])^2, `if`(i<1, 0,
                     add(g(n-i*j, i-1, [l[], i$j]), j=0..n/i))):
    A:= (n, k)-> `if`(k>=n, n!, g(n, k, [])):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    h[l_] := With[{n = Length[l]}, Sum[i, {i, l}]! / Product[Product[1+l[[i]]-j + Sum[If[l[[k]] >= j, 1, 0], {k, i+1, n}], {j, 1, l[[i]]}], {i, 1, n}]];
    g[n_, i_, l_] := If[n == 0 || i == 1, h[Join[l, Array[1&, n]]]^2, If[i < 1, 0, Sum[g[n - i*j, i-1, Join[l, Array[i&, j]]], {j, 0, n/i}]]];
    A[n_, k_] := If[k >= n, n!, g[n, k, {}]];
    Table [Table [A[n, d-n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Dec 09 2013, translated from Maple *)

A220097 Number of words on {1,1,2,2,3,3,...,n,n} avoiding the pattern 123.

Original entry on oeis.org

1, 1, 6, 43, 352, 3114, 29004, 280221, 2782476, 28221784, 291138856, 3045298326, 32222872906, 344293297768, 3709496350512, 40256666304723, 439645950112788, 4828214610825948, 53286643424088024, 590705976259292856, 6574347641664629388, 73433973722458186608
Offset: 0

Views

Author

Lara Pudwell, Dec 04 2012

Keywords

Comments

a(n) is the number of 123-avoiding ordered set partitions of {1,...,2n} where all blocks are of size 2.

Examples

			For n=2, the a(2)=6 words are 1122, 1212, 1221, 2112, 2121, 2211.  For n=3, 213312 would be counted because it has no increasing subsequence of length 3, but 113223 would not be counted because it does have such an increasing subsequence.
For n=2, the a(2)=6 ordered set partitions are 12/34, 13/24, 14/23, 34/12, 24/13, 23/14.  For n=3, 46/23/15 would be counted because there is no way to choose i from the first block, j from the second block, and k from the third block such that i<j<k, but 13/25/46 would not be counted because we may select 1, 2, and 4 as a 123 pattern.
		

Crossrefs

Column k=2 of A267479.
Row sums of A288558.

Programs

  • Mathematica
    Rest@ CoefficientList[Series[Sqrt[2/(1 + 2 x + Sqrt[1 - 12 x])], {x, 0, 20}], x] (* Michael De Vlieger, Oct 05 2016 *)
    Table[Sum[(-1)^(n+k) Binomial[n,k]CatalanNumber[n+k], {k,0,n}], {n,1,20}] (* Peter Luschny, Aug 15 2017 *)

Formula

a(n) ~ 12^n/(sqrt(Pi)*(7*n/3)^(3/2)). - Vaclav Kotesovec, May 22 2013
G.f. = sqrt( 2/(1+2*x+sqrt(1-12*x))) [Chen et al.] - N. J. A. Sloane, Jun 09 2013
Conjecture: a(n) = (2/Pi)*Integral_{t=0..1} sqrt((1 - t)/t)*(16*t^2 - 4*t)^n = Catalan(2*n)*2F1(-1-2*n,-n;1/2-2*n;1/4). - Benedict W. J. Irwin, Oct 05 2016
a(n) = Sum_{k=0..n} (-1)^(n+k)*binomial(n,k)*Catalan(n+k). - Peter Luschny, Aug 15 2017
D-finite with recurrence: 4*n*(2*n+1)*a(n) +2*(-53*n^2+63*n-16)*a(n-1) +9*(13*n^2-59*n+62)*a(n-2) +18*(n-2)*(2*n-5)*a(n-3)=0. - R. J. Mathar, Feb 21 2020

Extensions

a(0)=1 prepended by Alois P. Heinz, Nov 15 2019

A266734 Number of words on {1,1,2,2,3,3,...,n,n} avoiding the pattern 1234.

Original entry on oeis.org

1, 1, 6, 90, 1879, 47024, 1331664, 41250519, 1367533365, 47808569835, 1744233181074, 65905305836049, 2564220925607625, 102277575120518170, 4167486279986250932, 172988069360147449566, 7298137818882637998561, 312349784398279829229533, 13539988681466075755541070
Offset: 0

Views

Author

N. J. A. Sloane, Jan 06 2016

Keywords

Crossrefs

Column k=3 of A267479.

Formula

Conjecture: +3*n*(620202643096396011773 -608794959941727250938*n +146949290712243118000*n^2) *(n+1)^2 *(2*n+1)^2 *a(n) -n*(94389117512395618060544*n^6 -419724075420172456531120*n^5 +442263508538458916585360*n^4 +229131363207555256548194*n^3 -477880029525553894746823*n^2 +160086316440678171209939*n -11163647575735128211914) *a(n-1) -3*(n-1) *(23820522077322908587584*n^6 -1446304460086201780480376*n^5 +11080409117453774846145540*n^4 -35494287160655892321199502*n^3 +57163416479212379649118767*n^2 -45988763994280198223305139*n +14778623468656583258390502) *a(n-2) +36*(n-2) *(41902292735037258217056*n^6 -783254865433733876219472*n^5 +5235970136340811777332552*n^4 -17094365117036393449118734*n^3 +29518557363755878023892305*n^2 -25895204716899392803468055*n +9075752633781608162944050) *a(n-3) -8748*(n-2) *(125877543736438014048*n^2 -450267700517870762570*n +370949541619209268475) *(n-3)^2 *(2*n-7)^2 *a(n-4)=0. - R. J. Mathar, Apr 15 2016

Extensions

More terms from Alois P. Heinz, Jan 14 2016

A266735 Number of words on {1,1,2,2,3,3,...,n,n} avoiding the pattern 12345.

Original entry on oeis.org

1, 1, 6, 90, 2520, 102011, 5176504, 307027744, 20472135280, 1496594831506, 117857270562568, 9869468603141427, 870255083860881152, 80185525536941657225, 7673807618627318341436, 759049283017632212000140, 77292554293281131959377376, 8075621155990277422800518076
Offset: 0

Views

Author

N. J. A. Sloane, Jan 06 2016

Keywords

Crossrefs

Column k=4 of A267479.

Extensions

More terms from Alois P. Heinz, Jan 14 2016

A267480 Number T(n,k) of words on {1,1,2,2,...,n,n} with longest increasing subsequence of length k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 5, 0, 1, 42, 47, 0, 1, 351, 1527, 641, 0, 1, 3113, 43910, 54987, 11389, 0, 1, 29003, 1302660, 3844840, 2059147, 248749, 0, 1, 280220, 40970298, 265777225, 285588543, 82025038, 6439075, 0, 1, 2782475, 1364750889, 19104601915, 37783672691, 19773928713, 3507289363, 192621953
Offset: 0

Views

Author

Alois P. Heinz, Jan 15 2016

Keywords

Examples

			Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1,      5;
  0, 1,     42,       47;
  0, 1,    351,     1527,       641;
  0, 1,   3113,    43910,     54987,     11389;
  0, 1,  29003,  1302660,   3844840,   2059147,   248749;
  0, 1, 280220, 40970298, 265777225, 285588543, 82025038, 6439075;
		

Crossrefs

Main diagonal gives A006902.
Row sums give A000680.

Formula

T(n,0) = A267479(n,0), T(n,k) = A267479(n,k) - A267479(n,k-1) for k>0.
Sum_{k=0..n-1} T(n,k) = A267532(n).

A267532 Number of words on {1,1,2,2,...,n,n} with longest increasing subsequence of length < n.

Original entry on oeis.org

0, 0, 1, 43, 1879, 102011, 7235651, 674641325, 81537026047, 12498099730471, 2375632826877259, 548818073236649129, 151476182218777630655, 49229890784448694885163, 18608906461974462064310179, 8094874797394331233877338741, 4015057931973886657462193434111
Offset: 0

Views

Author

Alois P. Heinz, Jan 16 2016

Keywords

Comments

Or number of words on {1,1,2,2,...,n,n} avoiding the pattern 12...n.

Examples

			a(2) = 1: 2211.
a(3) = 43: 113322, 131322, 133122, 133212, 133221, 211332, 213132, 213312, 213321, 221133, 221313, 221331, 223113, 223131, 223311, 231132, 231312, 231321, 232113, 232131, 232311, 233112, 233121, 233211, 311322, 313122, 313212, 313221, 321132, 321312, 321321, 322113, 322131, 322311, 323112, 323121, 323211, 331122, 331212, 331221, 332112, 332121, 332211.
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<3, [1$2, 5][n+1], (
          (n^3+n^2-7*n+4)*b(n-1)-2*(2*n-3)*(n-1)^3*b(n-2))/(n-2))
        end:
    a:= n-> (2*n)!/(2^n)-b(n):
    seq(a(n), n=0..20);

Formula

a(n) = (2*n)! * ( 1/(2^n) - Sum_{k=0..n} (-1)^k * C(n,k) / (n+k)! ).
a(n) = A000680(n) - A006902(n).
a(n) = A267479(n,n-1) for n>0.
a(n) = Sum_{k=0..n-1} A267480(n,k).
Showing 1-7 of 7 results.