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

A001515 Bessel polynomial y_n(x) evaluated at x=1.

Original entry on oeis.org

1, 2, 7, 37, 266, 2431, 27007, 353522, 5329837, 90960751, 1733584106, 36496226977, 841146804577, 21065166341402, 569600638022431, 16539483668991901, 513293594376771362, 16955228098102446847, 593946277027962411007, 21992967478132711654106, 858319677924203716921141
Offset: 0

Views

Author

Keywords

Comments

For some applications it is better to start this sequence with an extra 1 at the beginning: 1, 1, 2, 37, 266, 2431, 27007, 353522, 5329837, ... (again with offset 0). This sequence now has its own entry - see A144301.
Number of partitions of {1,...,k}, n <= k <= 2n, into n blocks with no more than 2 elements per block. Restated, number of ways to use the elements of {1,...,k}, n <= k <= 2n, once each to form a collection of n sets, each having 1 or 2 elements. - Bob Proctor, Apr 18 2005, Jun 26 2006. E.g., for n=2 we get: (k=2): {1,2}; (k=3): {1,23}, {2,13}, {3,12}; (k=4): {12,34}, {13,24}, {14,23}, for a total of a(2) = 7 partitions.
Equivalently, number of sequences of n unlabeled items such that each item occurs just once or twice (cf. A105749). - David Applegate, Dec 08 2008
Numerator of (n+1)-th convergent to 1+tanh(1). - Benoit Cloitre, Dec 20 2002
The following Maple lines show how this sequence and A144505, A144498, A001514, A144513, A144506, A144514, A144507, A144301 are related.
f0:=proc(n) local k; add((n+k)!/((n-k)!*k!*2^k),k=0..n); end; [seq(f0(n),n=0..10)];
# that is this sequence
f1:=proc(n) local k; add((n+k+1)!/((n-k)!*k!*2^k),k=0..n); end; [seq(f1(n),n=0..10)];
# that is A144498
f2:=proc(n) local k; add((n+k+2)!/((n-k)!*k!*2^k),k=0..n); end; [seq(f2(n),n=0..10)];
# that is A144513; divided by 2 gives A001514
f3:=proc(n) local k; add((n+k+3)!/((n-k)!*k!*2^k),k=0..n); end; [seq(f3(n),n=0..10)];
# that is A144514; divided by 6 gives A144506
f4:=proc(n) local k; add((n+k+4)!/((n-k)!*k!*2^k),k=0..n); end; [seq(f4(n),n=0..10)];
# that divided by 24 gives A144507
a(n) is also the numerator of the continued fraction sequence beginning with 2 followed by 3 and the remaining odd numbers: [2,3,5,7,9,11,13,...]. - Gil Broussard, Oct 07 2009
Also, number of scenarios in the Gift Exchange Game when a gift can be stolen at most once. - N. J. A. Sloane, Jan 25 2017

Examples

			The first few Bessel polynomials are (cf. A001497, A001498):
  y_0 = 1
  y_1 = 1 +   x
  y_2 = 1 + 3*x +  3*x^2
  y_3 = 1 + 6*x + 15*x^2 + 15*x^3, etc.
G.f. = 1 + 2*x + 7*x^2 + 37*x^3 + 266*x^4 + 2431*x^5 + 27007*x^6 + 353522*x^7 + ...
		

References

  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 77.
  • 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

See A144301 for other formulas and comments.
Row sums of Bessel triangle A001497 as well as of A001498.
Partial sums: A105748.
First differences: A144498.
Replace "sets" with "lists" in comment: A001517.
The gift scenarios sequences when a gift can be stolen at most s times, for s = 1..9, are this sequence, A144416, A144508, A144509, A149187, A281358, A281359, A281360, A281361.

