(Translated by https://www.hiragana.jp/)
A055790 -id:A055790 - OEIS
login
Search: a055790 -id:a055790
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) = n*a(n-1) + (n-1)*a(n-2), a(0) = 1, a(1) = 1.
(Formerly M2905 N1166)
+10
111
1, 1, 3, 11, 53, 309, 2119, 16687, 148329, 1468457, 16019531, 190899411, 2467007773, 34361893981, 513137616783, 8178130767479, 138547156531409, 2486151753313617, 47106033220679059, 939765362752547227, 19690321886243846661, 432292066866171724421
OFFSET
0,3
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
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.
LINKS
M. H. Albert, M. D. Atkinson, and Robert Brignall, Permutation Classes of Polynomial Growth, arXiv:math/0603315 [math.CO], 2006-2007; Annals of Combinatorics 11 (2007) 249-264.
Per Alexandersson and Frether Getachew, An involution on derangements, arXiv:2105.08455 [math.CO], 2021.
Roland Bacher, Counting Packings of Generic Subsets in Finite Groups, Electr. J. Combinatorics, Vol. 19 (2012), Article P7. - From N. J. A. Sloane, Feb 06 2013
Barry Balof and Helen Jenne, Tilings, Continued Fractions, Derangements, Scramblings, and e, Journal of Integer Sequences, Vol. 17 (2014), Article 14.2.7.
Robert Brignall, Vít Jelínek, Jan Kynčl, and David Marchant, Zeros of the Möbius function of permutations, arXiv:1810.05449 [math.CO], 2018.
Richard A. Brualdi, John L. Goldwasser, and T. S. Michael, Maximum permanents of matrices of zeros and ones, J. Combin. Theory Ser. A 47 (1988), 207-245.
Giulio Cerbai and Luca Ferrari, Permutation patterns in genome rearrangement problems, arXiv:1808.02653 [math.CO], 2018. See p. 126.
Shane Chern, Lin Jiu, and Italo Simonelli, A central limit theorem for a card shuffling problem, arXiv:2309.08841 [math.PR], 2023.
Leonhard Euler, Recherches sur une nouvelle espèce des quarrés magiques, Verhandelingen uitgegeven door het zeeuwsch Genootschap der Wetenschappen te Vlissingen, 9 (1782), 85-239, on page 235 in section 152. This is paper E530 in Enestrom's index of Euler's works. The sequence appears on page 389 of Euler's Opera Omnia, series I, volume 7. [From D. E. Knuth]
Philip Feinsilver and John McSorley, Zeons, Permanents, the Johnson Scheme, and Generalized Derangements, International Journal of Combinatorics, Volume 2011, Article ID 539030, 29 pages; doi:10.1155/2011/539030.
Philippe Flajolet and Robert Sedgewick, Analytic Combinatorics, 2009; see page 373.
Hannah Golab, Pattern avoidance in Cayley permutations, Master's Thesis, Northern Arizona Univ. (2024). See p. 36.
G. H. Hardy, Divergent Series, Oxford University Press, 1949. p. 29.
Florian Herzig, Problem 2330, Crux Mathematicorum, Vol. 24, No. 3 (1998), p. 176; Solution to Problem 2330, by Con Amore Problem Group, ibid., Vol. 25, No. 3 (1999), pp. 183-185.
F. Hivert, J.-C. Novelli and J.-Y. Thibon, Commutative combinatorial Hopf algebras, arXiv:math/0605262 [math.CO], 2006.
Brian Hopkins, Euler's Enumerations, Enumerative Combinatorics and Applications, Vol. 1, No. 1 (2021), Article #S1H1.
Helen K. Jenne, Proofs you can count on, Honors Thesis, Math. Dept., Whitman College, 2013.
G. Kreweras, The number of more or less "regular" permutations, Fib. Quart., Vol. 18, No. 3 (1980), pp. 226-229.
Ajay Kumar and Chanchal Kumar, Monomial ideals induced by permutations avoiding patterns, 2018.
Toufik Mansour and Mark Shattuck, Counting permutations by the number of successors within cycles, Discr. Math., Vol. 339, No. 4 (2016), pp. 1368-1376.
A. N. Myers, Counting permutations by their rigid patterns, J. Combin. Theory, Series A, Vol. 99, No. 2 (2002), pp. 345-357.
Enrique Navarrete, Forbidden Patterns and the Alternating Derangement Sequence, arXiv:1610.01987 [math.CO], 2016.
Enrique Navarrete, Forbidden Substrings in Circular K-Successions, arXiv:1702.02637 [math.CO], 2017.
Luis Manuel Rivera, Integer sequences and k-commuting permutations, arXiv preprint arXiv:1406.3081 [math.CO], 2014.
D. P. Roselle, Permutations by number of rises and successions, Proc. Amer. Math. Soc., Vol. 19, No. 1 (1968), pp. 8-16.
D. P. Roselle, Permutations by number of rises and successions, Proc. Amer. Math. Soc., Vol. 19, No. 1 (1968), pp. 8-16. [Annotated scanned copy]
Max Rumney and E. J. F. Primrose, A sequence connected with the subfactorial sequence, Note 3207, Math. Gaz., Vol. 52, No. 382 (1968), pp. 381-382.
Max Rumney and E. J. F. Primrose, A sequence connected with the subfactorial sequence, Note 3207, Math. Gaz., Vol. 52, No. 382 (1968), pp. 381-382. [Annotated scanned copy]
Isaac Sofair, Derangement revisited, Math. Gazette, Vol. 97, No. 540 (2013), pp. 435-440.
Seok-Zun Song et al., Extremes of permanents of (0,1)-matrices, Lin. Algebra and its Applic., Vol. 373 (2003), pp. 197-210.
Jun Yan, Results on pattern avoidance in parking functions, arXiv:2404.07958 [math.CO], 2024. See p. 5.
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
EXAMPLE
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 + ...
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 *)
PROG
(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
(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
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).
KEYWORD
nonn,easy,nice
STATUS
approved
a(n) = n*a(n-1) + (n-2)*a(n-2), with a(0) = 0, a(1) = 1.
(Formerly M1791 N0706)
+10
34
0, 1, 2, 7, 32, 181, 1214, 9403, 82508, 808393, 8743994, 103459471, 1328953592, 18414450877, 273749755382, 4345634192131, 73362643649444, 1312349454922513, 24796092486996338, 493435697986613143, 10315043624498196944
OFFSET
0,3
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
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).
LINKS
Roland Bacher, Counting Packings of Generic Subsets in Finite Groups, Electr. J. Combinatorics, 19 (2012), #P7. - From N. J. A. Sloane, Feb 06 2013
Anders Claesson, Giulio Cerbai, Dana C. Ernst, and Hannah Golab, Pattern-avoiding Cayley permutations via combinatorial species, arXiv:2407.19583 [math.CO], 2024.
Hannah Golab, Pattern avoidance in Cayley permutations, Master's Thesis, Northern Arizona Univ. (2024). See p. 41.
Ed Sandifer, Divergent Series, How Euler Did It, MAA Online, June 2006. - From Johannes W. Meijer, Oct 16 2009
Seok-Zun Song et al., Extremes of permanents of (0,1)-matrices, Special issue on the Combinatorial Matrix Theory Conference (Pohang, 2002). Linear Algebra Appl. 373 (2003), 197-210.
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, March 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
EXAMPLE
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 + ...
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 *)
PROG
(Sage) it = sloane.A000153.gen(0, 1, 2); [next(it) for i in range(21)] # Zerinvary Lajos, May 15 2009
(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
(PARI) x='x+O('x^66); concat([0], Vec(x*serlaplace(exp(-x)/(1-x)^3))) \\ Joerg Arndt, May 08 2013
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
KEYWORD
nonn,easy
STATUS
approved
Triangular array formed from successive differences of factorial numbers.
+10
27
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,4
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
REFERENCES
Ch. A. Charalambides, Enumerative Combinatorics, Chapman & Hall/CRC, Boca Raton, Florida, 2002, p. 176, Table 5.3. [From Emeric Deutsch, Apr 21 2009]
LINKS
E. Deutsch and S. Elizalde, The largest and the smallest fixed points of permutations, arXiv:0904.2792 [math.CO], 2009.
J. D. H. Dickson, Discussion of two double series arising from the number of terms in determinants of certain forms, Proc. London Math. Soc., 10 (1879), 120-122. [Annotated scanned copy]
Ira M. Gessel, Symmetric inclusion-exclusion, Séminaire Lotharingien de Combinatoire, B54b (2005).
Peter Kagey, Ranking and Unranking Restricted Permutations, arXiv:2210.17021 [math.CO], 2022.
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
EXAMPLE
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
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 *)
PROG
(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
(PARI) row(n) = vector(n+1, k, k--; sum(j=0, n, (-1)^j * binomial(k, j)*(n-j)!)); \\ Michel Marcus, Sep 04 2021
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
KEYWORD
nonn,tabl,easy,nice
STATUS
approved
a(n) = n*a(n-1) + (n-3)*a(n-2), with a(1) = 0, a(2) = 1.
(Formerly M2949 N1189)
+10
24
0, 1, 3, 13, 71, 465, 3539, 30637, 296967, 3184129, 37401155, 477471021, 6581134823, 97388068753, 1539794649171, 25902759280525, 461904032857319, 8702813980639617, 172743930157869827, 3602826440828270029, 78768746000235327495, 1801366114380914335441
OFFSET
1,3
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
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).
LINKS
Roland Bacher, Counting Packings of Generic Subsets in Finite Groups, Electr. J. Combinatorics, 19 (2012), #P7. - From N. J. A. Sloane, Feb 06 2013
Seok-Zun Song et al., Extremes of permanents of (0,1)-matrices, Special issue on the Combinatorial Matrix Theory Conference (Pohang, 2002). Linear Algebra Appl. 373 (2003), pp. 197-210.
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
EXAMPLE
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 + ...
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 *)
CROSSREFS
Cf. A086764(n+1,3), n>=1.
Cf. A000153 (necklaces and two cords). - Wolfdieter Lang, Jun 02 2010
KEYWORD
nonn
EXTENSIONS
More terms from Vladeta Jovovic, Jan 07 2003
STATUS
approved
a(n) = n*a(n-1) + (n-4)*a(n-2), a(2) = 0, a(3) = 1.
(Formerly M3576 N1450)
+10
24
0, 1, 4, 21, 134, 1001, 8544, 81901, 870274, 10146321, 128718044, 1764651461, 25992300894, 409295679481, 6860638482424, 121951698034461, 2291179503374234, 45361686034627361, 943892592746534964, 20592893110265899381, 470033715095287415734
OFFSET
2,3
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
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).
LINKS
Roland Bacher, Counting Packings of Generic Subsets in Finite Groups, Electr. J. Combinatorics, 19 (2012), #P7. - From N. J. A. Sloane, Feb 06 2013
Seok-Zun Song et al., Extremes of permanents of (0,1)-matrices, Special issue on the Combinatorial Matrix Theory Conference (Pohang, 2002). Linear Algebra Appl. 373 (2003), pp. 197-210.
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
EXAMPLE
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 + ...
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 *)
PROG
(PARI) {a(n) = if( n<2, 0, -contfracpnqn( matrix(2, n, i, j, j - 4*(i==1))) [1, 1])} /* Michael Somos, Feb 19 2003 */
CROSSREFS
Cf. A000255, A000153, A000261, A001910, A090010, A055790, A090012-A090016, A086764. A000261 (necklaces and three cords).
KEYWORD
nonn
STATUS
approved
a(n) = n*a(n-1) + (n-5)*a(n-2).
(Formerly M3965 N1637)
+10
24
0, 1, 5, 31, 227, 1909, 18089, 190435, 2203319, 27772873, 378673901, 5551390471, 87057596075, 1453986832381, 25762467303377, 482626240281739, 9530573107600319, 197850855756232465, 4307357140602486869, 98125321641110663023, 2334414826276390013171
OFFSET
3,3
COMMENTS
With offset 1, permanent of (0,1)-matrix of size n X (n+d) with d=5 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+4)=: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 k=5 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 {A001720(n+4) = (n+4)!/4!}. See the necklaces and cords problem comment in A000153. Therefore also the recurrence b(n) = (n+4)*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
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).
LINKS
Seok-Zun Song et al., Extremes of permanents of (0,1)-matrices, Special issue on the Combinatorial Matrix Theory Conference (Pohang, 2002). Linear Algebra Appl. 373 (2003), pp. 197-210.
FORMULA
a(n) = A086764(n+1,5), n>=3.
E.g.f. with offset -1: (exp(-x)/(1-x))*(1-x)^5 = exp(-x)/(1-x)^6. - Wolfdieter Lang, Jun 02 2010
G.f.: x*hypergeom([1,6],[],x/(x+1))/(x+1). - Mark van Hoeij, Nov 07 2011
a(n) = hypergeometric([6,-n+4],[],1)*(-1)^n for n >=4. - Peter Luschny, Sep 20 2014
EXAMPLE
Necklaces and 5 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)*c5(1), (binomial(4,2)*sf(2))*c5(2), and 1*c5(4) with the subfactorials sf(n):=A000166(n) (see the necklace comment there) and the c5(n):=A001720(n+4) numbers for the pure 5 cord problem (see the remark on the e.g.f. for the k cords problem in A000153; here for k=5: 1/(1-x)^5). This adds up as 9 + 4*2*5 + (6*1)*30 + 1680 = 1909 = b(4) = A001910(8). - Wolfdieter Lang, Jun 02 2010
MAPLE
a := n -> `if`(n=3, 0, hypergeom([6, -n+4], [], 1))*(-1)^n;
seq(round(evalf(a(n), 100)), n=3..20); # Peter Luschny, Sep 20 2014
MATHEMATICA
t = {0, 1}; Do[AppendTo[t, n*t[[-1]] + (n - 5) t[[-2]]], {n, 5, 20}]; t (* T. D. Noe, Aug 17 2012 *)
CROSSREFS
A001909 (necklaces and four cords).
KEYWORD
nonn
STATUS
approved
Euler's difference table: triangle read by rows, formed by starting with factorial numbers (A000142) and repeatedly taking differences. T(n,n) = n!, T(n,k) = T(n,k+1) - T(n-1,k).
+10
23
1, 0, 1, 1, 1, 2, 2, 3, 4, 6, 9, 11, 14, 18, 24, 44, 53, 64, 78, 96, 120, 265, 309, 362, 426, 504, 600, 720, 1854, 2119, 2428, 2790, 3216, 3720, 4320, 5040, 14833, 16687, 18806, 21234, 24024, 27240, 30960, 35280, 40320, 133496, 148329, 165016, 183822, 205056, 229080, 256320, 287280, 322560, 362880
OFFSET
0,6
COMMENTS
Triangle T(n,k) (n >= 1, 1 <= k <= n) giving number of ways of winning with (n-k+1)st card in the generalized "Game of Thirteen" with n cards.
From Emeric Deutsch, Apr 21 2009: (Start)
T(n-1,k-1) is the number of non-derangements of {1,2,...,n} having largest fixed point equal to k. Example: T(3,1)=3 because we have 1243, 4213, and 3241.
Mirror image of A047920.
(End)
LINKS
W. Y. C. Chen et al., Higher-order log-concavity in Euler's difference table, Discrete Math., 311 (2011), 2128-2134.
P. R. de Montmort, On the Game of Thirteen (1713), reprinted in Annotated Readings in the History of Statistics, ed. H. A. David and A. W. F. Edwards, Springer-Verlag, 2001, pp. 25-29.
Emeric Deutsch and S. Elizalde, The largest and the smallest fixed points of permutations, arXiv:0904.2792 [math.CO], 2009.
D. Dumont, Matrices d'Euler-Seidel, Sem. Loth. Comb. B05c (1981) 59-78.
Philip Feinsilver and John McSorley, Zeons, Permanents, the Johnson scheme, and Generalized Derangements, arXiv:1710.00788 [math.CO], (2017); see page 29.
P. Feinsilver and J. McSorley, Zeons, Permanents, the Johnson scheme, and Generalized Derangements, International Journal of Combinatorics, 2011 (2011).
Fanja Rakotondrajao, k-Fixed-Points-Permutations, Integers: Electronic journal of combinatorial number theory 7 (2007) A36.
FORMULA
T(n, k) = Sum_{j>= 0} (-1)^j*binomial(n-k, j)*(n-j)!. - Philippe Deléham, May 29 2005
From Emeric Deutsch, Jul 18 2009: (Start)
T(n,k) = Sum_{j=0..k} d(n-j)*binomial(k, j), where d(i) = A000166(i) are the derangement numbers.
Sum_{k=0..n} (k+1)*T(n,k) = A000166(n+2) (the derangement numbers). (End)
T(n, k) = n!*hypergeom([k-n], [-n], -1). - Peter Luschny, Oct 05 2017
D-finite recurrence for columns: T(n,k) = n*T(n-1,k) + (n-k)*T(n-2,k). - Georg Fischer, Aug 13 2022
EXAMPLE
Triangle begins:
[0] 1;
[1] 0, 1;
[2] 1, 1, 2;
[3] 2, 3, 4, 6;
[4] 9, 11, 14, 18, 24;
[5] 44, 53, 64, 78, 96, 120;
[6] 265, 309, 362, 426, 504, 600, 720;
[7] 1854, 2119, 2428, 2790, 3216, 3720, 4320, 5040.
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(k, j)*d[n-j], j = 0 .. 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 18 2009
MATHEMATICA
t[n_, k_] := Sum[(-1)^j*Binomial[n-k, j]*(n-j)!, {j, 0, n}]; Flatten[ Table[ t[n, k], {n, 0, 9}, {k, 0, n}]] (* Jean-François Alcover, Feb 21 2012, after Philippe Deléham *)
T[n_, k_] := n! HypergeometricPFQ[{k-n}, {-n}, -1];
Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Peter Luschny, Oct 05 2017 *)
PROG
(Haskell)
a068106 n k = a068106_tabl !! n !! k
a068106_row n = a068106_tabl !! n
a068106_tabl = map reverse a047920_tabl
-- Reinhard Zumkeller, Mar 05 2012
CROSSREFS
Row sums give A002467.
Diagonals give A000142, A001563, A001564, A001565, A001688, A001689, A023043, A023044, A023045, A023046, A023047 (factorials and k-th differences, k=1..10).
See A047920 and A086764 for other versions.
T(2*n, n) is A033815.
KEYWORD
nonn,easy,tabl,nice
AUTHOR
N. J. A. Sloane, Apr 12 2002
EXTENSIONS
More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 01 2003
Edited by N. J. A. Sloane, Sep 24 2011
STATUS
approved
Permanent of (0,1)-matrix of size n X (n+d) with d=6 and n zeros not on a line.
+10
12
6, 43, 356, 3333, 34754, 398959, 4996032, 67741129, 988344062, 15434831091, 256840738076, 4536075689293, 84731451264186, 1668866557980343, 34563571477305464, 750867999393119889, 17072113130285524982, 405423357986250112699, 10037458628015142154452
OFFSET
1,1
REFERENCES
Brualdi, Richard A. and Ryser, Herbert J., Combinatorial Matrix Theory, Cambridge NY (1991), Chapter 7.
LINKS
Seok-Zun Song et al., Extremes of permanents of (0,1)-matrices, Lin. Algebra and its Applic. 373 (2003), pp. 197-210.
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
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 *)
PROG
(PARI) x='x+O('x^66); Vec(serlaplace(-1+exp(-x)/(1-x)^7)) \\ Joerg Arndt, May 11 2013
KEYWORD
nonn,easy
AUTHOR
Jaap Spies, Dec 13 2003
EXTENSIONS
Corrected by Jaap Spies, Jan 26 2004
STATUS
approved
Permanent of (0,1)-matrix of size n X (n+d) with d=2 and n-1 zeros not on a line.
+10
12
3, 9, 39, 213, 1395, 10617, 91911, 890901, 9552387, 112203465, 1432413063, 19743404469, 292164206259, 4619383947513, 77708277841575, 1385712098571957, 26108441941918851, 518231790473609481, 10808479322484810087
OFFSET
1,1
REFERENCES
Brualdi, Richard A. and Ryser, Herbert J., Combinatorial Matrix Theory, Cambridge NY (1991), Chapter 7.
LINKS
Seok-Zun Song et al., Extremes of permanents of (0,1)-matrices, Lin. Algebra and its Applic. 373 (2003), pp. 197-210.
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
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 *)
PROG
(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
KEYWORD
nonn,easy
AUTHOR
Jaap Spies, Dec 13 2003
EXTENSIONS
Corrected by Jaap Spies, Jan 26 2004
STATUS
approved
Permanent of (0,1)-matrix of size n X (n+d) with d=6 and n-1 zeros not on a line.
+10
12
7, 49, 399, 3689, 38087, 433713, 5394991, 72737161, 1056085191, 16423175153, 272275569167, 4792916427369, 89267526953479, 1753598009244529, 36232438035285807, 785431570870425353, 17822981129678644871
OFFSET
1,1
REFERENCES
Brualdi, Richard A. and Ryser, Herbert J., Combinatorial Matrix Theory, Cambridge NY (1991), Chapter 7.
LINKS
Seok-Zun Song et al., Extremes of permanents of (0,1)-matrices, Lin. Algebra and its Applic. 373 (2003), pp. 197-210.
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
MATHEMATICA
t={7, 49}; Do[AppendTo[t, (n+5)*t[[-1]]+(n-2)*t[[-2]]], {n, 3, 17}]; t (* Indranil Ghosh, Feb 21 2017 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jaap Spies, Dec 13 2003
EXTENSIONS
Corrected by Jaap Spies, Jan 26 2004
STATUS
approved

Search completed in 0.027 seconds