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

A000255 a(n) = n*a(n-1) + (n-1)*a(n-2), a(0) = 1, a(1) = 1.

Original entry on oeis.org

1, 1, 3, 11, 53, 309, 2119, 16687, 148329, 1468457, 16019531, 190899411, 2467007773, 34361893981, 513137616783, 8178130767479, 138547156531409, 2486151753313617, 47106033220679059, 939765362752547227, 19690321886243846661, 432292066866171724421
Offset: 0

Views

Author

Keywords

Comments

a(n) counts permutations of [1,...,n+1] having no substring [k,k+1]. - Len Smiley, Oct 13 2001
Also, for n > 0, determinant of the tridiagonal n X n matrix M such that M(i,i)=i and for i=1..n-1, M(i,i+1)=-1, M(i+1,i)=i. - Mario Catalani (mario.catalani(AT)unito.it), Feb 04 2003
Also, for n > 0, maximal permanent of a nonsingular n X n (0,1)-matrix, which is achieved by the matrix with just n-1 0's, all on main diagonal. [For proof, see next entry.] - W. Edwin Clark, Oct 28 2003
Proof from Richard Brualdi and W. Edwin Clark, Nov 15 2003: Let n >= 4. Take an n X n (0,1)-matrix A which is nonsingular. It has t >= n-1, 0's, otherwise there will be two rows of all 1's. Let B be the matrix obtained from A by replacing t-(n-1) of A's 0's with 1's. Let D be the matrix with all 1's except for 0's in the first n-1 positions on the diagonal. This matrix is easily seen to be non-singular. Now we have per(A) < = per(B) < = per (D), where the first inequality follows since replacing 0's by 1's cannot decrease the permanent and the second from Corollary 4.4 in the Brualdi et al. reference, which shows that per(D) is the maximum permanent of ANY n X n matrix with n -1 0's. Corollary 4.4 requires n >= 4. a(n) for n < 4 can be computed directly.
With offset 1, permanent of (0,1)-matrix of size n X (n+d) with d=1 and n zeros not on a line. This is a special case of Theorem 2.3 of Seok-Zun Song et al., Extremes of permanents of (0,1)-matrices, pp. 201-202. - Jaap Spies, Dec 12 2003
Number of fixed-point-free permutations of n+2 that begin with a 2; e.g., for 1234, we have 2143, 2341, 2413, so a(2)=3. Also number of permutations of 2..n+2 that have no agreements with 1..n+1. E.g., for 123 against permutations of 234, we have 234, 342 and 432. Compare A047920. - Jon Perry, Jan 23 2004. [This can be proved by the standard argument establishing that d(n+2) = (n+1)(d(n+1)+d(n)) for derangements A000166 (n+1 choices of where 1 goes, then either 1 is in a transposition, or in a cycle of length at least 3, etc.). - D. G. Rogers, Aug 28 2006]
Stirling transform of A006252(n+1)=[1,1,2,4,14,38,...] is a(n)=[1,3,11,53,309,...]. - Michael Somos, Mar 04 2004
a(n+1) is the sequence of numerators of the self-convergents to 1/(e-2); see A096654. - Clark Kimberling, Jul 01 2004
Euler's interpretation was "fixedpoint-free permutations beginning with 2" and he listed the terms up to 148329 (although he was blind at the time). - Don Knuth, Jan 25 2007
Equals lim_{k->infinity} A153869^k. - Gary W. Adamson, Jan 03 2009
Hankel transform is A059332. - Paul Barry, Apr 22 2009
This sequence appears in the analysis of Euler's divergent series 1 - 1! + 2! - 3! + 4! ... by Lacroix, see Hardy. For information about this and related divergent series see A163940. - Johannes W. Meijer, Oct 16 2009
a(n), n >= 1, enumerates also the ways to distribute n beads, labeled differently from 1 to n, over a set of (unordered) necklaces, excluding necklaces with exactly one bead, and one open cord allowed to have any number of beads. Each beadless necklace as well as the beadless cord contributes a factor 1 in the counting, e.g., a(0):=1*1=1. There are k! possibilities for the cord with k>=0 beads, which means that the two ends of the cord should be considered as fixed, in short: a fixed cord. This produces for a(n) the exponential (aka binomial) convolution of the sequences {n!=A000142(n)} and the subfactorials {A000166(n)}.
See the formula below. Alternatively, the e.g.f. for this problem is seen to be (exp(-x)/(1-x))*(1/(1-x)), namely the product of the e.g.f.s for the subfactorials (from the unordered necklace problem, without necklaces with exactly one bead) and the factorials (from the fixed cord problem). Therefore the recurrence with inputs holds also. a(0):=1. This comment derives from a family of recurrences found by Malin Sjodahl for a combinatorial problem for certain quark and gluon diagrams (Feb 27 2010). - Wolfdieter Lang, Jun 02 2010
a(n) = (n-1)a(n-1) + (n-2)a(n-2) gives the same sequence offset by a 1. - Jon Perry, Sep 20 2012
Also, number of reduced 2 X (n+2) Latin rectangles. - A.H.M. Smeets, Nov 03 2013
Second column of Euler's difference table (second diagonal in example of A068106). - Enrique Navarrete, Dec 13 2016
If we partition the permutations of [n+2] in A000166 according to their starting digit, we will get (n+1) equinumerous classes each of size a(n) (the class starting with the digit 1 is empty since no derangement starts with 1). Hence, A000166(n+2)=(n+1)*a(n), so a(n) is the size of each nonempty class of permutations of [n+2] in A000166. For example, for n=3 we have 44=4*11 (see link). - Enrique Navarrete, Jan 11 2017
For n >= 1, the number of circular permutations (in cycle notation) on [n+2] that avoid substrings (j,j+2), 1 <= j <= n. For example, for n=2, the 3 circular permutations in S4 that avoid substrings {13,24} are (1234),(1423),(1432). Note that each of these circular permutations represent 4 permutations in one-line notation (see link 2017). - Enrique Navarrete, Feb 15 2017
The sequence a(n) taken modulo a positive integer k is periodic with exact period dividing k when k is even and dividing 2*k when k is odd. This follows from the congruence a(n+k) = (-1)^k*a(n) (mod k) holding for all n and k, which in turn is easily proved by induction making use of the given recurrences. - Peter Bala, Nov 21 2017
Number of permutations of [n] where the k-th fixed points are k-colored and all other points are unicolored. - Alois P. Heinz, Apr 28 2025

Examples

			a(3)=11: 1 3 2 4; 1 4 3 2; 2 1 4 3; 2 4 1 3; 3 2 1 4; 3 2 4 1; 4 1 3 2; 4 2 1 3; 4 3 2 1; 2 4 3 1; 3 1 4 2. The last two correspond to (n-1)*a(n-2) since they contain a [j,n+1,j+1].
Cord-necklaces problem. For n=4 one considers the following weak two part compositions of 4: (4,0), (2,2), (1,3), and (0,4), where (3,1) does not appear because there are no necklaces with 1 bead. These compositions contribute respectively 4!*1, (binomial(4,2)*2)*sf(2), (binomial(4,1)*1)*sf(3), and 1*sf(4) with the subfactorials sf(n):=A000166(n) (see the necklace comment there). This adds up as 24 + 6*2 + 4*2 + 9 = 53 = a(4). - _Wolfdieter Lang_, Jun 02 2010
G.f. = 1 + x + 3*x^2 + 11*x^3 + 53*x^4 + 309*x^5 + 2119*x^6 + 16687*x^7 + ...
		