Programs

  • Haskell
    a001515 = sum . a001497_row -- Reinhard Zumkeller, Nov 24 2014
    
  • Magma
    [(&+[Binomial(n+j, 2*j)*Catalan(j)*Factorial(j+1)/2^j: j in [0..n]]): n in [0..30]]; // G. C. Greubel, Sep 26 2023
    
  • Maple
    A001515 := proc(n) option remember; if n=0 then 1 elif n=1 then 2 else (2*n-1)*A001515(n-1)+A001515(n-2); fi; end;
    A001515:=proc(n) local k; add( (n+k)!/((n-k)!*k!*2^k),k=0..n); end;
    A001515:= n-> hypergeom( [n+1,-n],[],-1/2);
    bessel := proc(n,x) add(binomial(n+k,2*k)*(2*k)!*x^k/(k!*2^k),k=0..n); end;
  • Mathematica
    RecurrenceTable[{a[0]==1,a[1]==2,a[n]==(2n-1)a[n-1]+a[n-2]},a[n], {n,25}] (* Harvey P. Dale, Jun 18 2011 *)
    Table[Sum[BellY[n+1, k, (2 Range[n+1] - 3)!!], {k, n+1}], {n, 0, 20}] (* Vladimir Reshetnikov, Nov 09 2016 *)
  • PARI
    {a(n) = if( n<0, n = -1 - n); sum( k=0, n, (2*n - k)! / (k! * (n-k)!) * 2^(k-n))} /* Michael Somos, Apr 08 2012 */
    
  • SageMath
    [sum(binomial(n+j,2*j)*binomial(2*j,j)*factorial(j)//2^j for j in range(n+1)) for n in range(31)] # G. C. Greubel, Sep 26 2023

Formula

The following formulas can all be found in (or are easily derived from formulas in) Grosswald's book.
D-finite with recurrence: a(0) = 1, a(1) = 2; thereafter a(n) = (2*n-1)*a(n-1) + a(n-2).
E.g.f.: exp(1-sqrt(1-2*x))/sqrt(1-2*x).
a(n) = Sum_{ k = 0..n } binomial(n+k,2*k)*(2*k)!/(k!*2^k).
Equivalently, a(n) = Sum_{ k = 0..n } (n+k)!/((n-k)!*k!*2^k) = Sum_{ k = n..2n } k!/((2n-k)!*(k-n)!*2^(k-n)).
a(n) = Hypergeometric2F0( [n+1, -n] ; - ; -1/2).
a(n) = A105749(n)/n!.
a(n) ~ exp(1)*(2n)!/(n!*2^n) as n -> oo. [See Grosswald, p. 124]
a(n) = A144301(n+1).
G.f.: 1/(1-x-x/(1-x-2*x/(1-x-3*x/(1-x-4*x/(1-x-5*x/(1-.... (continued fraction). - Paul Barry, Feb 08 2009
From Michael Somos, Apr 08 2012: (Start)
a(-1 - n) = a(n).
(a(n+1) + a(n+2))^2 = a(n)*a(n+2) + a(n+1)*a(n+3) for all integer n. (End)
G.f.: 1/G(0) where G(k) = 1 - x - x*(2*k+1)/(1 - x - 2*x*(k+1)/G(k+1)); (continued fraction). - Sergei N. Gladkovskii, Oct 05 2012
E.g.f.: E(0)/(2*sqrt(1-2*x)), where E(k) = 1 + 1/(1 - 2*x/(2*x + (k+1)*(1+sqrt(1-2*x))/E(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 23 2013
G.f.: T(0)/(1-x), where T(k) = 1 - (k+1)*x/((k+1)*x - (1-x)^2/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Nov 15 2013
a(n) = (2*BesselI(1/2, 1)+BesselI(3/2, 1))*BesselK(n+1/2, 1). - Jean-François Alcover, Feb 03 2014
a(n) = exp(1)*sqrt(2/Pi)*BesselK(1/2+n,1). - Gerry Martens, Jul 22 2015
From Peter Bala, Apr 14 2017: (Start)
a(n) = (1/n!)*Integral_{x = 0..inf} exp(-x)*x^n*(1 + x/2)^n dx.
E.g.f.: d/dx( exp(x*c(x/2)) ) = 1 + 2*x + 7*x^2/2! + 37*x^3/3! + ..., where c(x) = (1 - sqrt(1 - 4*x))/(2*x) is the g.f. of the Catalan numbers A000108. (End)
From G. C. Greubel, Aug 16 2017: (Start)
a(n) = (1/2)_{n} * 2^n * hypergeometric1f1(-n; -2*n; 2).
G.f.: (1/(1-t))*hypergeometric2f0(1, 1/2; -; 2*t/(1-t)^2). (End)

Extensions

Extensively edited by N. J. A. Sloane, Dec 07 2008

A001498 Triangle a(n,k) (n >= 0, 0 <= k <= n) of coefficients of Bessel polynomials y_n(x) (exponents in increasing order).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The row polynomials with exponents in increasing order (e.g., third row: 1+3x+3x^2) are Grosswald's y_{n}(x) polynomials, p. 18, Eq. (7).
Also called Bessel numbers of first kind.
The triangle a(n,k) has factorization [C(n,k)][C(k,n-k)]Diag((2n-1)!!) The triangle a(n-k,k) is A100861, which gives coefficients of scaled Hermite polynomials. - Paul Barry, May 21 2005
Related to k-matchings of the complete graph K_n by a(n,k)=A100861(n+k,k). Related to the Morgan-Voyce polynomials by a(n,k)=(2k-1)!!*A085478(n,k). - Paul Barry, Aug 17 2005
Related to Hermite polynomials by a(n,k)=(-1)^k*A060821(n+k, n-k)/2^n. - Paul Barry, Aug 28 2005
The row polynomials, the Bessel polynomials y(n,x):=Sum_{m=0..n} (a(n,m)*x^m) (called y_{n}(x) in the Grosswald reference) satisfy (x^2)*(d^2/dx^2)y(n,x) + 2*(x+1)*(d/dx)y(n,x) - n*(n+1)*y(n,x) = 0.
a(n-1, m-1), n >= m >= 1, enumerates unordered n-vertex forests composed of m plane (aka ordered) increasing (rooted) trees. Proof from the e.g.f. of the first column Y(z):=1-sqrt(1-2*z) (offset 1) and the Bergeron et al. eq. (8) Y'(z)= phi(Y(z)), Y(0)=0, with out-degree o.g.f. phi(w)=1/(1-w). See their remark on p. 28 on plane recursive trees. For m=1 see the D. Callan comment on A001147 from Oct 26 2006. - Wolfdieter Lang, Sep 14 2007
The asymptotic expansions of the higher order exponential integrals E(x,m,n), see A163931 for information, lead to the Bessel numbers of the first kind in an intriguing way. For the first four values of m these asymptotic expansions lead to the triangles A130534 (m=1), A028421 (m=2), A163932 (m=3) and A163934 (m=4). The o.g.f.s. of the right hand columns of these triangles in their turn lead to the triangles A163936 (m=1), A163937 (m=2), A163938 (m=3) and A163939 (m=4). The row sums of these four triangles lead to A001147, A001147 (minus a(0)), A001879 and A000457 which are the first four right hand columns of A001498. We checked this phenomenon for a few more values of m and found that this pattern persists: m = 5 leads to A001880, m=6 to A001881, m=7 to A038121 and m=8 to A130563 which are the next four right hand columns of A001498. So one by one all columns of the triangle of coefficients of Bessel polynomials appear. - Johannes W. Meijer, Oct 07 2009
a(n,k) also appear as coefficients of (n+1)st degree of the differential operator D:=1/t d/dt, namely D^{n+1}= Sum_{k=0..n} a(n,k) (-1)^{n-k} t^{1-(n+k)} (d^{n+1-k}/dt^{n+1-k}. - Leonid Bedratyuk, Aug 06 2010
a(n-1,k) are the coefficients when expanding (xI)^n in terms of powers of I. Let I(f)(x) := Integral_{a..x} f(t) dt, and (xI)^n := x Integral_{a..x} [ x_{n-1} Integral_{a..x_{n-1}} [ x_{n-2} Integral_{a..x_{n-2}} ... [ x_1 Integral_{a..x_1} f(t) dt ] dx_1 ] .. dx_{n-2} ] dx_{n-1}. Then: (xI)^n = Sum_{k=0..n-1} (-1)^k * a(n-1,k) * x^(n-k) * I^(n+k)(f)(x) where I^(n) denotes iterated integration. - Abdelhay Benmoussa, Apr 11 2025

Examples

			The triangle a(n, k), n >= 0, k = 0..n, begins:
  1
  1  1
  1  3   3
  1  6  15    15
  1 10  45   105    105
  1 15 105   420    945    945
  1 21 210  1260   4725  10395   10395
  1 28 378  3150  17325  62370  135135   135135
  1 36 630  6930  51975 270270  945945  2027025  2027025
  1 45 990 13860 135135 945945 4729725 16216200 34459425 34459425
  ...
And the first few Bessel polynomials are:
  y_0(x) = 1,
  y_1(x) = x + 1,
  y_2(x) = 3*x^2 + 3*x + 1,
  y_3(x) = 15*x^3 + 15*x^2 + 6*x + 1,
  y_4(x) = 105*x^4 + 105*x^3 + 45*x^2 + 10*x + 1,
  y_5(x) = 945*x^5 + 945*x^4 + 420*x^3 + 105*x^2 + 15*x + 1,
  ...
Tree counting: a(2,1)=3 for the unordered forest of m=2 plane increasing trees with n=3 vertices, namely one tree with one vertex (root) and another tree with two vertices (a root and a leaf), labeled increasingly as (1, 23), (2,13) and (3,12). - _Wolfdieter Lang_, Sep 14 2007
		

References

  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 77.

Crossrefs

Cf. A001497 (same triangle but rows read in reverse order). Other versions of this same triangle are given in A144331, A144299, A111924 and A100861.
Columns from left edge include A000217, A050534.
Columns 1-6 from right edge are A001147, A001879, A000457, A001880, A001881, A038121.
Bessel polynomials evaluated at certain x are A001515 (x=1, row sums), A000806 (x=-1), A001517 (x=2), A002119 (x=-2), A001518 (x=3), A065923 (x=-3), A065919 (x=4). Cf. A043301, A003215.
Cf. A245066 (central terms). A113025 (y_n(2*x)).

Programs

  • Haskell
    a001498 n k = a001498_tabl !! n !! k
    a001498_row n = a001498_tabl !! n
    a001498_tabl = map reverse a001497_tabl
    -- Reinhard Zumkeller, Jul 11 2014
    
  • Magma
    /* As triangle: */ [[Factorial(n+k)/(2^k*Factorial(n-k)*Factorial(k)): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Feb 15 2016
  • Maple
    Bessel := proc(n,x) add(binomial(n+k,2*k)*(2*k)!*x^k/(k!*2^k),k=0..n); end; # explicit Bessel polynomials
    Bessel := proc(n) option remember; if n <=1 then (1+x)^n else (2*n-1)*x*Bessel(n-1)+Bessel(n-2); fi; end; # recurrence for Bessel polynomials
    bessel := proc(n,x) add(binomial(n+k,2*k)*(2*k)!*x^k/(k!*2^k),k=0..n); end;
    f := proc(n) option remember; if n <=1 then (1+x)^n else (2*n-1)*x*f(n-1)+f(n-2); fi; end;
    # Alternative:
    T := (n,k) -> pochhammer(n+1,k)*binomial(n,k)/2^k:
    for n from 0 to 9 do seq(T(n,k), k=0..n) od; # Peter Luschny, May 11 2018
    T := proc(n, k) option remember; if k = 0 then 1 else if k = n then T(n, k-1)
    else (n - k + 1)* T(n, k - 1) + T(n - 1, k) fi fi end:
    for n from 0 to 9 do seq(T(n, k), k = 0..n) od;  # Peter Luschny, Oct 02 2023
  • Mathematica
    max=50; Flatten[Table[(n+k)!/(2^k*(n-k)!*k!), {n, 0, Sqrt[2 max]//Ceiling}, {k, 0, n}]][[1 ;; max]] (* Jean-François Alcover, Mar 20 2011 *)
  • PARI
    {T(n,k)=if(k<0||k>n, 0, binomial(n, k)*(n+k)!/2^k/n!)} /* Michael Somos, Oct 03 2006 */
    
  • PARI
    A001497_ser(N,t='t) = {
      my(x='x+O('x^(N+2)));
      serlaplace(deriv(exp((1-sqrt(1-2*t*x))/t),'x));
    };
    concat(apply(Vecrev, Vec(A001497_ser(9)))) \\ Gheorghe Coserea, Dec 27 2017
    

Formula

a(n, k) = (n+k)!/(2^k*(n-k)!*k!) (see Grosswald and Riordan). - Ralf Stephan, Apr 20 2004
a(n, 0)=1; a(0, k)=0, k > 0; a(n, k) = a(n-1, k) + (n-k+1) * a(n, k-1) = a(n-1, k) + (n+k-1) * a(n-1, k-1). - Len Smiley
a(n, m) = A001497(n, n-m) = A001147(m)*binomial(n+m, 2*m) for n >= m >= 0, otherwise 0.
G.f. for m-th column: (A001147(m)*x^m)/(1-x)^(2*m+1), m >= 0, where A001147(m) = double factorials (from explicit a(n, m) form).
Row polynomials y_n(x) are given by D^(n+1)(exp(t)) evaluated at t = 0, where D is the operator 1/(1-t*x)*d/dt. - Peter Bala, Nov 25 2011
G.f.: conjecture: T(0)/(1-x), where T(k) = 1 - x*y*(k+1)/(x*y*(k+1) - (1-x)^2/T(k+1)); (continued fraction). - Sergei N. Gladkovskii, Nov 13 2013
Recurrence from Grosswald, p. 18, eq. (5), for the row polynomials: y_n(x) = (2*n-1)*x*y_{n-1} + y_{n-2}(x), y_{-1}(x) = 1 = y_{0} = 1, n >= 1. This becomes, for n >= 0, k = 0..n: a(n, k) = 0 for n < k (zeros not shown in the triangle), a(n, -1) = 0, a(0, 0) = 1 = a(1, 0) and otherwise a(n, k) = (2*n-1)*a(n-1, k-1) + a(n-2, k). Compare with the above given recurrences. - Wolfdieter Lang, May 11 2018
T(n, k) = Pochhammer(n+1,k)*binomial(n,k)/2^k = A113025(n,k)/2^k. - Peter Luschny, May 11 2018
a(n, k) = Sum_{i=0..min(n-1, k)} (n-i)(k-i) * a(n-1, i) where x(n) = x*(x-1)*...*(x-n+1) is the falling factorial, this equality follows directly from the operational formula we wrote in Apr 11 2025.- Abdelhay Benmoussa, May 18 2025

A006145 Ruth-Aaron numbers (1): sum of prime divisors of n = sum of prime divisors of n+1.

Original entry on oeis.org

5, 24, 49, 77, 104, 153, 369, 492, 714, 1682, 2107, 2299, 2600, 2783, 5405, 6556, 6811, 8855, 9800, 12726, 13775, 18655, 21183, 24024, 24432, 24880, 25839, 26642, 35456, 40081, 43680, 48203, 48762, 52554, 61760, 63665, 64232, 75140, 79118, 95709, 106893, 109939
Offset: 1

Views

Author

Keywords

Comments

Nelson, Penney, & Pomerance call these "Aaron numbers" because 714 is Babe Ruth's lifetime home run record, Hank Aaron's 715th home run broke this record, and 714 and 715 have the same sum of prime divisors. - David W. Wilson
Number of terms < 10^n: 1, 4, 9, 19, 40, 139, 494, 1748, 6650, ..., . - Robert G. Wilson v, Jan 23 2012

References

  • John L. Drost, Ruth/Aaron Pairs, J. Recreational Math. 28 (No. 2), 120-122.
  • P. Hoffman, The Man Who Loved Only Numbers, pp. 179-181, Hyperion, NY 1998.
  • J. Roberts, Lure of Integers, pp. 250, MAA 1992.
  • D. Wells, The Penguin Dictionary of Curious and Interesting Numbers, pp. 159-160, Penguin 1986.

Crossrefs

Programs

  • Maple
    with(numtheory): for n from 1 to 10000 do t0 := 0; t1 := factorset(n);
    for j from 1 to nops(t1) do t0 := t0+t1[ j ]; od: s[ n ] := t0; od:
    for n from 1 to 9999 do if s[ n ] = s[ n+1 ] then lprint(n,s[ n ]); fi; od:
    # Alternative:
    SumPF := proc(n) option remember; add(NumberTheory:-PrimeFactors(n)) end:
    seq(ifelse(SumPF(n) = SumPF(n+1), n, NULL), n = 1..3000); # Peter Luschny, Jun 11 2024
  • Mathematica
    fQ[n_] := Plus @@ (First@# & /@ FactorInteger[n]) == Plus @@ (First@# & /@ FactorInteger[n + 1]); Select[ Range@ 100000, fQ] (* Robert G. Wilson v, Jan 22 2012 *)
  • PARI
    sopf(n)=my(f=factor(n));sum(i=1,#f[,1],f[i,1])
    is(n)=sopf(n)==sopf(n+1) \\ Charles R Greathouse IV, Jan 27 2012
    
  • Python
    from sympy import factorint
    def aupton(terms):
      alst, k, sopfk, sopfkp1 = [], 2, 2, 3
      while len(alst) < terms:
        if sopfkp1 == sopfk: alst.append(k)
        k, sopfk, sopfkp1 = k+1, sopfkp1, sum(p for p in factorint(k+2))
      return alst
    print(aupton(42)) # Michael S. Branicky, May 24 2021

A003436 Number of inequivalent labeled Hamiltonian circuits on n-octahedron. Interlacing chords joining 2n points on circle.

Original entry on oeis.org

1, 0, 1, 4, 31, 293, 3326, 44189, 673471, 11588884, 222304897, 4704612119, 108897613826, 2737023412199, 74236203425281, 2161288643251828, 67228358271588991, 2225173863019549229, 78087247031912850686, 2896042595237791161749, 113184512236563589997407
Offset: 0

Views

Author

Keywords

Comments

Also called the relaxed ménage problem (cf. A000179).
a(n) can be seen as a subset of the unordered pairings of the first 2n integers (A001147) with forbidden pairs (1,2n) and (i,i+1) for all i in [1,2n-1] (all adjacent integers modulo 2n). The linear version of this constraint is A000806. - Olivier Gérard, Feb 08 2011
Number of perfect matchings in the complement of C_{2n} where C_{2n} is the cycle graph on 2n vertices. - Andrew Howroyd, Mar 15 2016
Also the number of 2-uniform set partitions of {1...2n} containing no two cyclically successive vertices in the same block. - Gus Wiseman, Feb 27 2019

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A003435, A129348. A003437 gives unlabeled case.
First differences of A000806.
Column k=2 of A324428.

Programs

  • Maple
    A003436 := proc(n) local k;
          if n = 0 then 1
        elif n = 1 then 0
        else add( (-1)^k*binomial(n,k)*2*n/(2*n-k)*2^k*(2*n-k)!/2^n/n!,k=0..n) ;
        end if;
    end proc: # R. J. Mathar, Dec 11 2013
    A003436 := n-> `if`(n<2, 1-n, (-1)^n*2*hypergeom([n, -n], [], 1/2)):
    seq(simplify(A003436(n)), n=0..18); # Peter Luschny, Nov 10 2016
  • Mathematica
    a[n_] := (2*n-1)!! * Hypergeometric1F1[-n, 1-2*n, -2]; a[1] = 0;
    Table[a[n], {n, 0, 19}] (* Jean-François Alcover, Apr 05 2013 *)
    twounifll[{}]:={{}};twounifll[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@twounifll[Complement[set,s]]]/@Table[{i,j},{j,If[i==1,Select[set,2<#i+1&]]}];
    Table[Length[twounifll[Range[n]]],{n,0,14,2}] (* Gus Wiseman, Feb 27 2019 *)

Formula

a(n) = A003435(n)/(n!*2^n).
a(n) = 2*n*a(n-1)-2*(n-3)*a(n-2)-a(n-3) for n>4. [Corrected by Vasu Tewari, Apr 11 2010, and by R. J. Mathar, Oct 02 2013]
G.f.: x + ((1-x)/(1+x)) * Sum_{n>=0} A001147(n)*(x/(1+x)^2)^n. - Vladeta Jovovic, Jun 27 2007
a(n) ~ 2^(n+1/2)*n^n/exp(n+1). - Vaclav Kotesovec, Aug 13 2013
a(n) = (-1)^n*2*hypergeom([n, -n], [], 1/2) for n >= 2. - Peter Luschny, Nov 10 2016

Extensions

a(0)=1 prepended by Gus Wiseman, Feb 27 2019

A058798 a(n) = n*a(n-1) - a(n-2) with a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 2, 5, 18, 85, 492, 3359, 26380, 234061, 2314230, 25222469, 300355398, 3879397705, 54011212472, 806288789375, 12846609417528, 217586071308601, 3903702674137290, 73952764737299909, 1475151592071860890
Offset: 0

Views

Author

Christian G. Bower, Dec 02 2000

Keywords

Comments

Note that a(n) = (a(n-1) + a(n+1))/(n+1). - T. D. Noe, Oct 12 2012; corrected by Gary Detlefs, Oct 26 2018
a(n) = log_2(A073888(n)) = log_3(A073889(n)).
a(n) equals minus the determinant of M(n+2) where M(n) is the n X n symmetric tridiagonal matrix with entries 1 just above and below its diagonal and diagonal entries 0, 1, 2, .., n-1. Example: M(4)=matrix([[0, 1, 0, 0], [1, 1, 1, 0], [0, 1, 2, 1], [0, 0, 1, 3]]). - Roland Bacher, Jun 19 2001
a(n) = A221913(n,-1), n>=1, is the numerator sequence of the n-th approximation of the continued fraction -(0 + K_{k>=1} (-1/k)) = 1/(1-1/(2-1/(3-1/(4-... The corresponding denominator sequence is A058797(n). - Wolfdieter Lang, Mar 08 2013
The recurrence equation a(n+1) = (A*n + B)*a(n) + C*a(n-1) with the initial conditions a(0) = 0, a(1) = 1 has the solution a(n) = Sum_{k = 0..floor((n-1)/2)} C^k*binomial(n-k-1,k)*( Product_{j = 1..n-2k-1} (k+j)*A + B ). This is the case A = 1, B = 1, C = -1. - Peter Bala, Aug 01 2013

Examples

			Continued fraction approximation 1/(1-1/(2-1/(3-1/4))) = 18/7 = a(4)/A058797(4). - _Wolfdieter Lang_, Mar 08 2013
		

Crossrefs

Column 1 of A007754.
Cf. A073888, A073889, A221913 (alternating row sums).

Programs

  • GAP
    a:=[1,2];; for n in [3..25] do a[n]:=n*a[n-1]-a[n-2]; od; Concatenation([0], a); # Muniru A Asiru, Oct 26 2018
    
  • Magma
    [0] cat [n le 2 select n else n*Self(n-1)-Self(n-2): n in [1..30]]; // Vincenzo Librandi, Sep 22 2016
    
  • Mathematica
    t = {0, 1}; Do[AppendTo[t, n*t[[-1]] - t[[-2]]], {n, 2, 25}]; t (* T. D. Noe, Oct 12 2012 *)
    nxt[{n_,a_,b_}]:={n+1,b,b*(n+1)-a}; Transpose[NestList[nxt,{1,0,1},20]] [[2]] (* Harvey P. Dale, Nov 30 2015 *)
  • PARI
    m=30; v=concat([1,2], vector(m-2)); for(n=3, m, v[n] = n*v[n-1]-v[n-2]); concat(0, v) \\ G. C. Greubel, Nov 24 2018
  • Sage
    def A058798(n):
        if n < 3: return n
        return hypergeometric([1/2-n/2, 1-n/2],[2, 1-n, -n], -4)*factorial(n)
    [simplify(A058798(n)) for n in (0..20)] # Peter Luschny, Sep 10 2014
    

Formula

a(n) = Sum_{k = 0..floor((n-1)/2)} (-1)^k*binomial(n-k-1,k)*(n-k)!/(k+1)!. - Peter Bala, Aug 01 2013
a(n) = A058797(n+1) + A058799(n-1). - Henry Bottomley, Feb 28 2001
a(n) = Pi*(BesselY(1, 2)*BesselJ(n+1, 2) - BesselJ(1,2)* BesselY(n+1,2)). See the Abramowitz-Stegun reference given under A103921, p. 361 eq. 9.1.27 (first line with Y, J and z=2) and p. 360, eq. 9.1.16 (Wronskian). - Wolfdieter Lang, Mar 05 2013
Limit_{n->oo} a(n)/n! = BesselJ(1,2) = 0.576724807756873... See a comment on asymptotics under A084950.
a(n) = n!*hypergeometric([1/2-n/2, 1-n/2], [2, 1-n, -n], -4) for n >= 2. - Peter Luschny, Sep 10 2014

Extensions

New description from Amarnath Murthy, Aug 17 2002

A278990 Number of loopless linear chord diagrams with n chords.

Original entry on oeis.org

1, 0, 1, 5, 36, 329, 3655, 47844, 721315, 12310199, 234615096, 4939227215, 113836841041, 2850860253240, 77087063678521, 2238375706930349, 69466733978519340, 2294640596998068569, 80381887628910919255, 2976424482866702081004, 116160936719430292078411
Offset: 0

Views

Author

N. J. A. Sloane, Dec 07 2016

Keywords

Comments

See the signed version of these numbers, A000806, for much more information about these numbers.
From Gus Wiseman, Feb 27 2019: (Start)
Also the number of 2-uniform set partitions of {1..2n} containing no two successive vertices in the same block. For example, the a(3) = 5 set partitions are:
{{1,3},{2,5},{4,6}}
{{1,4},{2,5},{3,6}}
{{1,4},{2,6},{3,5}}
{{1,5},{2,4},{3,6}}
{{1,6},{2,4},{3,5}}
(End)
From Gus Wiseman, Jul 05 2020: (Start)
Also the number of permutations of the multiset {1,1,2,2,...,n,n} with no two consecutive terms equal and where the first i appears before the first j for i < j. For example, the a(3) = 5 permutations are the following.
(1,2,3,1,2,3)
(1,2,3,1,3,2)
(1,2,3,2,1,3)
(1,2,3,2,3,1)
(1,2,1,3,2,3)
(End)

Crossrefs

Column k=0 of A079267.
Column k=2 of A293157.
Row n=2 of A322013.
Cf. A000110, A000699 (topologically connected 2-uniform), A000806, A001147 (2-uniform), A003436 (cyclical version), A005493, A170941, A190823 (distance 3+ version), A322402, A324011, A324172.
Anti-run compositions are A003242.
Separable partitions are A325534.
Other sequences involving the multiset {1,1,2,2,...,n,n}: A001147, A007717, A020555, A094574, A316972.

Programs

  • Magma
    [n le 2 select 2-n else (2*n-3)*Self(n-1) + Self(n-2): n in [1..30]]; // G. C. Greubel, Sep 26 2023
    
  • Mathematica
    RecurrenceTable[{a[n]== (2n-1)a[n-1] +a[n-2], a[0]==1, a[1]==0}, a, {n,0,20}] (* Vaclav Kotesovec, Sep 15 2017 *)
    FullSimplify[Table[-I*(BesselI[1/2+n,-1] BesselK[3/2,1] - BesselI[3/2,-1] BesselK[1/2+ n,1]), {n,0,20}]] (* Vaclav Kotesovec, Sep 15 2017 *)
    Table[(2 n-1)!! Hypergeometric1F1[-n,-2 n,-2], {n,0,20}] (* Eric W. Weisstein, Nov 14 2018 *)
    Table[Sqrt[2/Pi]/E ((-1)^n Pi BesselI[1/2+n,1] +BesselK[1/2+n,1]), {n,0,20}] // FunctionExpand // FullSimplify (* Eric W. Weisstein, Nov 14 2018 *)
    twouniflin[{}]:={{}};twouniflin[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@twouniflin[Complement[set,s]]]/@Table[{i,j},{j,Select[set,#>i+1&]}];
    Table[Length[twouniflin[Range[n]]],{n,0,14,2}] (* Gus Wiseman, Feb 27 2019 *)
  • PARI
    seq(N) = {
      my(a = vector(N)); a[1] = 0; a[2] = 1;
      for (n = 3, N, a[n] = (2*n-1)*a[n-1] + a[n-2]);
      concat(1, a);
    };
    seq(20) \\ Gheorghe Coserea, Dec 09 2016
    
  • SageMath
    def A278990_list(prec):
        P. = PowerSeriesRing(QQ, prec)
        return P( exp(-1+sqrt(1-2*x))/sqrt(1-2*x) ).egf_to_ogf().list()
    A278990_list(30) # G. C. Greubel, Sep 26 2023

Formula

From Gheorghe Coserea, Dec 09 2016: (Start)
D-finite with recurrence a(n) = (2*n-1)*a(n-1) + a(n-2), with a(0) = 1, a(1) = 0.
E.g.f. y satisfies: 0 = (1-2*x)*y'' - 3*y' - y.
a(n) - a(n-1) = A003436(n) for all n >= 2. (End)
From Vaclav Kotesovec, Sep 15 2017: (Start)
a(n) = sqrt(2)*exp(-1)*(BesselK(1/2 + n, 1)/sqrt(Pi) - i*sqrt(Pi)*BesselI(1/2 + n, -1)), where i is the imaginary unit.
a(n) ~ 2^(n+1/2) * n^n / exp(n+1). (End)
a(n) = A114938(n)/n! - Gus Wiseman, Jul 05 2020 (from Alexander Burstein's formula at A114938).
From G. C. Greubel, Sep 26 2023: (Start)
a(n) = (-1)^n * (i/e)*Sqrt(2/Pi) * BesselK(n + 1/2, -1).
G.f.: sqrt(Pi/(2*x)) * exp(-(1+x)^2/(2*x)) * Erfi((1+x)/sqrt(2*x)).
E.g.f.: exp(-1 + sqrt(1-2*x))/sqrt(1-2*x). (End)

Extensions

a(0)=1 prepended by Gheorghe Coserea, Dec 09 2016

A002119 Bessel polynomial y_n(-2).

Original entry on oeis.org

1, -1, 7, -71, 1001, -18089, 398959, -10391023, 312129649, -10622799089, 403978495031, -16977719590391, 781379079653017, -39085931702241241, 2111421691000680031, -122501544009741683039, 7597207150294985028449, -501538173463478753560673
Offset: 0

Views

Author

Keywords

Comments

Absolute values give denominators of successive convergents to e using continued fraction 1+2/(1+1/(6+1/(10+1/(14+1/(18+1/(22+1/26...)))))).
Absolute values give number of different arrangements of nonnegative integers on a set of n 6-sided dice such that the dice can add to any integer from 0 to 6^n-1. For example when n=2, there are 7 arrangements that can result in any total from 0 to 35. Cf. A273013. The number of sides on the dice only needs to be the product of two distinct primes, of which 6 is the first example. - Elliott Line, Jun 10 2016
Absolute values give number of Krasner factorizations of (x^(6^n)-1)/(x-1) into n polynomials p_i(x), i=1,2,...,n, satisfying p_i(1)=6. In these expressions 6 can be replaced with any product of two distinct primes (Krasner and Ranulac, 1937). - William P. Orrick, Jan 18 2023
Absolute values give number of pairs (s, b) where s is a covering of the 1 X 2n grid with 1 X 2 dimers and equal numbers of red and blue 1 X 1 monomers and b is a bijection between the red monomers and the blue monomers that does not map adjacent monomers to each other. Ilya Gutkovskiy's formula counts such pairs by an inclusion-exclusion argument. The correspondence with Elliott Line's dice problem is that a dimer corresponds to a die containing an arithmetic progression of length 6 and a pair (r, b(r)), where r is a red monomer and b(r) its image under b, corresponds to a die containing the sum of an arithmetic progression of length 2 and an arithmetic progression of length 3. - William P. Orrick, Jan 19 2023

Examples

			Example from _William P. Orrick_, Jan 19 2023: (Start)
For n=2 the Bessel polynomial is y_2(x) = 1 + 3x + 3x^2 which satisfies y_2(-2) = -7.
The |a(2)|=7 dice pairs are
  {{0,1,2,3,4,5}, {0,6,12,18,24,30}},
  {{0,1,2,18,19,20}, {0,3,6,9,12,15}},
  {{0,1,2,9,10,11}, {0,3,6,18,21,24}},
  {{0,1,6,7,12,13}, {0,2,4,18,20,22}},
  {{0,1,12,13,24,25}, {0,2,4,6,8,10}},
  {{0,1,2,6,7,8}, {0,3,12,15,24,27}},
  {{0,1,4,5,8,9}, {0,2,12,14,24,26}}.
The corresponding Krasner factorizations of (x^36-1)/(x-1) are
  {(x^6-1)/(x-1), (x^36-1)/(x^6-1)},
  {((x^36-1)/(x^18-1))*((x^3-1)/(x-1)), (x^18-1)/(x^3-1)},
  {((x^18-1)/(x^9-1))*((x^3-1)/(x-1)), ((x^36-1)/(x^18-1))*((x^9-1)/(x^3-1))},
  {((x^18-1)/(x^6-1))*((x^2-1)/(x-1)), ((x^36-1)/(x^18-1))*((x^6-1)/(x^2-1))},
  {((x^36-1)/(x^12-1))*((x^2-1)/(x-1)), (x^12-1)/(x^2-1)},
  {((x^12-1)/(x^6-1))*((x^3-1)/(x-1)), ((x^36-1)/(x^12-1))*((x^6-1)/(x^3-1))},
  {((x^12-1)/(x^4-1))*((x^2-1)/(x-1)), ((x^36-1)/(x^12-1))*((x^4-1)/(x^2-1))}.
The corresponding monomer-dimer configurations, with dimers, red monomers, and blue monomers represented by the symbols '=', 'R', and 'B', and bijections between red and blue monomers given as sets of ordered pairs, are
  (==, {}),
  (B=R, {(3,1)}),
  (BBRR, {(3,1),(4,2)}),
  (RBBR, {(1,3),(4,2)}),
  (R=B, {(1,3)}),
  (BRRB, {(2,4),(3,1)}),
  (RRBB, {(1,3),(2,4)}).
(End)
		

References

  • L. Euler, 1737.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 77.
  • 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

See also A033815.
Numerators of the convergents of e are A001517, which has a similar interpretation to a(n) in terms of monomer-dimer configurations, but omitting the restriction that adjacent monomers not be mapped to each other by the bijection.
Polynomial coefficients are in A001498.

Programs

  • Maple
    f:=proc(n) option remember; if n <= 1 then 1 else f(n-2)+(4*n-2)*f(n-1); fi; end;
    [seq(f(n), n=0..20)]; # This is for the unsigned version. - N. J. A. Sloane, May 09 2016
    seq(simplify((-1)^n*KummerU(-n, -2*n, -1)), n = 0..17); # Peter Luschny, May 10 2022
  • Mathematica
    Table[(-1)^k (2k)! Hypergeometric1F1[-k, -2k, -1]/k!, {k, 0, 10}] (* Vladimir Reshetnikov, Feb 16 2011 *)
    nxt[{n_,a_,b_}]:={n+1,b,a-2b(2n+1)}; NestList[nxt,{1,1,-1},20][[All,2]] (* Harvey P. Dale, Aug 18 2017 *)
  • PARI
    {a(n)= if(n<0, n=-n-1); sum(k=0, n, (2*n-k)!/ (k!*(n-k)!)* (-1)^(n-k) )} /* Michael Somos, Apr 02 2007 */
    
  • PARI
    {a(n)= local(A); if(n<0, n= -n-1); A= sqrt(1 +4*x +x*O(x^n)); n!*polcoeff( exp((A-1)/2)/A, n)} /* Michael Somos, Apr 02 2007 */
    
  • PARI
    {a(n)= local(A); if(n<0, n= -n-1); n+=2 ; for(k= 1, n, A+= x*O(x^k); A= truncate( (1+x)* exp(A) -1-A) ); A+= x*O(x^n); A-= A^2; -(-1)^n*n!* polcoeff( serreverse(A), n)} /* Michael Somos, Apr 02 2007 */
    
  • Sage
    A002119 = lambda n: hypergeometric([-n, n+1], [], 1)
    [simplify(A002119(n)) for n in (0..17)] # Peter Luschny, Oct 17 2014

Formula

D-finite with recurrence a(n) = -2(2n-1)*a(n-1) + a(n-2). - T. D. Noe, Oct 26 2006
If y = x + Sum_{k>=2} A005363(k)*x^k/k!, then y = x + Sum_{k>=2} a(k-2)(-y)^k/k!. - Michael Somos, Apr 02 2007
a(-n-1) = a(n). - Michael Somos, Apr 02 2007
a(n) = (1/n!)*Integral_{x>=-1} (-x*(1+x))^n*exp(-(1+x)). - Paul Barry, Apr 19 2010
G.f.: 1/Q(0), where Q(k) = 1 - x + 2*x*(k+1)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 17 2013
Expansion of exp(x) in powers of y = x*(1 + x): exp(x) = 1 + y - y^2/2! + 7*y^3/3! - 71*y^4/4! + 1001*y^5/5! - .... E.g.f.: (1/sqrt(4*x + 1))*exp(sqrt(4*x + 1)/2 - 1/2) = 1 - x + 7*x^2/2! - 71*x^3/3! + .... - Peter Bala, Dec 15 2013
a(n) = hypergeom([-n, n+1], [], 1). - Peter Luschny, Oct 17 2014
a(n) = sqrt(Pi/exp(1)) * BesselI(1/2+n, 1/2) + (-1)^n * BesselK(1/2+n, 1/2) / sqrt(exp(1)*Pi). - Vaclav Kotesovec, Jul 22 2015
a(n) ~ (-1)^n * 2^(2*n+1/2) * n^n / exp(n+1/2). - Vaclav Kotesovec, Jul 22 2015
From G. C. Greubel, Aug 16 2017: (Start)
G.f.: (1/(1-t))*hypergeometric2f0(1, 1/2; -; -4*t/(1-t)^2).
E.g.f.: (1+4*t)^(-1/2) * exp((sqrt(1+4*t) - 1)/2). (End)
a(n) = Sum_{k=0..n} (-1)^k*binomial(n,k)*binomial(n+k,k)*k!. - Ilya Gutkovskiy, Nov 24 2017
a(n) = (-1)^n*KummerU(-n, -2*n, -1). - Peter Luschny, May 10 2022

Extensions

More terms from Vladeta Jovovic, Apr 03 2000

A114938 Number of permutations of the multiset {1,1,2,2,...,n,n} with no two consecutive terms equal.

Original entry on oeis.org

1, 0, 2, 30, 864, 39480, 2631600, 241133760, 29083420800, 4467125013120, 851371260364800, 197158144895712000, 54528028997584665600, 17752366094818747392000, 6720318485119046923315200, 2927066537906697348594432000, 1453437879238150456164433920000
Offset: 0

Views

Author

Hugo Pfoertner, Jan 08 2006

Keywords

Comments

a(n) is also the number of (0,1)-matrices A=(a_ij) of size n X 2n such that each row has exactly two 1's and each column has exactly one 1 and with the restriction that no 1 stands on the line from a_11 to a_22. - Shanzhen Gao, Feb 24 2010
a(n) is the number of permutations of the multiset {1,1,2,2,...,n,n} with no fixed points. - Alexander Burstein, May 16 2020
Also the number of 2-uniform ordered set partitions of {1...2n} containing no two successive vertices in the same block. - Gus Wiseman, Jul 04 2020

Examples

			a(2) = 2 because there are two permutations of {1,1,2,2} avoiding equal consecutive terms: 1212 and 2121.
		

References

  • R. P. Stanley, Enumerative Combinatorics Volume I, Cambridge University Press, 1997. Chapter 2, Sieve Methods, Example 2.2.3, page 68.

Crossrefs

Cf. A114939 = preferred seating arrangements of n couples.
Cf. A007060 = arrangements of n couples with no adjacent spouses; A007060(n) = 2^n * A114938(n) (this sequence).
Cf. A278990 = number of loopless linear chord diagrams with n chords.
Cf. A000806 = Bessel polynomial y_n(-1).
The version for multisets with prescribed multiplicities is A335125.
The version for prime indices is A335452.
Anti-run compositions are counted by A003242.
Anti-run compositions are ranked by A333489.
Inseparable partitions are counted by A325535.
Inseparable partitions are ranked by A335448.
Separable partitions are counted by A325534.
Separable partitions are ranked by A335433.
Other sequences involving the multiset {1,1,2,2,...,n,n}: A001147, A007717, A020555, A094574, A316972.
Row n=2 of A322093.

Programs

  • Magma
    [1] cat [n le 2 select 2*(n-1) else n*(2*n-1)*Self(n-1) + (n-1)*n*Self(n-2): n in [1..20]]; // Vincenzo Librandi, Aug 10 2015
    
  • Mathematica
    Table[Sum[Binomial[n,i](2n-i)!/2^(n-i) (-1)^i,{i,0,n}],{n,0,20}]  (* Geoffrey Critzer, Jan 02 2013, and adapted to the extension by Stefano Spezia, Nov 15 2018 *)
    Table[Length[Select[Permutations[Join[Range[n],Range[n]]],!MatchQ[#,{_,x_,x_,_}]&]],{n,0,5}] (* Gus Wiseman, Jul 04 2020 *)
    A114938[n_] := ((2 n)! Hypergeometric1F1[-n, -2 n, -2]) / 2^n;
    Array[A114938, 17, 0]  (* Peter Luschny, Sep 04 2025 *)
  • PARI
    A114938(n)=sum(k=0, n, binomial(n, k)*(-1)^(n-k)*(n+k)!/2^k);
    vector(20, n, A114938(n-1)) \\ Michel Marcus, Aug 10 2015
    
  • SageMath
    def A114938(n): return (-1)^n*sum(binomial(n,k)*factorial(n+k)//(-2)^k for k in range(n+1))
    [A114938(n) for n in range(31)] # G. C. Greubel, Sep 26 2023

Formula

a(n) = Sum_{k=0..n} ((binomial(n, k)*(-1)^(n-k)*(n+k)!)/2^k).
a(n) = (-1)^n * n! * A000806(n), n>0. - Vladeta Jovovic, Nov 19 2009
a(n) = n*(2*n-1)*a(n-1) + (n-1)*n*a(n-2). - Vaclav Kotesovec, Aug 07 2013
a(n) ~ 2^(n+1)*n^(2*n)*sqrt(Pi*n)/exp(2*n+1). - Vaclav Kotesovec, Aug 07 2013
a(n) = n! * A278990(n). - Alexander Burstein, May 16 2020
From G. C. Greubel, Sep 26 2023: (Start)
a(n) = (-1)^n * (i/e)*sqrt(2/Pi) * n! * BesselK(n+1/2, -1).
a(n) = [n! * (1/x) * p_{n+1}(x)]|A104548%20for%20p">{x= -1} (See A104548 for p{n}(x)).
E.g.f.: sqrt(Pi/(2*x)) * exp(-(1+x)^2/(2*x)) * erfi((1+x)/sqrt(2*x)).
Sum_{n >= 0} a(n)*x^n/(n!)^2 = exp(sqrt(1-2*x))/sqrt(1-2*x).
Sum_{n >= 0} a(n)*x^n/(n!*(n+1)!) = ( 1 - exp(-1 + sqrt(1-2*x)) )/x. (End)
a(n) = ((2*n)!/2^n) * hypergeom([-n], [-2*n], -2]) = A007060(n) / 2^n. - Peter Luschny, Sep 04 2025

Extensions

a(0)=1 prepended by Seiichi Manyama, Nov 15 2018

A079267 d(n,s) = number of perfect matchings on {1, 2, ..., n} with s short pairs.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 5, 6, 3, 1, 36, 41, 21, 6, 1, 329, 365, 185, 55, 10, 1, 3655, 3984, 2010, 610, 120, 15, 1, 47844, 51499, 25914, 7980, 1645, 231, 21, 1, 721315, 769159, 386407, 120274, 25585, 3850, 406, 28, 1, 12310199, 13031514, 6539679, 2052309, 446544, 70371, 8106, 666, 36, 1
Offset: 0

Views

Author

Jeremy Martin (martin(AT)math.umn.edu), Feb 05 2003

Keywords

Comments

Read backwards, the n-th row of the triangle gives the Hilbert series of the variety of slopes determined by n points in the plane.
From Paul Barry, Nov 25 2009: (Start)
Reversal of coefficient array for the polynomials P(n,x) = Sum_{k=0..n} (C(n+k,2k)*(2k)!/(2^k*k!))*x^k*(1-x)^(n-k).
Note that P(n,x) = Sum_{k=0..n} A001498(n,k)*x^k*(1-x)^(n-k). (End)
Equivalent to the original definition: Triangle of fixed-point free involutions on [1..2n] (=A001147) by number of cycles with adjacent integers. - Olivier Gérard, Mar 23 2011
Conjecture: Asymptotically, the n-th row has a Poisson distribution with mean 1. - David Callan, Nov 11 2012
This is also the number of configurations of n indistinguishable pairs placed on the vertices of the ladder graph P_1 X P_2n (i.e., a path of length 2n) such that s such pairs are joined by an edge; equivalently the number of "s-domino" configurations in the game of memory played on a 1 X 2n rectangular array, see [Young]. - Donovan Young, Oct 23 2018

Examples

			Triangle begins:
   1
   0  1
   1  1  1
   5  6  3 1
  36 41 21 6 1
From _Paul Barry_, Nov 25 2009: (Start)
Production matrix begins
       0,      1,
       1,      1,      1,
       4,      4,      2,     1,
      18,     18,      9,     3,     1,
      96,     96,     48,    16,     4,    1,
     600,    600,    300,   100,    25,    5,   1,
    4320,   4320,   2160,   720,   180,   36,   6,  1,
   35280,  35280,  17640,  5880,  1470,  294,  49,  7, 1,
  322560, 322560, 161280, 53760, 13440, 2688, 448, 64, 8, 1
Complete this by adding top row (1,0,0,0,...) and take inverse: we obtain
   1,
   0,  1,
  -1, -1,  1,
  -2, -2, -2,  1,
  -3, -3, -3, -3,  1,
  -4, -4, -4, -4, -4,  1,
  -5, -5, -5, -5, -5, -5,  1,
  -6, -6, -6, -6, -6, -6, -6,  1,
  -7, -7, -7, -7, -7, -7, -7, -7,  1,
  -8, -8, -8, -8, -8, -8, -8, -8, -8,  1 (End)
The 6 involutions with no fixed point on [1..6] with only one 2-cycle with adjacent integers are ((1, 2), (3, 5), (4, 6)), ((1, 3), (2, 4), (5, 6)), ((1, 3), (2, 6), (4, 5)), ((1, 5), (2, 3), (4, 6)), ((1, 5), (2, 6), (3, 4)), and ((1, 6), (2, 5), (3, 4)).
		

References

  • G. Kreweras and Y. Poupard, Sur les partitions en paires d'un ensemble fini totalement ordonné, Publications de l'Institut de Statistique de l'Université de Paris, 23 (1978), 57-74.

Crossrefs

Row sums are A001147.
d(2n,n) gives A365744.

Programs

  • Maple
    d := (n,s) -> 1/s! * sum('((-1)^(h-s)*(2*n-h)!/(2^(n-h)*(n-h)!*(h-s)!))','h'=s..n):
    # alternative by R. J. Mathar, Aug 19 2022
    A079267 := proc(n,k)
        option remember ;
        if n =0 and k =0 then
            1;
        elif k > n or k < 0 then
            0;
        else
            procname(n-1,k-1)+(2*n-2-k)*procname(n-1,k)+(k+1)*procname(n-1,k+1) ;
        end if;
    end proc:
    seq(seq( A079267(n,k),k=0..n),n=0..13) ;
  • Mathematica
    nmax = 9; d[n_, s_] := (2^(s-n)*(2n-s)!* Hypergeometric1F1[s-n, s-2n, -2])/ (s!*(n-s)!); Flatten[ Table[d[n, s], {n, 0, nmax}, {s, 0, n}]] (* Jean-François Alcover, Oct 19 2011, after Maple *)
  • PARI
    {T(n, k) = 2^(k-n)*binomial(n,k)*hyperu(k-n, k-2*n, -2)};
    for(n=0,10, for(k=0,n, print1(round(T(n,k)), ", "))) \\ G. C. Greubel, Apr 10 2019
    
  • Sage
    [[2^(k-n)*binomial(n,k)*hypergeometric_U(k-n,k-2*n,-2).simplify_hypergeometric() for k in (0..n)] for n in (0..10)] # G. C. Greubel, Apr 10 2019

Formula

d(n, s) = (1/s!) * Sum_{h=s..n} (((-1)^(h-s)*(2*n-h)!/(2^(n-h)*(n-h)!*(h-s)!))).
E.g.f.: exp((x-1)*(1-sqrt(1-2*y)))/sqrt(1-2*y). - Vladeta Jovovic, Dec 15 2008

Extensions

Extra terms added by Paul Barry, Nov 25 2009

A007060 Number of ways n married couples can sit in a row without any spouses next to each other.

Original entry on oeis.org

1, 0, 8, 240, 13824, 1263360, 168422400, 30865121280, 7445355724800, 2287168006717440, 871804170613555200, 403779880746418176000, 223346806774106790297600, 145427383048755178635264000, 110105698060190464791596236800, 95914116314126658718742347776000, 95252504853751428295192341381120000
Offset: 0

Views

Author

David Roberts Keeney (David.Roberts.Keeney(AT)directory.Reed.edu)

Keywords

Comments

Limit_{n->oo} a(n)/(2n)! = 1/e.
Also the number of (directed) Hamiltonian paths of the n-cocktail party graph. - Eric W. Weisstein, Dec 16 2013
Also the number of ways to label the cells of a 2 X n grid such that no vertically adjacent cells have adjacent labels. - Sela Fried, May 29 2023

Examples

			For n = 2, the a(2) = 8 solutions for the couples {1,2} and {3,4} are {1324, 1423, 2314, 2413, 3142, 3241, 4132, 4231}.
		

Crossrefs

Programs

  • Maple
    seq(add((-1)^i*binomial(n, i)*2^i*(2*n-i)!, i=0..n),n=0..20);
  • Mathematica
    Table[Sum[(-1)^i Binomial[n,i] (2 n - i)! 2^i, {i, 0, n}], {n, 0, 20}]
    Table[(2 n)! Hypergeometric1F1[-n, -2 n, -2], {n, 0, 20}]
  • PARI
    a(n)=sum(k=0, n, binomial(n, k)*(-1)^(n-k)*(n+k)!*2^(n-k)) \\ Charles R Greathouse IV, May 11 2016
    
  • Python
    from sympy import binomial, subfactorial
    def a(n): return sum([(-1)**(n - k)*binomial(n, k)*subfactorial(2*k) for k in range(n + 1)]) # Indranil Ghosh, Apr 28 2017

Formula

a(n) = (Pi*BesselI(n+1/2,1)*(-1)^n+BesselK(n+1/2,1))*exp(-1)*(2/Pi)^(1/2)*2^n*n!. - Mark van Hoeij, Nov 12 2009
a(n) = (-1)^n*2^n*n!*A000806(n), n>0. - Vladeta Jovovic, Nov 19 2009
a(n) = n!*hypergeom([-n, n+1],[],1/2)*(-2)^n. - Mark van Hoeij, Nov 13 2009
a(n) = 2^n * A114938(n). - Toby Gottfried, Nov 22 2010
a(n) = 2*n((2*n-1)*a(n-1) + (2*n-2)*a(n-2)), n > 1. - Aaron Meyerowitz, May 14 2014
From Peter Bala, Mar 06 2015: (Start)
a(n) = Sum_{k = 0..n} (-1)^(n-k)*binomial(n,k)*A000166(2*k).
For n >= 1, Integral_{x = 0..1} (x^2 - 1)^n*exp(x) dx = a(n)*e - A177840(n). Hence lim_{n->oo} A177840(n)/a(n) = e. (End)
a(n) ~ sqrt(Pi) * 2^(2*n+1) * n^(2*n + 1/2) / exp(2*n+1). - Vaclav Kotesovec, Mar 09 2016

Extensions

More terms from Michel ten Voorde, Apr 11 2001
Showing 1-10 of 30 results. Next