References

  • Richard A. Brualdi and Herbert J. Ryser, Combinatorial Matrix Theory, Camb. Univ. Press, 1991, Section 7.2, p. 202.
  • Charalambos A. Charalambides, Enumerative Combinatorics, Chapman & Hall/CRC, Boca Raton, Florida, 2002, p. 179, Table 5.4 and p. 177 (5.1).
  • CRC Handbook of Combinatorial Designs, 1996, p. 104.
  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, pp. 263-264. See Table 7.5.1, row 0; also Table 7.6.1, row 0.
  • John Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 188.
  • 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).
  • N. Ya. Vilenkin, Combinatorics, pp. 54 - 56, Academic Press, 1971. Caravan in the Desert, E_n = a(n-1), n >= 1.

Crossrefs

Row sums of triangle in A046740. A diagonal of triangle in A068106.
A052655 gives occurrence count for non-singular (0, 1)-matrices with maximal permanent, A089475 number of different values of permanent, A089480 occurrence counts for permanents all non-singular (0, 1)-matrices, A087982, A087983.
A diagonal in triangle A010027.
a(n) = A086764(n+1,1).

Programs

  • Haskell
    a000255 n = a000255_list !! n
    a000255_list = 1 : 1 : zipWith (+) zs (tail zs) where
       zs = zipWith (*) [1..] a000255_list
    -- Reinhard Zumkeller, Dec 05 2011
    
  • Magma
    I:=[1, 3]; [1] cat  [n le 2 select I[n] else n*Self(n-1)+(n-1)*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Aug 09 2018
  • Maple
    a := n -> hypergeom([2,-n], [], 1)*(-1)^n:
    seq(simplify(a(n)), n=0..19); # Peter Luschny, Sep 20 2014
    seq(simplify(KummerU(-n, -n-1, -1)), n=0..21); # Peter Luschny, May 10 2022
  • Mathematica
    c = CoefficientList[Series[Exp[ -z]/(1 - z)^2, {z, 0, 30}], z]; For[n = 0, n < 31, n++; Print[c[[n]]*(n - 1)! ]]
    Table[Subfactorial[n] + Subfactorial[n + 1], {n, 0, 20}] (* Zerinvary Lajos, Jul 09 2009 *)
    RecurrenceTable[{a[n]==n a[n-1]+(n-1)a[n-2],a[0]==1,a[1]==1},a[n], {n,20}] (* Harvey P. Dale, May 10 2011 *)
    a[ n_] := If[ n < 0, 0, Round[ n! (n + 2) / E]] (* Michael Somos, Jun 01 2013 *)
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ Exp[ -x] / (1 - x)^2, {x, 0, n}]] (* Michael Somos, Jun 01 2013 *)
    a[ n_] := If[ n < 0, 0, (-1)^n HypergeometricPFQ[ {- n, 2}, {}, 1]] (* Michael Somos, Jun 01 2013 *)
    sa[k_Integer]/;k>=2 := SparseArray[{{i_, i_} -> i, Band[{2, 1}] -> -1, {i_, j_} /; (i == j - 1) :> i}, {k, k}]; {1, 1}~Join~Array[Det[sa[#]] &, 20, 2] (* Shenghui Yang, Oct 15 2024 *)
  • PARI
    {a(n) = if( n<0, 0, contfracpnqn( matrix( 2, n, i, j, j - (i==1)))[1, 1])};
    
  • PARI
    {a(n) = if( n<0, 0, n! * polcoeff( exp( -x + x * O(x^n)) / (1 - x)^2, n))};
    
  • Sage
    from sage.combinat.sloane_functions import ExtremesOfPermanentsSequence2
    e = ExtremesOfPermanentsSequence2()
    it = e.gen(1,1,1)
    [next(it) for i in range(20)]
    # Zerinvary Lajos, May 15 2009
    

Formula

E.g.f.: exp(-x)/(1-x)^2.
a(n) = Sum_{k=0..n} (-1)^k * (n-k+1) * n!/k!. - Len Smiley
Inverse binomial transform of (n+1)!. - Robert A. Stump (bee_ess107(AT)yahoo.com), Dec 09 2001
a(n-2) = !n/(n - 1) where !n is the subfactorial of n, A000166(n). - Lekraj Beedassy, Jun 18 2002
a(n) = floor((1/e)*n!*(n+2)+1/2). - Benoit Cloitre, Jan 15 2004
Apparently lim_{n->infinity} log(n) - log(a(n))/n = 1. - Gerald McGarvey, Jun 12 2004
a(n) = (n*(n+2)*a(n-1) + (-1)^n)/(n+1) for n >= 1, a(0)=1. See the Charalambides reference.
a(n) = GAMMA(n+3,-1)*exp(-1)/(n+1) (incomplete Gamma function). - Mark van Hoeij, Nov 11 2009
a(n) = A000166(n) + A000166(n+1).
A002469(n) = (n-2)*a(n-1) + A000166(n). - Gary W. Adamson, Apr 17 2009
If we take b(n) = (-1)^(n+1)*a(n) for n > 0, then for n > 1 the arithmetic mean of the first n terms is -b(n-1). - Franklin T. Adams-Watters, May 20 2010
a(n) = hypergeometric([2,-n],[],1)*(-1)^n = KummerU(2,3+n,-1)*(-1)^n. See the Abramowitz-Stegun handbook (for the reference see e.g. A103921) p. 504, 13.1.10, and for the recurrence p. 507, 13.4.16. - Wolfdieter Lang, May 20 2010
a(n) = n!*(1 + Sum_{k=0..n-2} sf(n-k)/(n-k)!) with the subfactorials sf(n):= A000166(n) (this follows from the exponential convolution). - Wolfdieter Lang, Jun 02 2010
a(n) = 1/(n+1)*floor(((n+1)!+1)/e). - Gary Detlefs, Jul 11 2010
a(n) = (Subfactorial(n+2))/(n+1). - Alexander R. Povolotsky, Jan 26 2011
G.f.: 1/(1-x-2x^2/(1-3x-6x^2/(1-5x-12x^2/(1-7x-20x^2/(1-.../(1-(2n+1)x-(n+1)(n+2)x^2/(1-... (continued fraction). - Paul Barry, Apr 11 2011
G.f.: hypergeom([1,2],[],x/(x+1))/(x+1). - Mark van Hoeij, Nov 07 2011
From Sergei N. Gladkovskii, Sep 24 2012 - Feb 05 2014: (Start)
Continued fractions:
E.g.f. 1/E(0) where E(k) = 1 - 2*x/(1 + x/(2 - x - 2/(1 + x*(k+1)/E(k+1)))).
G.f.: S(x)/x - 1/x = Q(0)/x - 1/x where S(x) = Sum_{k>=0} k!*(x/(1+x))^k, Q(k) = 1 + (2*k + 1)*x/(1 + x - 2*x*(1+x)*(k+1)/(2*x*(k+1) + (1+x)/Q(k+1))).
G.f.: 1/Q(0) where Q(k) = 1 + x - x*(k+2)/(1 - x*(k+1)/Q(k+1)).
G.f.: 1/x/Q(0) where Q(k) = 1/x - (2*k+1) - (k+2)*(k+1)/Q(k+1).
G.f.: (1+x)/(x*Q(0)) - 1/x where Q(k) = 1 - 2*k*x - x^2*(k + 1)^2/Q(k+1).
G.f.: 2/x/G(0) - 1/x where G(k) = 1 + 1/(1 - x*(2*k+2)/(x*(2*k+1) - 1 + x*(2*k+2)/ G(k+1))).
G.f.: ((Sum_{k>=0} k!*(x/(1+x))^k) - 1)/x = Q(0)/(2*x) - 1/x where Q(k) = 1 + 1/(1 - x*(k+1)/(x*(k+1) + (1+x)/Q(k+1))).
G.f.: W(0) where W(k) = 1 - x*(k+1)/(x*(k+1) - 1/(1 - x*(k+2)/(x*(k+1) - 1/W(k+1)))).
G.f.: G(0)/(1-x) where G(k) = 1 - x^2*(k+1)*(k+2)/(x^2*(k+1)*(k+2) - (1-x*(1+2*k))*(1-x*(3+2*k))/G(k+1)). (End)
From Peter Bala, Sep 20 2013: (Start)
The sequence b(n) := n!*(n + 2) satisfies the defining recurrence for a(n) but with the starting values b(0) = 2 and b(1) = 3. This leads to the finite continued fraction expansion a(n) = n!*(n+2)*( 1/(2 + 1/(1 + 1/(2 + 2/(3 + ... + (n-1)/n)))) ), valid for n >= 2.
Also a(n) = n!*(n+2)*( Sum_{k = 0..n} (-1)^k/(k+2)! ). Letting n -> infinity gives the infinite continued fraction expansion 1/e = 1/(2 + 1/(1 + 1/(2 + 2/(3 + ... + (n-1)/(n + ...)))) ) due to Euler. (End)
0 = a(n)*(+a(n+1) + 2*a(n+2) - a(n+3)) + a(n+1)*(+2*a(n+2) - a(n+3)) + a(n+2)*(+a(n+2)) if n >= 0. - Michael Somos, May 06 2014
a(n-3) = (n-2)*A000757(n-2) + (2*n-5)*A000757(n-3) + (n-3)*A000757(n-4), n >= 3. - Luis Manuel Rivera Martínez, Mar 14 2015
a(n) = A000240(n) + A000240(n+1), n >= 1. Let D(n) = A000240(n) be the permutations of [n] having no substring in {12,23,...,(n-1)n,n1}. Let d(n) = a(n-1) be the permutations of [n] having no substring in {12,23,...,(n-1)n}. Let d_n1 = A000240(n-1) be the permutations of [n] that have the substring n1 but no substring in {12,23,...,(n-1)n}. Then the link "Forbidden Patterns" shows the bijection d_n1 ~ D(n-1) and since dn = d_n1 U D(n), we get dn = D(n-1) U D(n). Taking cardinalities we get the result for n-1, i.e., a(n-1) = A000240(n-1) + A000240(n). For example, for n=4 in this last equation, we get a(4) = 11 = 3+8. - Enrique Navarrete, Jan 16 2017
a(n) = (n+1)!*hypergeom([-n], [-n-1], -1). - Peter Luschny, Nov 02 2018
Sum_{n>=0} (-1)^n*n!/(a(n)*a(n+1)) = e - 2 (Herzig, 1998). - Amiram Eldar, Mar 07 2022
a(n) = KummerU(-n, -n - 1, -1). - Peter Luschny, May 10 2022

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

Original entry on oeis.org

0, 1, 2, 7, 32, 181, 1214, 9403, 82508, 808393, 8743994, 103459471, 1328953592, 18414450877, 273749755382, 4345634192131, 73362643649444, 1312349454922513, 24796092486996338, 493435697986613143, 10315043624498196944
Offset: 0

Views

Author

Keywords

Comments

With offset 1, permanent of (0,1)-matrix of size n X (n+d) with d=2 and n zeros not on a line. This is a special case of Theorem 2.3 of Seok-Zun Song et al. Extremes of permanents of (0,1)-matrices, pp. 201-202. - Jaap Spies, Dec 12 2003
Starting (1, 2, 7, 32, ...) = inverse binomial transform of A001710 starting (1, 3, 12, 60, 360, 2520, ...). - Gary W. Adamson, Dec 25 2008
This sequence appears in Euler's analysis of the divergent series 1 - 1! + 2! - 3! + 4! ..., see Sandifer. For information about this and related divergent series see A163940. - Johannes W. Meijer, Oct 16 2009
a(n+1)=:b(n), n>=1, enumerates the ways to distribute n beads labeled differently from 1 to n, over a set of (unordered) necklaces, excluding necklaces with exactly one bead, and two indistinguishable, ordered, fixed cords, each allowed to have any number of beads. Beadless necklaces as well as beadless cords contribute each a factor 1 in the counting, e.g., b(0):= 1*1 = 1. See A000255 for the description of a fixed cord with beads.
This produces for b(n) the exponential (aka binomial) convolution of the subfactorial sequence {A000166(n)} and {(n+1)!}={A000042(n+1)}. This follows from the general problem with only k indistinguishable, ordered, fixed cords which has e.g.f. 1/(1-x)^k, and the pure necklace problem (no necklaces with one bead allowed) with e.g.f. for the subfactorials. Therefore also the recurrence b(n) = (n+1)*b(n-1) + (n-1)*b(n-2) with b(-1)=0 and b(0)=1 holds.
This comment derives from a family of recurrences found by Malin Sjodahl for a combinatorial problem for certain quark and gluon diagrams (Feb 27 2010). - Wolfdieter Lang, Jun 02 2010
a(n) is a function of the subfactorials..sf... A000166(n) a(n) = (n*sf(n+1) - (n+1)*sf(n))/(2*n*(n-1)*(n+1)),n>1, with offset 1. - Gary Detlefs, Nov 06 2010
For even k the sequence a(n) (mod k) is purely periodic with exact period a divisor of k, while for odd k the sequence a(n) (mod k) is purely periodic with exact period a divisor of 2*k. See A047974. - Peter Bala, Dec 04 2017

Examples

			Necklaces and 2 cords problem. For n=4 one considers the following weak 2 part compositions of 4: (4,0), (3,1), (2,2), and (0,4), where (1,3) does not appear because there are no necklaces with 1 bead. These compositions contribute respectively sf(4)*1,binomial(4,3)*sf(3)*c2(1), (binomial(4,2)*sf(2))*c2(2), and 1*c2(4) with the subfactorials sf(n):=A000166(n) (see the necklace comment there) and the c2(n):=(n+1)! numbers for the pure 2 cord problem (see the above given remark on the e.g.f. for the k cords problem; here for k=2: 1/(1-x)^2). This adds up as 9 + 4*2*2 + (6*1)*6 + 120 = 181 = b(4) = A000153(5). - _Wolfdieter Lang_, Jun 02 2010
G.f. = x + 2*x^2 + 7*x^3 + 32*x^4 + 181*x^5 + 1214*x^6 + 9403*x^7 + 82508*x^8 + ...
		

References

  • Brualdi, Richard A. and Ryser, Herbert J., Combinatorial Matrix Theory, Cambridge NY (1991), Chapter 7.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 188.
  • 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

Cf. A001710. - Gary W. Adamson, Dec 25 2008
a(n) = A086764(n + 1, 2). A000255 (necklaces with one cord). - Wolfdieter Lang, Jun 02 2010

Programs

  • Haskell
    a000153 n = a000153_list !! n
    a000153_list = 0 : 1 : zipWith (+)
       (zipWith (*) [0..] a000153_list) (zipWith (*) [2..] $ tail a000153_list)
    -- Reinhard Zumkeller, Mar 05 2012
    
  • Maple
    f:= n-> floor(((n+1)!+1)/e): g:=n-> (n*f(n+1)-(n+1)*f(n))/(2*n*(n-1)*(n+1)):seq( g(n), n=2..20); # Gary Detlefs, Nov 06 2010
    a := n -> `if`(n=0,0,hypergeom([3,-n+1],[],1))*(-1)^(n+1); seq(simplify(a(n)), n=0..20); # Peter Luschny, Sep 20 2014
    0, seq(simplify(KummerU(-n + 1, -n - 1, -1)), n = 1..20); # Peter Luschny, May 10 2022
  • Mathematica
    nn = 20; Prepend[Range[0, nn]!CoefficientList[Series[Exp[-x]/(1 - x)^3, {x, 0, nn}], x], 0]  (* Geoffrey Critzer, Oct 28 2012 *)
    RecurrenceTable[{a[0]==0,a[1]==1,a[n]==n a[n-1]+(n-2)a[n-2]},a,{n,20}] (* Harvey P. Dale, May 08 2013 *)
    a[ n_] := If[ n < 1, 0, (n - 1)! SeriesCoefficient[ Exp[ -x] / (1 - x)^3, {x, 0, n - 1}]]; (* Michael Somos, Jun 01 2013 *)
    a[ n_] := SeriesCoefficient[ HypergeometricPFQ[ {1, 3}, {}, x / (x + 1)] x / (x + 1), {x, 0, n}]; (* Michael Somos, Jun 01 2013 *)
  • PARI
    x='x+O('x^66); concat([0],Vec(x*serlaplace(exp(-x)/(1-x)^3)))  \\ Joerg Arndt, May 08 2013
  • Sage
    it = sloane.A000153.gen(0,1,2); [next(it) for i in range(21)] # Zerinvary Lajos, May 15 2009
    

Formula

E.g.f.: ( 1 - x )^(-3)*exp(-x), for offset 1.
a(n) = round(1/2*(n^2 + 3*n + 1)*n!/exp(1))/n , n>=1. - Simon Plouffe, Mar 1993
a(n) = (1/2) * A055790(n). - Gary Detlefs, Jul 12 2010
G.f.: hypergeom([1,3],[],x/(x+1))/(x+1). - Mark van Hoeij, Nov 07 2011
G.f.: (1+x)^2/(2*x*Q(0)) - 1/(2*x) - 1, where Q(k) = 1 - 2*k*x - x^2*(k + 1)^2/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 08 2013
G.f.: -1/G(0), where G(k) = 1 + 1/(1 - (1+x)/(1 + x*(k+1)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 01 2013
G.f.: x/Q(0), where Q(k) = 1 - 2*x*(k+1) - x^2*(k+1)*(k+3)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 02 2013
a(n) = hypergeom([3, -n+1], [], 1)*(-1)^(n+1) for n>=1. - Peter Luschny, Sep 20 2014
a(n) = KummerU(-n + 1, -n - 1, -1) for n >= 1. - Peter Luschny, May 10 2022
a(n) = (n^2 + 3*n + 1)*Gamma(n,-1)/(2*exp(1)) + (1 + n/2)*(-1)^n for n >= 1. - Martin Clever, Apr 06 2023

A001909 a(n) = n*a(n-1) + (n-4)*a(n-2), a(2) = 0, a(3) = 1.

Original entry on oeis.org

0, 1, 4, 21, 134, 1001, 8544, 81901, 870274, 10146321, 128718044, 1764651461, 25992300894, 409295679481, 6860638482424, 121951698034461, 2291179503374234, 45361686034627361, 943892592746534964, 20592893110265899381, 470033715095287415734
Offset: 2

Views

Author

Keywords

Comments

With offset 1, permanent of (0,1)-matrix of size n X (n+d) with d=4 and n zeros not on a line. This is a special case of Theorem 2.3 of Seok-Zun Song et al. Extremes of permanents of (0,1)-matrices, pp. 201-202. - Jaap Spies, Dec 12 2003
a(n+3)=:b(n), n>=1, enumerates the ways to distribute n beads labeled differently from 1 to n, over a set of (unordered) necklaces, excluding necklaces with exactly one bead, and four indistinguishable, ordered, fixed cords, each allowed to have any number of beads. Beadless necklaces as well as a beadless cords contribute each a factor 1 in the counting, e.g., b(0):= 1*1 =1. See A000255 for the description of a fixed cord with beads.
This produces for b(n) the exponential (aka binomial) convolution of the subfactorial sequence {A000166(n)} and the sequence {A001715 (n+3)}. See the necklaces and cords problem comment in A000153. Therefore also the recurrence b(n) = (n+3)*b(n-1) + (n-1)*b(n-2) with b(-1)=0 and b(0)=1 holds. This comment derives from a family of recurrences found by Malin Sjodahl for a combinatorial problem for certain quark and gluon diagrams (Feb 27 2010). - Wolfdieter Lang, Jun 02 2010

Examples

			Necklaces and four cords problem. For n=4 one considers the following weak 2 part compositions of 4: (4,0), (3,1), (2,2), and (0,4), where (1,3) does not appear because there are no necklaces with 1 bead. These compositions contribute respectively sf(4)*1, binomial(4,3)*sf(3)*c4(1), (binomial(4,2)*sf(2))*c4(2), and 1*c4(4) with the subfactorials sf(n):=A000166(n) (see the necklace comment there) and the c4(n):=A001715(n+3) = (n+3)!/3! numbers for the pure 4 cord problem (see the remark on the e.g.f. for the k cords problem in A000153; here for k=4: 1/(1-x)^4). This adds up as 9 + 4*2*4 + (6*1)*20 + 840 = 1001 = b(4) = A001909(7). - _Wolfdieter Lang_, Jun 02 2010
x^3 + 4*x^4 + 21*x^5 + 134*x^6 + 1001*x^7 + 8544*x^8 + 81901*x^9 + 870274*x^10 + ...
		

References

  • Brualdi, Richard A. and Ryser, Herbert J., Combinatorial Matrix Theory, Cambridge NY (1991), Chapter 7.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 188.
  • 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

Cf. A000255, A000153, A000261, A001910, A090010, A055790, A090012-A090016, A086764. A000261 (necklaces and three cords).

Programs

  • Maple
    a := n -> `if`(n<4,n-2,hypergeom([5,-n+3],[],1))*(-1)^(n+1);
    seq(round(evalf(a(n), 100)), n=2..22); # Peter Luschny, Sep 20 2014
  • Mathematica
    t = {0, 1}; Do[AppendTo[t, n*t[[-1]] + (n-4)*t[[-2]]], {n, 4, 20}]; t (* T. D. Noe, Aug 17 2012 *)
    nxt[{n_,a_,b_}]:={n+1,b,b(n+1)+a(n-3)}; NestList[nxt,{3,0,1},20][[All,2]] (* Harvey P. Dale, Jul 17 2018 *)
  • PARI
    {a(n) = if( n<2, 0, -contfracpnqn( matrix(2, n, i, j, j - 4*(i==1))) [1, 1])} /* Michael Somos, Feb 19 2003 */

Formula

a(n) = A086764(n+1,4), n>=2.
E.g.f.: exp(-x) / (1 - x)^5 = Sum_{k>=0} a(k+3) * x^k / k!. - Michael Somos, Feb 19 2003
G.f.: x*hypergeom([1,5],[],x/(x+1))/(x+1). - Mark van Hoeij, Nov 07 2011
a(n) = hypergeom([5,-n+3],[],1)*(-1)^(n+1) for n>=3. - Peter Luschny, Sep 20 2014

A047920 Triangular array formed from successive differences of factorial numbers.

Original entry on oeis.org

1, 1, 0, 2, 1, 1, 6, 4, 3, 2, 24, 18, 14, 11, 9, 120, 96, 78, 64, 53, 44, 720, 600, 504, 426, 362, 309, 265, 5040, 4320, 3720, 3216, 2790, 2428, 2119, 1854, 40320, 35280, 30960, 27240, 24024, 21234, 18806, 16687, 14833, 362880, 322560
Offset: 0

Views

Author

Keywords

Comments

Number of permutations of 1,2,...,k,n+1,n+2,...,2n-k that have no agreements with 1,...,n. For example, consider 1234 and 1256, then n=4 and k=2, so T(4,2)=14. Compare A000255 for the case k=1. - Jon Perry, Jan 23 2004
From Emeric Deutsch, Apr 21 2009: (Start)
T(n-1,k-1) is the number of non-derangements of {1,2,...,n} having smallest fixed point equal to k. Example: T(3,1)=4 because we have 4213, 4231, 3214, and 3241 (the permutations of {1,2,3,4} having smallest fixed equal to 2).
Row sums give the number of non-derangement permutations of {1,2,...,n} (A002467).
Mirror image of A068106.
Closely related to A134830, where each row has an extra term (see the Charalambides reference).
(End)
T(n,k) is the number of permutations of {1..n} that don't fix the points 1..k. - Robert FERREOL, Aug 04 2016

Examples

			Triangle begins:
    1;
    1,  0;
    2,  1,  1;
    6,  4,  3,  2;
   24, 18, 14, 11,  9;
  120, 96, 78, 64, 53, 44;
  ...
The left-hand column is the factorial numbers (A000142). The other numbers in the row are calculated by subtracting the numbers in the previous row. For example, row 4 is 6, 4, 3, 2, so row 5 is 4! = 24, 24 - 6 = 18, 18 - 4 = 14, 14 - 3 = 11, 11 - 2 = 9. - _Michael B. Porter_, Aug 05 2016
		

References

  • Ch. A. Charalambides, Enumerative Combinatorics, Chapman & Hall/CRC, Boca Raton, Florida, 2002, p. 176, Table 5.3. [From Emeric Deutsch, Apr 21 2009]

Crossrefs

Columns give A000142, A001563, A001564, etc. Cf. A047922.
See A068106 for another version of this triangle.
Orthogonal columns: A000166, A000255, A055790. Main diagonal A033815.
Cf. A002467, A068106, A134830. - Emeric Deutsch, Apr 21 2009
Cf. A155521.
T(n+2,n) = 2*A000153(n+1). T(n+3,n) = 6*A000261(n+2). T(n+4,n) = 24*A001909(n+3). T(n+5, n) = 120*A001910(n+4). T(n+6,n) = 720*A176732(n).
T(n+7,n) = 5040*A176733(n) - Richard R. Forberg, Dec 29 2013

Programs

  • Haskell
    a047920 n k = a047920_tabl !! n !! k
    a047920_row n = a047920_tabl !! n
    a047920_tabl = map fst $ iterate e ([1], 1) where
       e (row, n) = (scanl (-) (n * head row) row, n + 1)
    -- Reinhard Zumkeller, Mar 05 2012
    
  • Maple
    d[0] := 1: for n to 15 do d[n] := n*d[n-1]+(-1)^n end do: T := proc (n, k) if k <= n then sum(binomial(n-k, j)*d[n-j], j = 0 .. n-k) else 0 end if end proc: for n from 0 to 9 do seq(T(n, k), k = 0 .. n) end do; # yields sequence in triangular form - Emeric Deutsch, Jul 17 2009
    # second Maple program:
    T:= proc(n, k) option remember;
         `if`(k=0, n!, T(n, k-1)-T(n-1, k-1))
        end:
    seq(seq(T(n, k), k=0..n), n=0..12);  # Alois P. Heinz, Sep 01 2021
  • Mathematica
    t[n_, k_] = Sum[(-1)^j*Binomial[k, j]*(n-j)!, {j, 0, n}]; Flatten[Table[t[n, k], {n, 0, 9}, {k, 0, n}]][[1 ;; 47]] (* Jean-François Alcover, May 17 2011, after Philippe Deléham *)
    T[n_, k_] := n! Hypergeometric1F1[-k, -n, -1];
    Table[T[n, k], {n, 0, 7}, {k, 0, n}] // Flatten  (* Peter Luschny, Jul 28 2024 *)
  • PARI
    row(n) = vector(n+1, k, k--; sum(j=0, n, (-1)^j * binomial(k, j)*(n-j)!)); \\ Michel Marcus, Sep 04 2021

Formula

t(n, k) = t(n, k-1) - t(n-1, k-1) = t(n, k+1) - t(n-1, k) = n*t(n-1, k) + k*t(n-2, k-1) = (n-1)*t(n-1, k-1) + (k-1)*t(n-2, k-2) = A060475(n, k)*(n-k)!. - Henry Bottomley, Mar 16 2001
T(n, k) = Sum_{j>=0} (-1)^j * binomial(k, j)*(n-j)!. - Philippe Deléham, May 29 2005
T(n,k) = Sum_{j=0..n-k} d(n-j)*binomial(n-k,j), where d(i)=A000166(i) are the derangement numbers. - Emeric Deutsch, Jul 17 2009
Sum_{k=0..n} (k+1)*T(n,k) = A155521(n+1). - Emeric Deutsch, Jul 18 2009
T(n, k) = n!*hypergeom([-k], [-n], -1). - Peter Luschny, Jul 28 2024

A055790 a(n) = n*a(n-1) + (n-2)*a(n-2), a(0) = 0, a(1) = 2.

Original entry on oeis.org

0, 2, 4, 14, 64, 362, 2428, 18806, 165016, 1616786, 17487988, 206918942, 2657907184, 36828901754, 547499510764, 8691268384262, 146725287298888, 2624698909845026, 49592184973992676, 986871395973226286, 20630087248996393888, 451982388752415571082
Offset: 0

Views

Author

Henry Bottomley, Jul 13 2000

Keywords

Comments

With offset 1, permanent of (0,1)-matrix of size n X (n+d) with d=1 and n-1 zeros not on a line. This is a special case of Theorem 2.3 of Seok-Zun Song et al. Extremes of permanents of (0,1)-matrices, p. 201-202. - Jaap Spies, Dec 12 2003
With a(0) = 1, number of degree-(n+1) permutations p such that p(i) != i+2 for each i=1,2,...,n+1. - Vladeta Jovovic, Jan 03 2003
Equivalently number of degree-(n+1) permutations p such that p(i) != i-2 for each i=1,2,...,n+1.
With a(0) = 1, number of degree-(n+1) permutations without fixed points between 2 and n. - Olivier Gérard, Jul 29 2016
Also column 3 of Euler's difference table (third diagonal in example of A068106). - Enrique Navarrete, Oct 31 2016
For n>=2, the number of circular permutations (in cycle notation) on [n+2] that avoid substrings (j,j+3), 1<=j<=n-1. For example, for n=2, the 4 circular permutations in S4 that avoid the substring {14} are (1234),(1243),(1324),(1342). Note that each of these circular permutations represent 4 permutations in one-line notation (see link 2017). - Enrique Navarrete, Feb 15 2017

Examples

			G.f. = 2*x + 4*x^2 + 14*x^3 + 64*x^4 + 362*x^5 + 2428*x^6 + ...
a(3) = 3*a(2)+(3-2)*a(1) = 12+2 = 14.
for n=1, the 2 permutations of [2] matches:
12, 21
for n=2, the 4 permutations of [3] without 2 as a fixed point are
132, 213, 231, 312.
for n=3, the 14 permutations of [4] without fixed point at 2 or 3 are
1324 1342 1423    2143 2314 2341 2413
3124 3142 3412 3421    4123 4312 4321
		

References

  • Brualdi, Richard A. and Ryser, Herbert J., Combinatorial Matrix Theory, Cambridge NY (1991), Chapter 7.

Crossrefs

Cf. A000166 (Derangements, permutations without fixed points ).
Cf. A000255 (permutations with p(i)!=i+1, same type of recurrence).
Apart from first term, appears in triangles A047920 or A068106 of differences of factorials, i.e. as third term of A000142, A001563, A001564, A001565 etc.

Programs

  • Haskell
    a055790 n = a055790_list !! n
    a055790_list = 0 : 2 : zipWith (+)
       (zipWith (*) [0..] a055790_list) (zipWith (*) [2..] $ tail a055790_list)
    -- Reinhard Zumkeller, Mar 05 2012
    
  • Maple
    f := proc(n) option remember; if n <= 1 then 2*n else n*f(n-1)+(n-2)*f(n-2); fi; end;
  • Mathematica
    a[0] = 0; a[1] = 2; a[n_] := a[n] = a[n] = n*a[n - 1] + (n - 2)*a[n - 2];
    Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Nov 14 2017 *)
    RecurrenceTable[{a[0]==0,a[1]==2,a[n]==n*a[n-1]+(n-2)a[n-2]},a,{n,30}] (* Harvey P. Dale, May 07 2018 *)
  • PARI
    a(n) = if(n==0, 0, round((n+3+1/n)*n!/exp(1))) \\ Felix Fröhlich, Jul 29 2016

Formula

For n > 0, a(n) = round[(n+3+1/n)*n!/e] = 2*A000153(n) = A000255(n-1)+A000255(n) = A000166(n-1)+2*A000166(n)+A000166(n+1).
G.f.: Q(0)*(1+x)/x - 1/x - 2, where Q(k)= 1 + (2*k + 1)*x/( (1+x) - 2*x*(1+x)*(k+1)/(2*x*(k+1) + (1+x)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 08 2013
G.f.: (1+x)^2/x/Q(0) - 1/x - 2, where Q(k)= 1 - 2*k*x - x^2*(k + 1)^2/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 08 2013
G.f.: 2*(1+x)/G(0) - 1-x, where G(k)= 1 + 1/(1 - x*(2*k+2)/(x*(2*k+1) - 1 + x*(2*k+2)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 31 2013
G.f.: W(0) -1, where W(k) = 1 - x*(k+2)/( x*(k+1) - 1/(1 - x*(k+1)/( x*(k+1) - 1/W(k+1) ))); (continued fraction). - Sergei N. Gladkovskii, Aug 26 2013
a(n) ~ sqrt(Pi/2)*n^n*sqrt(n)*(12*n + 37)/(6*exp(n+1)). - Ilya Gutkovskiy, Jul 29 2016
0 = a(n)*(+a(n+1) + 3*a(n+2) - a(n+3)) + a(n+1)*(-a(n+1) + 2*a(n+2) - a(n+3)) + a(n+2)*(+a(n+2)) for n>=0. - Michael Somos, Nov 01 2016

Extensions

Comments corrected, new interpretation and examples by Olivier Gérard, Jul 29 2016

A000261 a(n) = n*a(n-1) + (n-3)*a(n-2), with a(1) = 0, a(2) = 1.

Original entry on oeis.org

0, 1, 3, 13, 71, 465, 3539, 30637, 296967, 3184129, 37401155, 477471021, 6581134823, 97388068753, 1539794649171, 25902759280525, 461904032857319, 8702813980639617, 172743930157869827, 3602826440828270029, 78768746000235327495, 1801366114380914335441
Offset: 1

Views

Author

Keywords

Comments

With offset 1, permanent of (0,1)-matrix of size n X (n+d) with d=3 and n zeros not on a line. This is a special case of Theorem 2.3 of Seok-Zun Song et al. Extremes of permanents of (0,1)-matrices, pp. 201-202. - Jaap Spies, Dec 12 2003
a(n+2)=:b(n), n>=1, enumerates the ways to distribute n beads, labeled differently from 1 to n, over a set of (unordered) necklaces, excluding necklaces with exactly one bead, and three indistinguishable, ordered, fixed cords, each allowed to have any number of beads. Beadless necklaces as well as a beadless cords contribute each a factor 1 in the counting, e.g., b(0):= 1*1 =1. See A000255 for the description of a fixed cord with beads.
This produces for b(n) the exponential (aka binomial) convolution of the subfactorial sequence {A000166(n)} and the sequence {A001710(n+2)}. See the necklaces and cords problem comment in A000153. Therefore also the recurrence b(n) = (n+2)*b(n-1) + (n-1)*b(n-2) with b(-1)=0 and b(0)=1 holds. This comment derives from a family of recurrences found by Malin Sjodahl for a combinatorial problem for certain quark and gluon diagrams (Feb 27 2010). - Wolfdieter Lang, Jun 02 2010

Examples

			Necklaces and 3 cords problem. For n=4 one considers the following weak 2 part compositions of 4: (4,0), (3,1), (2,2), and (0,4), where (1,3) does not appear because there are no necklaces with 1 bead. These compositions contribute respectively sf(4)*1,binomial(4,3)*sf(3)*c3(1), (binomial(4,2)*sf(2))*c3(2), and 1*c3(4) with the subfactorials sf(n):=A000166(n) (see the necklace comment there) and the c3(n):=A001710(n+2) = (n+2)!/2! numbers for the pure 3 cord problem (see the remark on the e.g.f. for the k cords problem in A000153; here for k=3: 1/(1-x)^3). This adds up as 9 + 4*2*3 + (6*1)*12 + 360 = 465 = b(4) = A000261(6). - _Wolfdieter Lang_, Jun 02 2010
G.f. = x^2 + 3*x^3 + 13*x^4 + 71*x^5 + 465*x^6 + 3539*x^7 + 30637*x^8 + ...
		

References

  • Brualdi, Richard A. and Ryser, Herbert J., Combinatorial Matrix Theory, Cambridge NY (1991), Chapter 7.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 188.
  • 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

Cf. A086764(n+1,3), n>=1.
Cf. A000153 (necklaces and two cords). - Wolfdieter Lang, Jun 02 2010

Programs

  • Maple
    a:= proc(n) a(n):= `if`(n<3, n-1, n*a(n-1) +(n-3)*a(n-2)) end:
    seq(a(n), n=1..30);  # Alois P. Heinz, Nov 03 2012
    a := n -> `if`(n=1,0,hypergeom([4,-n+2],[],1))*(-1)^(n); seq(round(evalf(a(n), 100)), n=1..22); # Peter Luschny, Sep 20 2014
  • Mathematica
    nn=20;Prepend[Range[0,nn]!CoefficientList[Series[Exp[-x]/ (1-x)^4, {x,0,nn}],x],0]  (* Geoffrey Critzer, Nov 03 2012 *)
    a[ n_] := SeriesCoefficient[ x^2 HypergeometricPFQ[ {1, 4}, {}, x / (1 + x)] / (1 + x), {x, 0, n}]; (* Michael Somos, May 04 2014 *)
    a[ n_] := If[ n < 2, 0, With[{m = n - 1}, Round[ Gamma[m] (m^3 + 6 m^2 + 8 m + 1) Exp[-1]/6]]]; (* Michael Somos, May 04 2014 *)

Formula

E.g.f.: exp(-x)/(1-x)^4 for offset -1.
For offset -1: (1/6)*Sum_{k=0..n} (-1)^k*(n-k+1)*(n-k+2)*(n-k+3)*n!/k! = (1/6)*(A000166(n)+3*A000166(n+1)+3*A000166(n+2)+A000166(n+3)). - Vladeta Jovovic, Jan 07 2003
a(n+1) = round( GAMMA(n)*(n^3+6*n^2+8*n+1)*exp(-1)/6 ) for n>0. - Mark van Hoeij, Nov 11 2009
G.f.: x^2*hypergeom([1,4],[],x/(x+1))/(x+1). - Mark van Hoeij, Nov 07 2011
E.g.f. for offset -1: 1/(exp(x)*(1-x)^4) = 1/E(0) where E(k) = 1 - 4*x/(1 + 3*x/(2 - 3*x + 4*x/(3 - 2*x + 3*x/(4 - x - 4/(1 + x^3*(k+1)/E(k+1)))))); (continued fraction, 3rd kind, 6-step). - Sergei N. Gladkovskii, Sep 21 2012
a(n) = hypergeometric([4,-n+2],[],1)*(-1)^n for n>=2. - Peter Luschny, Sep 20 2014

Extensions

More terms from Vladeta Jovovic, Jan 07 2003

A086764 Triangle T(n, k), read by row, related to Euler's difference table A068106 (divide column k of A068106 by k!).

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 2, 3, 2, 1, 9, 11, 7, 3, 1, 44, 53, 32, 13, 4, 1, 265, 309, 181, 71, 21, 5, 1, 1854, 2119, 1214, 465, 134, 31, 6, 1, 14833, 16687, 9403, 3539, 1001, 227, 43, 7, 1, 133496, 148329, 82508, 30637, 8544, 1909, 356, 57, 8, 1
Offset: 0

Views

Author

Philippe Deléham, Aug 02 2003

Keywords

Comments

The k-th column sequence, k >= 0, without leading zeros, enumerates the ways to distribute n beads, n >= 1, labeled differently from 1 to n, over a set of (unordered) necklaces, excluding necklaces with exactly one bead, and k+1 indistinguishable, ordered, fixed cords, each allowed to have any number of beads. Beadless necklaces as well as beadless cords each contribute a factor 1, hence for n=0 one has 1. See A000255 for the description of a fixed cord with beads. This comment derives from a family of recurrences found by Malin Sjodahl for a combinatorial problem for certain quark and gluon diagrams (Feb 27 2010). - Wolfdieter Lang, Jun 02 2010

Examples

			Formatted as a square array:
      1      3     7    13   21   31  43 57 ... A002061;
      2     11    32    71  134  227 356    ... A094792;
      9     53   181   465 1001 1909        ... A094793;
     44    309  1214  3539 8544             ... A094794;
    265   2119  9403 30637                  ... A023043;
   1854  16687 82508                        ... A023044;
  14833 148329                              ... A023045;
Formatted as a triangular array (mirror of A076731):
       1;
       0      1;
       1      1     1;
       2      3     2     1;
       9     11     7     3    1;
      44     53    32    13    4    1;
     265    309   181    71   21    5    1;
    1854   2119  1214   465  134   31    6   1;
   14833  16687  9403  3539 1001  227   43   7   1;
  133496 148329 82508 30637 8544 1909  356  57   8   1;
		

Crossrefs

Programs

  • Magma
    A086764:= func< n,k | (&+[(-1)^j*Binomial(n-k,j)*Factorial(n-j): j in [0..n]])/Factorial(k) >;
    [A086764(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 05 2023
    
  • Mathematica
    T[n_,k_]:=(1/k!)*Sum[(-1)^j*Binomial[n-k,j]*(n-j)!,{j,0,n}];Flatten[Table[T[n,k],{n,0,11},{k,0,n}]] (* Indranil Ghosh, Feb 20 2017 *)
    T[n_, k_] := (n!/k!) HypergeometricPFQ[{k-n},{-n},-1];
    Table[T[n,k], {n,0,9}, {k,0,n}] // Flatten (* Peter Luschny, Oct 05 2017 *)
  • SageMath
    def A086764(n,k): return sum((-1)^j*binomial(n-k,j)*factorial(n-j) for j in range(n+1))//factorial(k)
    flatten([[A086764(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Oct 05 2023

Formula

T(n, n) = 1; T(n+1, n) = n.
T(n+2, n) = A002061(n+1) = n^2 + n + 1; T(n+3, n) = n^3 + 3*n^2 + 5*n + 2.
T(n, k) = (k + 1)*T(n, k + 1) - T(n-1, k); T(n, n) = 1; T(n, k) = 0, if k > n.
T(n, k) = (n-1)*T(n-1, k) + (n-k-1)*T(n-2, k).
k!*T(n, k) = A068106(n, k). [corrected by Georg Fischer, Aug 13 2022]
Sum_{k>=0} T(n, k) = A003470(n+1).
T(n, k) = (1/k!) * Sum_{j>=0} (-1)^j*binomial(n-k, j)*(n-j)!. - Philippe Deléham, Jun 13 2005
From Peter Bala, Aug 14 2008: (Start)
The following remarks all relate to the array read as a square array: e.g.f for column k: exp(-y)/(1-y)^(k+1); e.g.f. for array: exp(-y)/(1-x-y) = (1 + x + x^2 + x^3 + ...) + (x + 2*x^2 + 3*x^3 + 4*x^4 + ...)*y + (1 + 3*x + 7*x^2 + 13*x^3 + ...)*y^2/2! + ... .
This table is closely connected to the constant e. The row, column and diagonal entries of this table occur in series formulas for e.
Row n for n >= 2: e = n!*(1/T(n,0) + (-1)^n*[1/(1!*T(n,0)*T(n,1)) + 1/(2!*T(n,1)*T(n,2)) + 1/(3!*T(n,2)*T(n,3)) + ...]). For example, row 3 gives e = 6*(1/2 - 1/(1!*2*11) - 1/(2!*11*32) - 1/(3!*32*71) - ...). See A095000.
Column 0: e = 2 + Sum_{n>=2} (-1)^n*n!/(T(n,0)*T(n+1,0)) = 2 + 2!/(1*2) - 3 !/(2*9) + 4!/(9*44) - ... .
Column k, k >= 1: e = (1 + 1/1! + 1/2! + ... + 1/k!) + 1/k!*Sum_{n >= 0} (-1)^n*n!/(T(n,k)*T(n+1,k)). For example, column 3 gives e = 8/3 + 1/6*(1/(1*3) - 1/(3*13) + 2/(13*71) - 6/(71*465) + ...).
Main diagonal: e = 1 + 2*(1/(1*1) - 1/(1*7) + 1/(7*71) - 1/(71*1001) + ...).
First subdiagonal: e = 8/3 + 5/(3*32) - 7/(32*465) + 9/(465*8544) - ... .
Second subdiagonal: e = 2*(1 + 2^2/(1*11) - 3^2/(11*181) + 4^2/(181*3539) - ...). See A143413.
Third subdiagonal: e = 3 - (2*3*5)/(2*53) + (3*4*7)/(53*1214) - (4*5*9)/(1214*30637) + ... .
For the corresponding results for the constants 1/e, sqrt(e) and 1/sqrt(e) see A143409, A143410 and A143411 respectively. For other arrays similarly related to constants see A008288 (for log(2)), A108625 (for zeta(2)) and A143007 (for zeta(3)). (End)
G.f. for column k is hypergeom([1,k+1],[],x/(x+1))/(x+1). - Mark van Hoeij, Nov 07 2011
T(n, k) = (n!/k!)*hypergeom([k-n], [-n], -1). - Peter Luschny, Oct 05 2017

Extensions

More terms from David Wasserman, Mar 28 2005
Additional comments from Zerinvary Lajos, Mar 30 2006
Edited by N. J. A. Sloane, Sep 24 2011

A090010 Permanent of (0,1)-matrix of size n X (n+d) with d=6 and n zeros not on a line.

Original entry on oeis.org

6, 43, 356, 3333, 34754, 398959, 4996032, 67741129, 988344062, 15434831091, 256840738076, 4536075689293, 84731451264186, 1668866557980343, 34563571477305464, 750867999393119889, 17072113130285524982, 405423357986250112699, 10037458628015142154452
Offset: 1

Views

Author

Jaap Spies, Dec 13 2003

Keywords

References

  • Brualdi, Richard A. and Ryser, Herbert J., Combinatorial Matrix Theory, Cambridge NY (1991), Chapter 7.

Crossrefs

Programs

  • Maple
    A090010 := proc(n,d) local r; if (n=1) then r := d elif (n=2) then r := d^2+d+1 else r := (n+d-1)*A090010(n-1,d)+(n-1)*A090010(n-2,d) fi; RETURN(r); end: seq(A090010(n,6),n=1..18);
  • Mathematica
    Rest[CoefficientList[Series[E^(-x)/(1-x)^7,{x,0,20}],x]*Range[0,20]!] (* Vaclav Kotesovec, Oct 21 2012 *)
  • PARI
    x='x+O('x^66); Vec(serlaplace(-1+exp(-x)/(1-x)^7)) \\ Joerg Arndt, May 11 2013

Formula

a(n) = (n+5)*a(n-1) + (n-1)*a(n-2), a(1)=6, a(2)=43
G.f.: -1+hypergeom([1,7],[],x/(x+1))/(x+1) - Mark van Hoeij, Nov 07 2011
E.g.f.: -1 + exp(-x)/(1-x)^7. - Vaclav Kotesovec, Oct 21 2012
a(n) ~ n!*n^6/(720*e). - Vaclav Kotesovec, Oct 21 2012

Extensions

Corrected by Jaap Spies, Jan 26 2004

A090012 Permanent of (0,1)-matrix of size n X (n+d) with d=2 and n-1 zeros not on a line.

Original entry on oeis.org

3, 9, 39, 213, 1395, 10617, 91911, 890901, 9552387, 112203465, 1432413063, 19743404469, 292164206259, 4619383947513, 77708277841575, 1385712098571957, 26108441941918851, 518231790473609481, 10808479322484810087
Offset: 1

Views

Author

Jaap Spies, Dec 13 2003

Keywords

References

  • Brualdi, Richard A. and Ryser, Herbert J., Combinatorial Matrix Theory, Cambridge NY (1991), Chapter 7.

Crossrefs

Programs

  • Maple
    A090012 := proc(n,d) local r; if (n=1) then r := d+1 elif (n=2) then r := (d+1)^2 else r := (n+d-1)*A090012(n-1,d)+(n-2)*A090012(n-2,d) fi; RETURN(r); end: seq(A090012(n,2),n=1..20);
  • Mathematica
    t={3,9};Do[AppendTo[t,(n+1)*t[[-1]]+(n-2)*t[[-2]]],{n,3,19}];t (* Indranil Ghosh, Feb 21 2017 *)
    RecurrenceTable[{a[1]==3,a[2]==9,a[n]==(n+1)a[n-1]+(n-2)a[n-2]},a,{n,20}] (* Harvey P. Dale, Sep 21 2017 *)
  • Python
    # Program to generate the b-file
    print("1 3")
    print("2 9")
    a=3
    b=9
    c=(3+1)*b+(3-2)*a
    for i in range(4, 40):
        print(str(i - 1)+" "+str(c))
        a=b
        b=c
        c=(i+1)*b+(i-2)*a # Indranil Ghosh, Feb 21 2017

Formula

a(n) = (n+1)*a(n-1) + (n-2)*a(n-2), a(1)=3, a(2)=9.
a(n) = A000153(n-1) + A000153(n), a(1)=3.
G.f.: W(0)/x -1/x, where W(k) = 1 - x*(k+3)/( x*(k+2) - 1/(1 - x*(k+1)/( x*(k+1) - 1/W(k+1) ))); (continued fraction). - Sergei N. Gladkovskii, Aug 25 2013
a(n) ~ exp(-1) * n! * n^2 / 2. - Vaclav Kotesovec, Nov 30 2017

Extensions

Corrected by Jaap Spies, Jan 26 2004

A090016 Permanent of (0,1)-matrix of size n X (n+d) with d=6 and n-1 zeros not on a line.

Original entry on oeis.org

7, 49, 399, 3689, 38087, 433713, 5394991, 72737161, 1056085191, 16423175153, 272275569167, 4792916427369, 89267526953479, 1753598009244529, 36232438035285807, 785431570870425353, 17822981129678644871
Offset: 1

Views

Author

Jaap Spies, Dec 13 2003

Keywords

References

  • Brualdi, Richard A. and Ryser, Herbert J., Combinatorial Matrix Theory, Cambridge NY (1991), Chapter 7.

Crossrefs

Programs

  • Mathematica
    t={7,49};Do[AppendTo[t,(n+5)*t[[-1]]+(n-2)*t[[-2]]],{n,3,17}];t (* Indranil Ghosh, Feb 21 2017 *)

Formula

a(n) = (n+5)*a(n-1) + (n-2)*a(n-2), a(1)=7, a(2)=49
E.g.f.: 7*exp(-x)/(1-x)^8. - Vladeta Jovovic, Mar 19 2004
a(n) = (A000166(n-1)+7*A000166(n)+21*A000166(n+1)+35*A000166(n+2)+35*A000166(n+3)+21*A000166(n+4)+7*A000166(n+5)+A000166(n+6))/6!. - Vladeta Jovovic, Mar 19 2004
a(n) ~ exp(-1) * n! * n^6 / 6!. - Vaclav Kotesovec, Nov 30 2017

Extensions

Corrected by Jaap Spies, Jan 26 2004
Showing 1-10 of 23 results. Next