[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
login
Search: a007016 -id:a007016
     Sort: relevance | references | number | modified | created      Format: long | short | data
Subfactorial or rencontres numbers, or derangements: number of permutations of n elements with no fixed points.
(Formerly M1937 N0766)
+10
539
1, 0, 1, 2, 9, 44, 265, 1854, 14833, 133496, 1334961, 14684570, 176214841, 2290792932, 32071101049, 481066515734, 7697064251745, 130850092279664, 2355301661033953, 44750731559645106, 895014631192902121, 18795307255050944540, 413496759611120779881, 9510425471055777937262
OFFSET
0,4
COMMENTS
Euler (1809) not only gives the first ten or so terms of the sequence, he also proves both recurrences a(n) = (n-1)*(a(n-1) + a(n-2)) and a(n) = n*a(n-1) + (-1)^n.
a(n) is the permanent of the matrix with 0 on the diagonal and 1 elsewhere. - Yuval Dekel, Nov 01 2003
a(n) is the number of desarrangements of length n. A desarrangement of length n is a permutation p of {1,2,...,n} for which the smallest of all the ascents of p (taken to be n if there are no ascents) is even. Example: a(3) = 2 because we have 213 and 312 (smallest ascents at i = 2). See the J. Désarménien link and the Bona reference (p. 118). - Emeric Deutsch, Dec 28 2007
a(n) is the number of deco polyominoes of height n and having in the last column an even number of cells. A deco polyomino is a directed column-convex polyomino in which the height, measured along the diagonal, is attained only in the last column. - Emeric Deutsch, Dec 28 2007
Attributed to Nicholas Bernoulli in connection with a probability problem that he presented. See Problem #15, p. 494, in "History of Mathematics" by David M. Burton, 6th edition. - Mohammad K. Azarian, Feb 25 2008
a(n) is the number of permutations p of {1,2,...,n} with p(1)!=1 and having no right-to-left minima in consecutive positions. Example a(3) = 2 because we have 231 and 321. - Emeric Deutsch, Mar 12 2008
a(n) is the number of permutations p of {1,2,...,n} with p(n)! = n and having no left to right maxima in consecutive positions. Example a(3) = 2 because we have 312 and 321. - Emeric Deutsch, Mar 12 2008
Number of wedged (n-1)-spheres in the homotopy type of the Boolean complex of the complete graph K_n. - Bridget Tenner, Jun 04 2008
The only prime number in the sequence is 2. - Howard Berman (howard_berman(AT)hotmail.com), Nov 08 2008
From Emeric Deutsch, Apr 02 2009: (Start)
a(n) is the number of permutations of {1,2,...,n} having exactly one small ascent. A small ascent in a permutation (p_1,p_2,...,p_n) is a position i such that p_{i+1} - p_i = 1. (Example: a(3) = 2 because we have 312 and 231; see the Charalambides reference, pp. 176-180.) [See also David, Kendall and Barton, p. 263. - N. J. A. Sloane, Apr 11 2014]
a(n) is the number of permutations of {1,2,...,n} having exactly one small descent. A small descent in a permutation (p_1,p_2,...,p_n) is a position i such that p_i - p_{i+1} = 1. (Example: a(3)=2 because we have 132 and 213.) (End)
For n > 2, a(n) + a(n-1) = A000255(n-1); where A000255 = (1, 1, 3, 11, 53, ...). - Gary W. Adamson, Apr 16 2009
Connection to A002469 (game of mousetrap with n cards): A002469(n) = (n-2)*A000255(n-1) + A000166(n). (Cf. triangle A159610.) - Gary W. Adamson, Apr 17 2009
From Emeric Deutsch, Jul 18 2009: (Start)
a(n) is the sum of the values of the largest fixed points of all non-derangements of length n-1. Example: a(4)=9 because the non-derangements of length 3 are 123, 132, 213, and 321, having largest fixed points 3, 1, 3, and 2, respectively.
a(n) is the number of non-derangements of length n+1 for which the difference between the largest and smallest fixed point is 2. Example: a(3) = 2 because we have 1'43'2 and 32'14'; a(4) = 9 because we have 1'23'54, 1'43'52, 1'53'24, 52'34'1, 52'14'3, 32'54'1, 213'45', 243'15', and 413'25' (the extreme fixed points are marked).
(End)
a(n), n >= 1, is also the number of unordered necklaces with n beads, labeled differently from 1 to n, where each necklace has >= 2 beads. This produces the M2 multinomial formula involving partitions without part 1 given below. Because M2(p) counts the permutations with cycle structure given by partition p, this formula gives the number of permutations without fixed points (no 1-cycles), i.e., the derangements, hence the subfactorials with their recurrence relation and inputs. Each necklace with no beads is assumed to contribute a factor 1 in the counting, hence 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 01 2010
From Emeric Deutsch, Sep 06 2010: (Start)
a(n) is the number of permutations of {1,2,...,n, n+1} starting with 1 and having no successions. A succession in a permutation (p_1,p_2,...,p_n) is a position i such that p_{i+1} - p_i = 1. Example: a(3)=2 because we have 1324 and 1432.
a(n) is the number of permutations of {1,2,...,n} that do not start with 1 and have no successions. A succession in a permutation (p_1,p_2,...,p_n) is a position i such that p_{i+1} - p_i = 1. Example: a(3)=2 because we have 213 and 321.
(End)
Increasing colored 1-2 trees with choice of two colors for the rightmost branch of nonleave except on the leftmost path, there is no vertex of outdegree one on the leftmost path. - Wenjin Woan, May 23 2011
a(n) is the number of zeros in n-th row of the triangle in A170942, n > 0. - Reinhard Zumkeller, Mar 29 2012
a(n) is the maximal number of totally mixed Nash equilibria in games of n players, each with 2 pure options. - Raimundas Vidunas, Jan 22 2014
Convolution of sequence A135799 with the sequence generated by 1+x^2/(2*x+1). - Thomas Baruchel, Jan 08 2016
The number of interior lattice points of the subpolytope of the n-dimensional permutohedron whose vertices correspond to permutations avoiding 132 and 312. - Robert Davis, Oct 05 2016
Consider n circles of different radii, where each circle is either put inside some bigger circle or contains a smaller circle inside it (no common points are allowed). Then a(n) gives the number of such combinations. - Anton Zakharov, Oct 12 2016
If we partition the permutations of [n+1] in A000240 according to their starting digit, we will get (n+1) equinumerous classes each of size a(n), i.e., A000240(n+1) = (n+1)*a(n), hence a(n) is the size of each class of permutations of [n+1] in A000240. For example, for n = 4 we have 45 = 5*9. - Enrique Navarrete, Jan 10 2017
Call d_n1 the permutations of [n] that have the substring n1 but no substring in {12,23,...,(n-1)n}. If we partition them according to their starting digit, we will get (n-1) equinumerous classes each of size A000166(n-2) (the class starting with the digit 1 is empty since we must have the substring n1). Hence d_n1 = (n-1)*A000166(n-2) and A000166(n-2) is the size of each nonempty class in d_n1. For example, d_71 = 6*44 = 264, so there are 264 permutations in d_71 distributed in 6 nonempty classes of size A000166(5) = 44. (To get permutations in d_n1 recursively from more basic ones see the link "Forbidden Patterns" below.) - Enrique Navarrete, Jan 15 2017
Also the number of maximum matchings and minimum edge covers in the n-crown graph. - Eric W. Weisstein, Jun 14 and Dec 24 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) for all n and k, which in turn is easily proved by induction making use of the recurrence a(n) = n*a(n-1) + (-1)^n. - Peter Bala, Nov 21 2017
a(n) is the number of distinct possible solutions for a directed, no self loop containing graph (not necessarily connected) that has n vertices, and each vertex has an in- and out-degree of exactly 1. - Patrik Holopainen, Sep 18 2018
a(n) is the dimension of the kernel of the random-to-top and random-to-random shuffling operators over a collection of n objects (in a vector space of size n!), as noticed by M. Wachs and V. Reiner. See the Reiner, Saliola and Welker reference below. - Nadia Lafreniere, Jul 18 2019
a(n) is the number of distinct permutations for a Secret Santa gift exchange with n participants. - Patrik Holopainen, Dec 30 2019
a(2*n+1) is even. More generally, a(m*n+1) is divisible by m*n, which follows from a(n+1) = n*(a(n) + a(n-1)) = n*A000255(n-1) for n >= 1. a(2*n) is odd; in fact, a(2*n) == 1 (mod 8). Other divisibility properties include a(6*n) == 1 (mod 24), a(9*n+4) == a(9*n+7) == 0 (mod 9), a(10*n) == 1 (mod 40), a(11*n+5) == 0 (mod 11) and a(13*n+8 ) == 0 (mod 13). - Peter Bala, Apr 05 2022
Conjecture: a(n) with n > 2 is a perfect power only for n = 4 with a(4) = 3^2. This has been verified for n <= 1000. - Zhi-Wei Sun, Jan 09 2025
REFERENCES
U. Abel, Some new identities for derangement numbers, Fib. Q., 56:4 (2018), 313-318.
M. Bona, Combinatorics of Permutations, Chapman & Hall/CRC, Boca Raton, Florida, 2004.
Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 32.
R. A. Brualdi and H. J. Ryser: Combinatorial Matrix Theory, 1992, Section 7.2, p. 202.
Ch. A. Charalambides, Enumerative Combinatorics, Chapman & Hall/CRC, Boca Raton, Florida, 2002.
L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 182.
Florence Nightingale David and D. E. Barton, Combinatorial Chance. Hafner, NY, 1962, p. 168.
Florence Nightingale David, Maurice George Kendall, and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 263, Table 7.5.1, row 1.
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.
J. M. de Saint-Martin, "Le problème des rencontres" in Quadrature, No. 61, pp. 14-19, 2006, EDP-Sciences Les Ulis (France).
H. Doerrie, 100 Great Problems of Elementary Mathematics, Dover, NY, 1965, p. 19.
Leonhard Euler, Solution quaestionis curiosae ex doctrina combinationum, Mémoires Académie sciences St. Pétersburg 3 (1809/1810), 57-64; also E738 in his Collected Works, series I, volume 7, pages 435-440.
J. M. Gandhi, On logarithmic numbers, Math. Student, 31 (1963), 73-83.
A. Hald, A History of Probability and Statistics and Their Applications Before 1750, Wiley, NY, 1990 (Chapter 19).
Irving Kaplansky, John Riordan, The problème des ménages. Scripta Math. 12 (1946), 113-124. See Eq(1).
Arnold Kaufmann, "Introduction à la combinatorique en vue des applications." Dunod, Paris, 1968. See p. 92.
Florian Kerschbaum and Orestis Terzidis, Filtering for Private Collaborative Benchmarking, in Emerging Trends in Information and Communication Security, Lecture Notes in Computer Science, Volume 3995/2006.
E. Lozansky and C. Rousseau, Winning Solutions, Springer, 1996; see p. 152.
P. A. MacMahon, Combinatory Analysis, 2 vols., Chelsea, NY, 1960, see p. 102.
M. S. Petković, "Non-attacking rooks", Famous Puzzles of Great Mathematicians, pp. 265-268, Amer. Math. Soc.(AMS), 2009.
V. Reiner, F. Saliola, and V. Welker. Spectra of Symmetrized Shuffling Operators, Memoirs of the American Mathematical Society, vol. 228, Amer. Math. Soc., Providence, RI, 2014, pp. 1-121. See section VI.9.
J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 65.
H. J. Ryser, Combinatorial Mathematics. Mathematical Association of America, Carus Mathematical Monograph 14, 1963, p. 23.
T. Simpson, Permutations with unique fixed and reflected points. Ars Combin. 39 (1995), 97-108.
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).
David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 122.
D. B. West, Combinatorial Mathematics, Cambridge, 2021, p. 82.
H. S. Wilf, Generatingfunctionology, Academic Press, NY, 1990, p. 147, Eq. 5.2.9 (q=1).
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..450 (terms 0..200 from T. D. Noe)
Christian Aebi and Grant Cairns, Generalizations of Wilson's Theorem for Double-, Hyper-, Sub-and Superfactorials, The American Mathematical Monthly 122.5 (2015): 433-443.
Joerg Arndt, Generating Random Permutations, PhD thesis, Australian National University, Canberra, Australia, (2010).
Etor Arza, Aritz Perez, Ekhine Irurozki, and Josu Ceberio, Kernels of Mallows Models under the Hamming Distance for solving the Quadratic Assignment Problem, arXiv:1910.08800 [stat.ML], 2019.
Roland Bacher, Counting Packings of Generic Subsets in Finite Groups, Electr. J. Combinatorics, 19 (2012), #P7.
Roland Bacher and P. De La Harpe, Conjugacy growth series of some infinitely generated groups, arXiv:1603.07943 [math.GR], 2016.
B. Balof and H. Jenne, Tilings, Continued Fractions, Derangements, Scramblings, and e, Journal of Integer Sequences, 17 (2014), #14.2.7.
V. Baltic, On the number of certain types of strongly restricted permutations, Appl. An. Disc. Math. 4 (2010), 119-135; Doi:10.2298/AADM1000008B.
E. Barcucci, A. Del Lungo, and R. Pinzani, "Deco" polyominoes, permutations and random generation, Theoretical Computer Science, 159, 1996, 29-42.
D. Barsky, Analyse p-adique et suites classiques de nombres, Sem. Loth. Comb. B05b (1981) 1-21.
Arthur T. Benjamin and Joel Ornstein, A bijective proof of a derangement recurrence, Fibonacci Quart., 55(5):28-29, 2017.
H. Bergeron, E. M. F. Curado, J. P. Gazeau, and L. M. C. S. Rodrigues, A note about combinatorial sequences and Incomplete Gamma function, arXiv preprint arXiv: 1309.6910 [math.CO], 2013.
Natasha Blitvić and Einar Steingrímsson, Permutations, moments, measures, arXiv:2001.00280 [math.CO], 2020.
Stefano Capparelli, Margherita Maria Ferrari, Emanuele Munarini, and Norma Zagaglia Salvi, A Generalization of the "Problème des Rencontres", J. Int. Seq. 21 (2018), #18.2.8.
Lapo Cioni and Luca Ferrari, Preimages under the Queuesort algorithm, arXiv preprint arXiv:2102.07628 [math.CO], 2021; Discrete Math., 344 (2021), #112561.
P. Cvitanovic, Group theory for Feynman diagrams in non-Abelian gauge theories, Phys. Rev. D14 (1976), 1536-1553.
S. K. Das and N. Deo, Rencontres graphs: a family of bipartite graphs, Fib. Quart., Vol. 25, No. 3, August 1987, 250-262.
R. Davis and B. Sagan, Pattern-Avoiding Polytopes, arXiv preprint arxiv:1609.01782 [math.CO], 2016.
J. Désarménien, Une autre interprétation du nombre de dérangements, Sem. Loth. Comb. B08b (1982) 11-16.
Emeric Deutsch and S. Elizalde, The largest and the smallest fixed points of permutations, arXiv:0904.2792 [math.CO], 2009.
R. M. Dickau, Derangement diagrams.
Tomislav Došlic and Darko Veljan, Logarithmic behavior of some combinatorial sequences, Discrete Math. 308 (2008), no. 11, 2182--2212. MR2404544 (2009j:05019).
P. Duchon and R. Duvignau, A new generation tree for permutations, FPSAC 2014, Chicago, USA; Discrete Mathematics and Theoretical Computer Science (DMTCS) Proceedings, 2014, 679-690.
J. East and R. D. Gray, Idempotent generators in finite partition monoids and related semigroups, arXiv preprint arXiv:1404.2359 [math.GR], 2014.
Sergi Elizalde, A simple bijective proof of a familiar derangement recurrence, arXiv:2005.11312 [math.CO], 2020.
Philip Feinsilver and John McSorley, Zeons, Permanents, the Johnson Scheme, and Generalized Derangements, International Journal of Combinatorics, Volume 2011, Article ID 539030, 29 pages.
FindStat - Combinatorial Statistic Finder, The number of fixed points of a permutation.
H. Fripertinger, The Rencontre Numbers. [Broken link]
Hannah Fry and Brady Haran, The Problems with Secret Santa, Numberphile video (2016).
Jason Fulman and Robert Guralnick, Derangements in simple and primitive groups, arXiv:math/0208022 [math.GR], 2002.
J. M. Gandhi, On logarithmic numbers, Math. Student, 31 (1963), 73-83. [Annotated scanned copy]
Zbigniew Gołębiewski and Mateusz Klimczak, Protection Number of Recursive Trees, 2019 Proceedings of the Sixteenth Workshop on Analytic Algorithmics and Combinatorics (ANALCO).
O. Gonzalez, C. Beltran, and I. Santamaria, On the Number of Interference Alignment Solutions for the K-User MIMO Channel with Constant Coefficients, arXiv preprint arXiv:1301.6196 [cs.IT], 2013.
G. Gordon and E. McMahon, Moving faces to other places: facet derangements, Amer. Math. Monthly, 117 (2010), 865-88.
R. K. Guy and R. J. Nowakowski, Mousetrap, Preprint, Feb 10 1993. [Annotated scanned copy]
Amihay Hanany, Vishnu Jejjala, Sanjaye Ramgoolam, and Rak-Kyeong Seong, Consistency and Derangements in Brane Tilings, arXiv:1512.09013 [hep-th], 2015.
Mehdi Hassani, Derangements and Applications, Journal of Integer Sequences, Vol. 6 (2003), #03.1.2.
M. Hassani, Counting and computing by e, arXiv:math/0606613 [math.CO], 2006.
Nick Hobson, Python program.
Q.-H. Hou, Z.-W. Sun and H.-M. Wen, On monotonicity of some combinatorial sequences, arXiv:1208.3903 [math.CO], 2012-2014.
Ekhine Irurozki, B. Calvo, and J. A. Lozano, PerMallows: An R Package for Mallows and Generalized Mallows Models, Journal of Statistical Software, August 2016, Volume 71, Issue 12. doi: 10.18637/jss.v071.i12.
Milan Janjic, Determinants and Recurrence Sequences, Journal of Integer Sequences, 2012, Article 12.3.5.
Shirali Kadyrov and Farukh Mashurov, Generalized continued fraction expansions for Pi and E, arXiv:1912.03214 [math.NT], 2019.
I. Kaplansky and J. Riordan, The problème des ménages, Scripta Math. 12, (1946), 113-124. [Scan of annotated copy]
Vaclav Kotesovec, Non-attacking chess pieces, 6ed, 2013, p. 220.
A. R. Kräuter, Über die Permanente gewisser zirkulärer Matrizen..., Séminaire Lotharingien de Combinatoire, B11b (1984), 11 pp.
J. W. Layman, The Hankel Transform and Some of its Properties, J. Integer Sequences, 4 (2001), #01.1.5.
Les Tablettes du Chercheur, 52. Combinaisons, pp. 10-11, Dec 01 1890.
Rui-Li Liu and Feng-Zhen Zhao, New Sufficient Conditions for Log-Balancedness, With Applications to Combinatorial Sequences, J. Int. Seq., Vol. 21 (2018), Article 18.5.7.
E. Lucas, Théorie des nombres (annotated scans of a few selected pages).
T. Mansour and M. Shattuck, Counting permutations by the number of successors within cycles, Discr. Math., 339 (2016), 1368-1376.
Richard J. Martin and Michael J. Kearney, Integral representation of certain combinatorial recurrences, Combinatorica: 35:3 (2015), 309-315.
Ivica Martinjak and Dajana Stanić, A Short Combinatorial Proof of Derangement Identity, arXiv:1711.04537 [math.CO], 2017.
R. D. McKelvey and A. McLennan, The maximal number of regular totally mixed Nash equilibria, J. Economic Theory, 72:411--425, 1997.
J. R. G. Mendonça, On the uniform generation of random derangements, arXiv:1809.04571 [stat.CO], 2018.
Romeo Mestrovic, Variations of Kurepa's left factorial hypothesis, arXiv preprint arXiv:1312.7037 [math.NT], 2013.
Emanuele Munarini, q-Derangement Identities, J. Int. Seq., Vol. 23 (2020), Article 20.3.8.
Emanuele Munarini, Two-Parameter Identities for q-Appell Polynomials, Journal of Integer Sequences, Vol. 26 (2023), Article 23.3.1.
Enrique Navarrete, Forbidden Patterns and the Alternating Derangement Sequence, arXiv:1610.01987 [math.CO], 2016.
Andrew O'Desky and David Harry Richman, Derangements and the p-adic incomplete gamma function, arXiv:2012.04615 [math.NT], 2020.
R. Ondrejka, The first 100 exact subfactorials (Review), Math. Comp., 21 (1967), 502.
Hyungju Park, An Asymptotic Formula for the Number of Stabilized-Interval-Free Permutations, J. Int. Seq. (2023) Vol. 26, Art. 23.9.3.
P. Peart and W.-J. Woan, Generating Functions via Hankel and Stieltjes Matrices, J. Integer Seqs., Vol. 3 (2000), #00.2.1.
Alexsandar Petojevic, The Function vM_m(s; a; z) and Some Well-Known Sequences, Journal of Integer Sequences, Vol. 5 (2002), Article 02.1.7.
K. Ragnarsson and B. E. Tenner, Homotopy type of the Boolean complex of a Coxeter system, Adv. Math. 222 (2009), 409-430.
J. B. Remmel, A note on a recursion for the number of derangements, European J. Combin., 4(4):371-374, 1983.
John Riordan, Letter to N. J. A. Sloane, Sep 26 1980 with notes on the 1973 Handbook of Integer Sequences. Note that the sequences are identified by their N-numbers, not their A-numbers.
M. Rumney and E. J. F. Primrose, A sequence connected with the subfactorial sequence, Note 3207, Math. Gaz. 52 (1968), 381-382.
M. Rumney and E. J. F. Primrose, A sequence connected with the subfactorial sequence, Note 3207, Math. Gaz. 52 (1968), 381-382. [Annotated scanned copy]
E. Sandifer, How Euler Did It, Derangements.
M. Shattuck, Combinatorial proofs of some Bell number formulas, arXiv preprint arXiv:1401.6588 [math.CO], 2014.
T. Simpson, Permutations with unique fixed and reflected points, Preprint. (Annotated scanned copy)
Michael Z. Spivey and Laura L. Steil, The k-Binomial Transforms and the Hankel Transform, Journal of Integer Sequences, Vol. 9 (2006), Article 06.1.1.
R. J. Stones, S. Lin, X. Liu, and G. Wang, On Computing the Number of Latin Rectangles, Graphs and Combinatorics (2016) 32:1187-1202; DOI 10.1007/s00373-015-1643-1.
Xinyu Sun, New Lower Bound On The Number of Ternary Square-Free Words, J. Integer Seqs., Vol. 6, 2003.
L. Takacs, The Problem of Coincidences, Archive for History of Exact Sciences, Volume 21, No. 3, Sept. 1980. pp. 229-244, paragraph 3.
R. Vidunas, MacMahon's master theorem and totally mixed Nash equilibria, arXiv:1401.5400 [math.CO], 2014, see (7).
G. Villemin's Almanach of Numbers, Sous-factorielle.
Chenying Wang, Piotr Miska, and István Mezo, The r-derangement numbers, Discrete Mathematics 340.7 (2017): 1681-1692.
Yi Wang and Bao-Xuan Zhu, Proofs of some conjectures on monotonicity of number-theoretic and combinatorial sequences, arXiv preprint arXiv:1303.5595 [math.CO], 2013.
Eric Weisstein's World of Mathematics, Crown Graph.
Eric Weisstein's World of Mathematics, Derangement.
Eric Weisstein's World of Mathematics, Edge Cover.
Eric Weisstein's World of Mathematics, Exponential Distribution.
Eric Weisstein's World of Mathematics, Matching.
Eric Weisstein's World of Mathematics, Maximum Independent Edge Set.
Eric Weisstein's World of Mathematics, Rooks Problem.
Eric Weisstein's World of Mathematics, Subfactorial.
Wikipedia, Derangement.
Wikipedia, Rencontres numbers.
Herbert S. Wilf, A bijection in the theory of derangements, Mathematics Magazine, 57(1):37-40, 1984.
H. S. Wilf, Generatingfunctionology, 2nd edn., Academic Press, NY, 1994, p. 176, Eq. 5.2.9 (q=1).
E. M. Wright, Arithmetical properties of Euler's rencontre number, J. London Math. Soc., (2) (1971/1972), 437-442.
D. Zeilberger, Automatic Enumeration of Generalized Menage Numbers, arXiv preprint arXiv:1401.1089 [math.CO], 2014.
OEIS Wiki, Rencontres numbers.
FORMULA
a(n) = A008290(n,0).
a(n) + A003048(n+1) = 2*n!. - D. G. Rogers, Aug 26 2006
a(n) = {(n-1)!/exp(1)}, n > 1, where {x} is the nearest integer function. - Simon Plouffe, March 1993 [This uses offset 1, see below for the version with offset 0. - Charles R Greathouse IV, Jan 25 2012]
a(0) = 1, a(n) = round(n!/e) = floor(n!/e + 1/2) for n > 0.
a(n) = n!*Sum_{k=0..n} (-1)^k/k!.
D-finite with recurrence a(n) = (n-1)*(a(n-1) + a(n-2)), n > 0.
a(n) = n*a(n-1) + (-1)^n.
E.g.f.: exp(-x)/(1-x).
a(n) = Sum_{k=0..n} binomial(n, k)*(-1)^(n-k)*k! = Sum_{k=0..n} (-1)^(n-k)*n!/(n-k)!. - Paul Barry, Aug 26 2004
The e.g.f. y(x) satisfies y' = x*y/(1-x).
Inverse binomial transform of A000142. - Ross La Haye, Sep 21 2004
In Maple notation, representation as n-th moment of a positive function on [-1, infinity]: a(n)= int( x^n*exp(-x-1), x=-1..infinity ), n=0, 1... . a(n) is the Hamburger moment of the function exp(-1-x)*Heaviside(x+1). - Karol A. Penson, Jan 21 2005
a(n) = A001120(n) - n!. - Philippe Deléham, Sep 04 2005
a(n) = Integral_{x=0..oo} (x-1)^n*exp(-x) dx. - Gerald McGarvey, Oct 14 2006
a(n) = Sum_{k=2,4,...} T(n,k), where T(n,k) = A092582(n,k) = k*n!/(k+1)! for 1 <= k < n and T(n,n)=1. - Emeric Deutsch, Feb 23 2008
a(n) = n!/e + (-1)^n*(1/(n+2 - 1/(n+3 - 2/(n+4 - 3/(n+5 - ...))))). Asymptotic result (Ramanujan): (-1)^n*(a(n) - n!/e) ~ 1/n - 2/n^2 + 5/n^3 - 15/n^4 + ..., where the sequence [1,2,5,15,...] is the sequence of Bell numbers A000110. - Peter Bala, Jul 14 2008
From William Vaughn (wvaughn(AT)cvs.rochester.edu), Apr 13 2009: (Start)
a(n) = Integral_{p=0..1} (log(1/(1-p)) - 1)^n dp.
Proof: Using the substitutions 1=log(e) and y = e(1-p) the above integral can be converted to ((-1)^n/e) Integral_{y=0..e} (log(y))^n dy.
From CRC Integral tables we find the antiderivative of (log(y))^n is (-1)^n n! Sum_{k=0..n} (-1)^k y(log(y))^k / k!.
Using the fact that e(log(e))^r = e for any r >= 0 and 0(log(0))^r = 0 for any r >= 0 the integral becomes n! * Sum_{k=0..n} (-1)^k / k!, which is line 9 of the Formula section. (End)
a(n) = exp(-1)*Gamma(n+1,-1) (incomplete Gamma function). - Mark van Hoeij, Nov 11 2009
G.f.: 1/(1-x^2/(1-2x-4x^2/(1-4x-9x^2/(1-6x-16x^2/(1-8x-25x^2/(1-... (continued fraction). - Paul Barry, Nov 27 2009
a(n) = Sum_{p in Pano1(n)} M2(p), n >= 1, with Pano1(n) the set of partitions without part 1, and the multinomial M2 numbers. See the characteristic array for partitions without part 1 given by A145573 in Abramowitz-Stegun (A-S) order, with A002865(n) the total number of such partitions. The M2 numbers are given for each partition in A-St order by the array A036039. - Wolfdieter Lang, Jun 01 2010
a(n) = row sum of A008306(n), n > 1. - Gary Detlefs, Jul 14 2010
a(n) = ((-1)^n)*(n-1)*hypergeom([-n+2, 2], [], 1), n>=1; 1 for n=0. - Wolfdieter Lang, Aug 16 2010
a(n) = (-1)^n * hypergeom([ -n, 1], [], 1), n>=1; 1 for n=0. From the binomial convolution due to the e.g.f. - Wolfdieter Lang, Aug 26 2010
Integral_{x=0..1} x^n*exp(x) = (-1)^n*(a(n)*e - n!).
O.g.f.: Sum_{n>=0} n^n*x^n/(1 + (n+1)*x)^(n+1). - Paul D. Hanna, Oct 06 2011
Abs((a(n) + a(n-1))*e - (A000142(n) + A000142(n-1))) < 2/n. - Seiichi Kirikami, Oct 17 2011
G.f.: hypergeom([1,1],[],x/(x+1))/(x+1). - Mark van Hoeij, Nov 07 2011
From Sergei N. Gladkovskii, Nov 25 2011, Jul 05 2012, Sep 23 2012, Oct 13 2012, Mar 09 2013, Mar 10 2013, Oct 18 2013: (Start)
Continued fractions:
In general, e.g.f. (1+a*x)/exp(b*x) = U(0) with U(k) = 1 + a*x/(1-b/(b-a*(k+1)/U(k+1))). For a=-1, b=-1: exp(-x)/(1-x) = 1/U(0).
E.g.f.: (1-x/(U(0)+x))/(1-x), where U(k) = k+1 - x + (k+1)*x/U(k+1).
E.g.f.: 1/Q(0) where Q(k) = 1 - x/(1 - 1/(1 - (k+1)/Q(k+1))).
G.f.: 1/U(0) where U(k) = 1 + x - x*(k+1)/(1 - x*(k+1)/U(k+1)).
G.f.: Q(0)/(1+x) 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))).
G.f.: 1/Q(0) where Q(k) = 1 - 2*k*x - x^2*(k + 1)^2/Q(k+1).
G.f.: T(0) where T(k) = 1 - x^2*(k+1)^2/(x^2*(k+1)^2-(1-2*x*k)*(1-2*x-2*x*k)/T(k+1)). (End)
0 = a(n)*(a(n+1) + 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) if n>=0. - Michael Somos, Jan 25 2014
a(n) = Sum_{k = 0..n} (-1)^(n-k)*binomial(n,k)*(k + x)^k*(k + x + 1)^(n-k) = Sum_{k = 0..n} (-1)^(n-k)*binomial(n,k)*(k + x)^(n-k)*(k + x - 1)^k, for arbitrary x. - Peter Bala, Feb 19 2017
From Peter Luschny, Jun 20 2017: (Start)
a(n) = Sum_{j=0..n} Sum_{k=0..n} binomial(-j-1, -n-1)*abs(Stirling1(j, k)).
a(n) = Sum_{k=0..n} (-1)^(n-k)*Pochhammer(n-k+1, k) (cf. A008279). (End)
a(n) = n! - Sum_{j=0..n-1} binomial(n,j) * a(j). - Alois P. Heinz, Jan 23 2019
Sum_{n>=2} 1/a(n) = A281682. - Amiram Eldar, Nov 09 2020
a(n) = KummerU(-n, -n, -1). - Peter Luschny, May 10 2022
a(n) = (-1)^n*Sum_{k=0..n} Bell(k)*Stirling1(n+1, k+1). - Mélika Tebni, Jul 05 2022
EXAMPLE
a(2) = 1, a(3) = 2 and a(4) = 9 since the possibilities are {BA}, {BCA, CAB} and {BADC, BCDA, BDAC, CADB, CDAB, CDBA, DABC, DCAB, DCBA}. - Henry Bottomley, Jan 17 2001
The Boolean complex of the complete graph K_4 is homotopy equivalent to the wedge of 9 3-spheres.
Necklace problem for n = 6: partitions without part 1 and M2 numbers for n = 6: there are A002865(6) = 4 such partitions, namely (6), (2,4), (3^2) and (2^3) in A-St order with the M2 numbers 5!, 90, 40 and 15, respectively, adding up to 265 = a(6). This corresponds to 1 necklace with 6 beads, two necklaces with 2 and 4 beads respectively, two necklaces with 3 beads each and three necklaces with 2 beads each. - Wolfdieter Lang, Jun 01 2010
G.f. = 1 + x^2 + 9*x^3 + 44*x^4 + 265*x^5 + 1854*x^6 + 14833*x^7 + 133496*x^8 + ...
MAPLE
A000166 := proc(n) option remember; if n<=1 then 1-n else (n-1)*(procname(n-1)+procname(n-2)); fi; end;
a:=n->n!*sum((-1)^k/k!, k=0..n): seq(a(n), n=0..21); # Zerinvary Lajos, May 17 2007
ZL1:=[S, {S=Set(Cycle(Z, card>1))}, labeled]: seq(count(ZL1, size=n), n=0..21); # Zerinvary Lajos, Sep 26 2007
with (combstruct):a:=proc(m) [ZL, {ZL=Set(Cycle(Z, card>=m))}, labeled]; end: A000166:=a(2):seq(count(A000166, size=n), n=0..21); # Zerinvary Lajos, Oct 02 2007
Z := (x, m)->m!^2*sum(x^j/((m-j)!^2), j=0..m): R := (x, n, m)->Z(x, m)^n: f := (t, n, m)->sum(coeff(R(x, n, m), x, j)*(t-1)^j*(n*m-j)!, j=0..n*m): seq(f(0, n, 1), n=0..21); # Zerinvary Lajos, Jan 22 2008
a:=proc(n) if `mod`(n, 2)=1 then sum(2*k*factorial(n)/factorial(2*k+1), k=1.. floor((1/2)*n)) else 1+sum(2*k*factorial(n)/factorial(2*k+1), k=1..floor((1/2)*n)-1) end if end proc: seq(a(n), n=0..20); # Emeric Deutsch, Feb 23 2008
G(x):=2*exp(-x)/(1-x): f[0]:=G(x): for n from 1 to 26 do f[n]:=diff(f[n-1], x) od: x:=0: seq(f[n]/2, n=0..21); # Zerinvary Lajos, Apr 03 2009
seq(simplify(KummerU(-n, -n, -1)), n = 0..23); # Peter Luschny, May 10 2022
MATHEMATICA
a[0] = 1; a[n_] := n*a[n - 1] + (-1)^n; a /@ Range[0, 21] (* Robert G. Wilson v *)
a[0] = 1; a[1] = 0; a[n_] := Round[n!/E] /; n >= 1 (* Michael Taktikos, May 26 2006 *)
Range[0, 20]! CoefficientList[ Series[ Exp[ -x]/(1 - x), {x, 0, 20}], x]
dr[{n_, a1_, a2_}]:={n+1, a2, n(a1+a2)}; Transpose[NestList[dr, {0, 0, 1}, 30]][[3]] (* Harvey P. Dale, Feb 23 2013 *)
a[n_] := (-1)^n HypergeometricPFQ[{- n, 1}, {}, 1]; (* Michael Somos, Jun 01 2013 *)
a[n_] := n! SeriesCoefficient[Exp[-x] /(1 - x), {x, 0, n}]; (* Michael Somos, Jun 01 2013 *)
Table[Subfactorial[n], {n, 0, 21}] (* Jean-François Alcover, Jan 10 2014 *)
RecurrenceTable[{a[n] == n*a[n - 1] + (-1)^n, a[0] == 1}, a, {n, 0, 23}] (* Ray Chandler, Jul 30 2015 *)
Subfactorial[Range[0, 20]] (* Eric W. Weisstein, Dec 31 2017 *)
nxt[{n_, a_}]:={n+1, a(n+1)+(-1)^(n+1)}; NestList[nxt, {0, 1}, 25][[All, 2]] (* Harvey P. Dale, Jun 01 2019 *)
PROG
(PARI) {a(n) = if( n<1, 1, n * a(n-1) + (-1)^n)}; /* Michael Somos, Mar 24 2003 */
(PARI) {a(n) = n! * polcoeff( exp(-x + x * O(x^n)) / (1 - x), n)}; /* Michael Somos, Mar 24 2003 */
(PARI) {a(n)=polcoeff(sum(m=0, n, m^m*x^m/(1+(m+1)*x+x*O(x^n))^(m+1)), n)} /* Paul D. Hanna */
(PARI) A000166=n->n!*sum(k=0, n, (-1)^k/k!) \\ M. F. Hasler, Jan 26 2012
(PARI) a(n)=if(n, round(n!/exp(1)), 1) \\ Charles R Greathouse IV, Jun 17 2012
(PARI) apply( {A000166(n)=n!\/exp(n>0)}, [0..22]) \\ M. F. Hasler, Nov 09 2024
(Python) See Hobson link.
(Maxima)
s[0]:1$
s[n]:=n*s[n-1]+(-1)^n$
makelist(s[n], n, 0, 12); /* Emanuele Munarini, Mar 01 2011 */
(Haskell)
a000166 n = a000166_list !! n
a000166_list = 1 : 0 : zipWith (*) [1..]
(zipWith (+) a000166_list $ tail a000166_list)
-- Reinhard Zumkeller, Dec 09 2012
(Python)
A000166_list, m, x = [], 1, 1
for n in range(10*2):
x, m = x*n + m, -m
A000166_list.append(x) # Chai Wah Wu, Nov 03 2014
(Magma) I:=[0, 1]; [1] cat [n le 2 select I[n] else (n-1)*(Self(n-1)+Self(n-2)): n in [1..30]]; // Vincenzo Librandi, Jan 07 2016
CROSSREFS
For the probabilities a(n)/n!, see A053557/A053556 and A103816/A053556.
A diagonal of A008291 and A068106. Column A008290(n,0).
A001120 has a similar recurrence.
For other derangement numbers see also A053871, A033030, A088991, A088992.
Pairwise sums of A002741 and A000757. Differences of A001277.
A diagonal in triangles A008305 and A010027.
a(n)/n! = A053557/A053556 = (N(n, n) of A103361)/(D(n, n) of A103360).
Column k=0 of A086764 and of A334715. Column k=1 of A364068.
Row sums of A216963 and of A323671.
KEYWORD
core,nonn,easy,nice
EXTENSIONS
Minor edits by M. F. Hasler, Jan 16 2017
STATUS
approved
Number of terms in the Zeckendorf representation of n (write n as a sum of non-consecutive distinct Fibonacci numbers).
+10
152
0, 1, 1, 1, 2, 1, 2, 2, 1, 2, 2, 2, 3, 1, 2, 2, 2, 3, 2, 3, 3, 1, 2, 2, 2, 3, 2, 3, 3, 2, 3, 3, 3, 4, 1, 2, 2, 2, 3, 2, 3, 3, 2, 3, 3, 3, 4, 2, 3, 3, 3, 4, 3, 4, 4, 1, 2, 2, 2, 3, 2, 3, 3, 2, 3, 3, 3, 4, 2, 3, 3, 3, 4, 3, 4, 4, 2, 3, 3, 3, 4, 3, 4, 4, 3, 4, 4, 4, 5, 1, 2, 2, 2, 3, 2, 3, 3, 2, 3, 3, 3, 4, 2, 3, 3
OFFSET
0,5
COMMENTS
Also number of 0's (or B's) in the Wythoff representation of n -- see the Reble link. See also A135817 for references and links for the Wythoff representation for n >= 1. - Wolfdieter Lang, Jan 21 2008; N. J. A. Sloane, Jun 28 2008
Or, a(n) is the number of applications of Wythoff's B sequence A001950 needed in the unique Wythoff representation of n >= 1. E.g., 16 = A(B(A(A(B(1))))) = ABAAB = `10110`, hence a(16) = 2. - Wolfdieter Lang, Jan 21 2008
Let M(0) = 0, M(1) = 1 and for i > 0, M(i+1) = f(concatenation of M(j), j from 0 to i - 1) where f is the morphism f(k) = k + 1. Then the sequence is the concatenation of M(j) for j from 0 to infinity. - Claude Lenormand (claude.lenormand(AT)free.fr), Dec 16 2003
From Joerg Arndt, Nov 09 2012: (Start)
Let m be the number of parts in the listing of the compositions of n into odd parts as lists of parts in lexicographic order, a(k) = (n - length(composition(k)))/2 for all k < Fibonacci(n) and all n (see example).
Let m be the number of parts in the listing of the compositions of n into parts 1 and 2 as lists of parts in lexicographic order, a(k) = n - length(composition(k)) for all k < Fibonacci(n) and all n (see example).
A000120 gives the equivalent for (all) compositions. (End)
a(n) = A104324(n) - A213911(n); row lengths in A035516 and A035516. - Reinhard Zumkeller, Mar 10 2013
a(n) is also the minimum number of Fibonacci numbers which sum to n, regardless of adjacency or duplication. - Alan Worley, Apr 17 2015
This follows from the fact that the sequence is subadditive: a(n+m) <= a(n) + a(m) for nonnegative integers n,m. See Lemma 2.1 of the Stoll link. - Robert Israel, Apr 17 2015
From Michel Dekking, Mar 08 2020: (Start)
This sequence is a morphic sequence on an infinite alphabet, i.e., (a(n)) is a letter-to-letter projection of a fixed point of a morphism tau.
The alphabet is {0,1,...,j,...}X{0,1}, and tau is given by
tau((j,0)) = (j,0) (j+1,1),
tau((j,1)) = (j,0).
The letter-to-letter map is given by the projection on the first coordinate: (j,i)->j for i=0,1.
To prove this, note first that the second coordinate of the letters generates the infinite Fibonacci word = A003849 = 0100101001001....
This implies that for all n and j one has
|tau^n(j,0)| = F(n+2),
where |w| denotes the length of a word w, and (F(n)) = A000045 are the Fibonacci numbers.
Secondly, we need the following simple, but crucial observation. Let the Zeckendorf representation of n be Z(n) = A014417(n). For example,
Z(0) = 0, Z(1) = 1, Z(2) = 10, Z(3) = 100, Z(4) = 101, Z(5) = 1000.
From the unicity of the Zeckendorf representation it follows that for the positions i = 0,1,...,F(n)-1 one has
Z(F(n+1)+i) = 10...0 Z(i),
where zeros are added to Z(i) to give the total representation length n-1.
This gives for i = 0,1,...,F(n)-1 that
a(F(n+1)+i) = a(i) + 1.
From the first observation follows that the first F(n+1) letters of tau^n(j,0) are equal to tau^{n-1}(j,0), and the last F(n) letters of tau^n(j,0) are equal to tau^{n-1}(j+1,1) = tau^{n-2}(j+1,0).
Combining this with the second observation shows that the first coordinate of the fixed point of tau, starting from (0,0), gives (a(n)).
It is of course possible to obtain a morphism tau' on the natural numbers by changing the alphabet: (j,0)-> 2j (j,1)-> 2j+1, which yields the morphism
tau'(2j) = 2j, 2j+3, tau'(2j+1) = 2j.
The fixed point of tau' starting with 0 is
u = 03225254254472544747625...
The corresponding letter-to-letter map lambda is given by lambda(2j)=j, lambda(2j+1)= j. Then lambda(u) = (a(n)).
(End)
REFERENCES
Cornelius Gerrit Lekkerkerker, Voorstelling van natuurlijke getallen door een som van getallen van Fibonacci, Simon Stevin 29 (1952), 190-195.
F. Weinstein, The Fibonacci Partitions, preprint, 1995.
Édouard Zeckendorf, Représentation des nombres naturels par une somme des nombres de Fibonacci ou de nombres de Lucas, Bull. Soc. Roy. Sci. Liège 41, 179-182, 1972.
LINKS
Joerg Arndt, Matters Computational (The Fxtbook), pp. 754-756.
Paul Baird-Smith, Alyssa Epstein, Kristen Flint, and Steven J. Miller, The Zeckendorf Game, arXiv:1809.04881 [math.NT], 2018.
D. E. Daykin, Representation of natural numbers as sums of generalized Fibonacci numbers, J. London Math. Soc. 35 (1960) 143-160.
Michel Dekking, Points of increase of the sum of digits function of the base phi expansion, arXiv:2003.14125 [math.CO], 2020.
F. Michel Dekking, The sum of digits functions of the Zeckendorf and the base phi expansions, Theoretical Computer Science (2021) Vol. 859, 70-79.
Damien Jamet, Pierre Popoli, and Thomas Stoll, Maximum order complexity of the sum of digits function in Zeckendorf base and polynomial subsequences, arXiv:2106.09959 [math.NT], 2021, see p. 5.
C. G. Lekkerkerker, Voorstelling van natuurlijke getallen door een som van getallen van Fibonacci, Stichting Mathematisch Centrum, Zuivere Wiskunde, 1951.
A. J. Macfarlane, On the fibbinary numbers and the Wythoff array, arXiv:2405.18128 [math.CO], 2024. See p. 10.
Thomas Stoll, Combinatorial constructions for the Zeckendorf sum of digits of polynomial values, The Ramanujan Journal November 2013, Volume 32, Issue 2, pp 227-243.
F. V. Weinstein, Notes on Fibonacci partitions, arXiv:math/0307150 [math.NT], 2003-2018.
FORMULA
a(n) = A000120(A003714(n)). - Reinhard Zumkeller, May 05 2005
a(n) = A107015(n) + A107016(n). - Reinhard Zumkeller, May 09 2005
a(n) = A143299(n+1) - 1. - Filip Zaludek, Oct 31 2016
a(n) = A007953(A014417(n)). - Amiram Eldar, Oct 10 2023
EXAMPLE
a(46) = a(1 + 3 + 8 + 34) = 4.
From Joerg Arndt, Nov 09 2012: (Start)
Connection to the compositions of n into odd parts (see comment):
[ #]: a(n) composition into odd parts
[ 0] [ 0] 1 1 1 1 1 1 1 1
[ 1] [ 1] 1 1 1 1 1 3
[ 2] [ 1] 1 1 1 1 3 1
[ 3] [ 1] 1 1 1 3 1 1
[ 4] [ 2] 1 1 1 5
[ 5] [ 1] 1 1 3 1 1 1
[ 6] [ 2] 1 1 3 3
[ 7] [ 2] 1 1 5 1
[ 8] [ 1] 1 3 1 1 1 1
[ 9] [ 2] 1 3 1 3
[10] [ 2] 1 3 3 1
[11] [ 2] 1 5 1 1
[12] [ 3] 1 7
[13] [ 1] 3 1 1 1 1 1
[14] [ 2] 3 1 1 3
[15] [ 2] 3 1 3 1
[16] [ 2] 3 3 1 1
[17] [ 3] 3 5
[18] [ 2] 5 1 1 1
[19] [ 3] 5 3
[20] [ 3] 7 1
Connection to the compositions of n into parts 1 or 2 (see comment):
[ #]: a(n) composition into parts 1 and 2
[ 0] [0] 1 1 1 1 1 1 1
[ 1] [1] 1 1 1 1 1 2
[ 2] [1] 1 1 1 1 2 1
[ 3] [1] 1 1 1 2 1 1
[ 4] [2] 1 1 1 2 2
[ 5] [1] 1 1 2 1 1 1
[ 6] [2] 1 1 2 1 2
[ 7] [2] 1 1 2 2 1
[ 8] [1] 1 2 1 1 1 1
[ 9] [2] 1 2 1 1 2
[10] [2] 1 2 1 2 1
[11] [2] 1 2 2 1 1
[12] [3] 1 2 2 2
[13] [1] 2 1 1 1 1 1
[14] [2] 2 1 1 1 2
[15] [2] 2 1 1 2 1
[16] [2] 2 1 2 1 1
[17] [3] 2 1 2 2
[18] [2] 2 2 1 1 1
[19] [3] 2 2 1 2
[20] [3] 2 2 2 1
(End)
From Michel Dekking, Mar 08 2020: (Start)
The third iterate of the morphism tau generating this sequence:
tau^3((0,0)) = (0,0)(1,1)(1,0)(1,0)(2,1)
= (a(0),0)(a(1),1)(a(2),0)(a(3),0)(a(4),1). (End)
MAPLE
# With the following Maple program (not the best one), B(n) (n >= 1) yields the number of terms in the Zeckendorf representation of n.
with(combinat): B := proc (n) local A, ct, m, j: A := proc (n) local i: for i while fibonacci(i) <= n do n-fibonacci(i) end do end proc: ct := 0; m := n: for j while 0 < A(m) do ct := ct+1: m := A(m) end do: ct+1 end proc: 0, seq(B(n), n = 1 .. 104);
# Emeric Deutsch, Jul 05 2010
N:= 1000: # to get a(n) for n <= N
m:= ceil(log[(1+sqrt(5))/2](sqrt(5)*N)):
Z:= Vector(m):
a[0]:= 0:
for n from 1 to N do
if Z[1] = 0 then Z[1]:= 1; q:= 1;
else Z[2]:= 1; Z[1]:= 0; q:= 2;
fi;
while Z[q+1] = 1 do
Z[q]:= 0;
Z[q+1]:= 0;
Z[q+2]:= 1;
q:= q+2;
od:
a[n]:= add(Z[i], i=1..m);
od:
seq(a[n], n=0..N); # Robert Israel, Apr 17 2015
# alternative
read("transforms") :
A007895 := proc(n)
wt(A003714(n)) ;
end proc:
seq(A007895(n), n=0..10) ; # R. J. Mathar, Sep 22 2020
MATHEMATICA
zf[n_] := (k = 1; ff = {}; While[(fi = Fibonacci[k]) <= n, AppendTo[ff, fi]; k++]; Drop[ff, 1]); zeckRep[n_] := If[n == 0, 0, r = n; s = {}; fr = zf[n]; While[r > 0, lf = Last[fr]; If[lf <= r, r = r - lf; PrependTo[s, lf]]; fr = Drop[fr, -1]]; s]; zeckRepLen[n_] := Length[zeckRep[n]]; Table[zeckRepLen[n], {n, 0, 104}] (* Jean-François Alcover, Sep 27 2011 *)
DigitCount[Select[Range[0, 1000], BitAnd[#, 2#] == 0 &], 2, 1] (* Jean-François Alcover, Jan 25 2018 *)
Table[Length[DeleteCases[NestWhileList[# - Fibonacci[Floor[Log[Sqrt[5] * # + 3/2]/Log[GoldenRatio]]] &, n, # > 1 &], 0]], {n, 0, 143}] (* Alonso del Arte, May 14 2019 *)
Flatten[Nest[{Flatten[#], #[[1]] + 1} &, {0, 1}, 9]] (* Paolo Xausa, Jun 17 2024 *)
PROG
(PARI) a(n, mx=0)=if(n<4, n>0, if(!mx, while(fibonacci(mx)<n, mx++)); while(fibonacci(mx)>n, mx--); 1+a(n-fibonacci(mx), mx-2)) \\ Charles R Greathouse IV, Feb 14 2013
(PARI) a(n)=if(n<4, n>0, my(k=2, s, t); while(fibonacci(k++)<=n, ); while(k && n, t=fibonacci(k); if(t<=n, n-=t; s++); k--); s) \\ Charles R Greathouse IV, Sep 02 2015
(Haskell)
a007895 = length . a035516_row -- Reinhard Zumkeller, Mar 10 2013
(Python)
from sympy import fibonacci
def a(n):
k=0
x=0
while n>0:
k=0
while fibonacci(k)<=n: k+=1
x+=10**(k - 3)
n-=fibonacci(k - 1)
return str(x).count("1")
print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 09 2017
CROSSREFS
Cf. A135817 (lengths of Wythoff representation), A135818 (number of 1's (or A's) in the Wythoff representation).
Record positions are in A027941.
KEYWORD
nonn,easy
AUTHOR
Felix Weinstein (wain(AT)ana.unibe.ch) and Clark Kimberling
EXTENSIONS
Edited by N. J. A. Sloane Jun 27 2008 at the suggestion of R. J. Mathar and Don Reble
STATUS
approved
Number of permutations with no hits on 2 main diagonals.
(Formerly M3525)
+10
28
1, 0, 0, 0, 4, 16, 80, 672, 4752, 48768, 440192, 5377280, 59245120, 839996160, 10930514688, 176547098112, 2649865335040, 48047352500224, 817154768973824, 16438490531536896, 312426715251262464, 6906073926286725120, 145060238642780180480, 3495192502897779875840
OFFSET
0,5
COMMENTS
Permanent of the binary matrix with an entry equal to 0 iff the entry is on the main diagonal or the main antidiagonal. - Simone Severini, Oct 14 2004
From Toby Gottfried, Dec 05 2008: (Start)
Suppose you have a group of married couples (plus perhaps one other person).
You wish to organize a gift exchange so that:
- each person gives and receives one gift.
- no one gives himself a gift.
- no one gives his/her spouse a gift.
Then the sequence gives the number of ways that this can be done. (End)
REFERENCES
J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 187.
Todd Simpson, Permutations with unique fixed and reflected points. Ars Combin. 39 (1995), 97-108.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
S. Even and J. Gillis, Derangements and Laguerre polynomials, Mathematical Proceedings of the Cambridge Philosophical Society, Volume 79, Issue 1, January 1976, pp. 135-143.
S. Hertzsprung, Løsning og Udvidelse af Opgave 402, Tidsskrift for Math., 4 (1879), 134-140.
Mathematics Stack Exchange, Derivation of integral formula for even n and for odd n.
T. Muir, The Theory of Determinants in the Historical Order of Development, 4 vols., Macmillan, NY, 1906-1923. [Annotated scans of selected pages]. See Vol. 3 page 468. There may have been some confusion here of this sequence with A002777.
John Riordan and N. J. A. Sloane, Correspondence, 1974
Todd Simpson, Permutations with unique fixed and reflected points, Preprint. (Annotated scanned copy)
FORMULA
a(n) = (n-1)*a(n-1) + 2*(n-d)*a(n-e), where (d, e) = (2, 4) if n even, (1, 2) if n odd.
a(n) = Integral_{ x = 0..oo} (x^2-4*x+2)^k * (x-1)^m * exp(-x) dx, where n=2*k+m, m=n mod 2. - Felix A. Pahl, Dec 27 2011
Recurrence: (n-3)*(3*n^3 - 36*n^2 + 137*n - 162)*a(n) = (n-5)*(3*n^3 - 27*n^2 + 71*n - 50)*a(n-1) + (n-2)*(3*n^5 - 45*n^4 + 248*n^3 - 606*n^2 + 608*n - 156)*a(n-2) - 2*(n-3)*(3*n^3 - 28*n^2 + 87*n - 94)*a(n-3) + 2*(3*n^5 - 51*n^4 + 334*n^3 - 1060*n^2 + 1650*n - 1028)*a(n-4) - 4*(n-4)*(n^2 + n - 14)*a(n-5) - 4*(n-5)*(n-4)*(n-2)*(3*n^3 - 27*n^2 + 74*n - 58)*a(n-6). - Vaclav Kotesovec, Mar 07 2014
a(n) ~ exp(-2) * n!. - Vaclav Kotesovec, Mar 07 2014
EXAMPLE
G.f. = 1 + 4*x^4 + 16*x^5 + 80*x^6 + 672*x^7 + 4752*x^8 + ... - Michael Somos, Jun 17 2023
MAPLE
a:= proc(n) option remember; `if`(n<5, [1, 0$3, 4][n+1],
(n-1)*a(n-1)+2*`if`(n::even, (n-2)*a(n-4), (n-1)*a(n-2)))
end:
seq(a(n), n=0..23); # Alois P. Heinz, Jun 27 2020
MATHEMATICA
a[n_] := Integrate[m = Mod[n, 2]; k = (n-m)/2; (x^2-4*x+2)^k*(x-1)^m*Exp[-x], {x, 0, Infinity}]; Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Sep 09 2013, after Felix A. Pahl *)
nmax=20; b=ConstantArray[0, nmax+1]; b[[1]]=1; b[[2]]=0; b[[3]]=0; b[[4]]=0; b[[5]]=4; Do[b[[n+1]] = (n-1)*b[[n]] + If[EvenQ[n], 2*(n-2)*b[[n-3]], 2*(n-1)*b[[n-1]]], {n, 5, nmax}]; b (* Vaclav Kotesovec, Mar 07 2014 *)
a[ n_] = If[n<4, Boole[n==0], With[{m =2-Mod[n, 2]}, a[n-1]*(n-1) + 2*(n-m)*a[n-2*m]]]; (* Michael Somos, Jun 17 2023 *)
PROG
(PARI) {a(n) = if(n<4, n==0, my(m = 2-n%2); a(n-1)*(n-1) + 2*(n-m)*a(n-2*m))}; /* Michael Somos, Jun 17 2023 */
CROSSREFS
Column k=0 of A335872.
KEYWORD
nonn,easy,nice
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Sep 24 2001
STATUS
approved
Number of uniform regular hypergraphs spanning n vertices.
+10
18
1, 1, 2, 3, 10, 29, 3780, 5012107
OFFSET
0,3
COMMENTS
We define a hypergraph to be any finite set of finite nonempty sets. A hypergraph is uniform if all edges have the same size, and regular if all vertices have the same degree. The span of a hypergraph is the union of its edges.
Also the number of 0-1 matrices with n columns, all distinct rows, no zero columns, equal row-sums, and equal column-sums, up to a permutation of the rows.
EXAMPLE
The a(4) = 10 edge-sets:
{{1,2,3,4}}
{{1,2},{3,4}}
{{1,3},{2,4}}
{{1,4},{2,3}}
{{1},{2},{3},{4}}
{{1,2},{1,3},{2,4},{3,4}}
{{1,2},{1,4},{2,3},{3,4}}
{{1,3},{1,4},{2,3},{2,4}}
{{1,2,3},{1,2,4},{1,3,4},{2,3,4}}
{{1,2},{1,3},{1,4},{2,3},{2,4},{3,4}}
Inequivalent representatives of the a(4) = 10 matrices:
[1 1 1 1]
.
[1 1 0 0] [1 0 1 0] [1 0 0 1]
[0 0 1 1] [0 1 0 1] [0 1 1 0]
.
[1 0 0 0] [1 1 0 0] [1 1 0 0] [1 0 1 0] [1 1 1 0]
[0 1 0 0] [1 0 1 0] [1 0 0 1] [1 0 0 1] [1 1 0 1]
[0 0 1 0] [0 1 0 1] [0 1 1 0] [0 1 1 0] [1 0 1 1]
[0 0 0 1] [0 0 1 1] [0 0 1 1] [0 1 0 1] [0 1 1 1]
.
[1 1 0 0]
[1 0 1 0]
[1 0 0 1]
[0 1 1 0]
[0 1 0 1]
[0 0 1 1]
MATHEMATICA
Table[Sum[SeriesCoefficient[Product[1+Times@@x/@s, {s, Subsets[Range[n], {m}]}], Sequence@@Table[{x[i], 0, k}, {i, n}]], {m, 0, n}, {k, 1, Binomial[n, m]}], {n, 5}]
CROSSREFS
Uniform hypergraphs are counted by A306021. Unlabeled uniform regular multiset partitions are counted by A319056. Regular graphs are A295193. Uniform clutters are A299353.
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, Dec 17 2018
EXTENSIONS
a(7) from Jinyuan Wang, Jun 20 2020
STATUS
approved
Number of non-normal (0,1) semi-magic rectangles with sum of all entries equal to n.
+10
15
1, 1, 4, 8, 39, 122, 950, 5042, 45594, 366243, 3858148, 39916802, 494852628, 6227020802, 88543569808, 1308012219556, 21086562956045, 355687428096002, 6427672041650478, 121645100408832002, 2437655776358606198, 51091307191310604724, 1125098543553717372868, 25852016738884976640002, 620752122372339473623314, 15511210044577707470250243
OFFSET
0,3
COMMENTS
A non-normal semi-magic rectangle is a nonnegative integer matrix with row sums and column sums all equal to d, for some d|n.
Rectangles must be of size k X m where k and m are divisors of n and k*m >= n. This implies that a(p) = p! + 2 for p prime since the only allowable rectangles are of sizes 1 X 1, 1 X p, p X 1 and p X p. There are no 1 X 1 rectangle that satisfies the condition. The 1 X p and p X 1 rectangles are [1....1] and its transpose, the p X p rectangle are necessarily permutation matrices and there are p! permutation matrices of size p X p. It also shows that a(n) >= n! + 2 for n > 1. - Chai Wah Wu, Jan 13 2019
LINKS
Wikipedia, Magic square
FORMULA
a(p) = p! + 2 for p prime. a(n) >= n! + 2 for n > 1. - Chai Wah Wu, Jan 13 2019
EXAMPLE
The a(3) = 8 semi-magic rectangles:
[1 1 1]
.
[1] [1 0 0] [1 0 0] [0 1 0] [0 1 0] [0 0 1] [0 0 1]
[1] [0 1 0] [0 0 1] [1 0 0] [0 0 1] [1 0 0] [0 1 0]
[1] [0 0 1] [0 1 0] [0 0 1] [1 0 0] [0 1 0] [1 0 0]
MATHEMATICA
prs2mat[prs_]:=Table[Count[prs, {i, j}], {i, Union[First/@prs]}, {j, Union[Last/@prs]}];
multsubs[set_, k_]:=If[k==0, {{}}, Join@@Table[Prepend[#, set[[i]]]&/@multsubs[Drop[set, i-1], k-1], {i, Length[set]}]];
Table[Length[Select[Subsets[Tuples[Range[n], 2], {n}], And[Union[First/@#]==Range[Max@@First/@#], Union[Last/@#]==Range[Max@@Last/@#], SameQ@@Total/@prs2mat[#], SameQ@@Total/@Transpose[prs2mat[#]]]&]], {n, 5}]
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 18 2018
EXTENSIONS
a(7) from Chai Wah Wu, Jan 13 2019
a(8)-a(13) from Chai Wah Wu, Jan 14 2019
a(14)-a(15) from Chai Wah Wu, Jan 15 2019
a(16)-a(19) from Chai Wah Wu, Jan 16 2019
Terms a(20) onward from Max Alekseyev, Dec 04 2024
STATUS
approved
Number of non-normal magic squares whose entries are nonnegative integers summing to n.
+10
13
1, 1, 1, 1, 10, 21, 97, 657, 5618, 48918, 494530, 5383553, 65112565, 840566081, 11834555867, 176621056393, 2838064404989, 48060623405313
OFFSET
0,5
COMMENTS
A non-normal magic square is a square matrix with row sums, column sums, and both diagonals all equal to d, for some d|n.
FORMULA
a(p) = A007016(p) + 1 if p is prime. a(n) >= A007016(n) + 1 for n > 1. - Chai Wah Wu, Jan 15 2019
EXAMPLE
The a(4) = 10 magic squares:
[4]
.
[1 1]
[1 1]
.
[1 0 0 0][1 0 0 0][0 1 0 0][0 1 0 0][0 0 1 0][0 0 1 0][0 0 0 1][0 0 0 1]
[0 0 1 0][0 0 0 1][0 0 1 0][0 0 0 1][1 0 0 0][0 1 0 0][1 0 0 0][0 1 0 0]
[0 0 0 1][0 1 0 0][1 0 0 0][0 0 1 0][0 1 0 0][0 0 0 1][0 0 1 0][1 0 0 0]
[0 1 0 0][0 0 1 0][0 0 0 1][1 0 0 0][0 0 0 1][1 0 0 0][0 1 0 0][0 0 1 0]
MATHEMATICA
prs2mat[prs_]:=Table[Count[prs, {i, j}], {i, Union[First/@prs]}, {j, Union[Last/@prs]}];
multsubs[set_, k_]:=If[k==0, {{}}, Join@@Table[Prepend[#, set[[i]]]&/@multsubs[Drop[set, i-1], k-1], {i, Length[set]}]];
Table[Length[Select[multsubs[Tuples[Range[n], 2], n], And[Union[First/@#]==Range[Max@@First/@#]==Union[Last/@#], SameQ@@Join[{Tr[prs2mat[#]], Tr[Reverse[prs2mat[#]]]}, Total/@prs2mat[#], Total/@Transpose[prs2mat[#]]]]&]], {n, 5}]
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, Nov 18 2018
EXTENSIONS
a(7)-a(15) from Chai Wah Wu, Jan 15 2019
a(16)-a(17) from Chai Wah Wu, Jan 16 2019
STATUS
approved
Minimum number of diagonal transversals in a diagonal Latin square of order n.
+10
10
1, 0, 0, 4, 1, 2, 0, 0, 0
OFFSET
1,4
COMMENTS
A007016 is an upper bound for the number of diagonal transversals in a Latin square: a(n) <= A287648(n) <= A007016(n). - Eduard I. Vatutin, Jan 02 2020
From Eduard I. Vatutin, Apr 26 2021: (Start)
A diagonal Latin square is a Latin square in which both the main diagonal and main antidiagonal contain each element.
A diagonal transversal is a transversal that includes exactly one element from the main diagonal and exactly one from the antidiagonal. For squares of odd orders, these elements can coincide at the intersection of the diagonals.
All cyclic diagonal Latin squares (see A338562) are diagonal Latin squares, so a(n) <= A342998((n-1)/2). (End)
a(10) <= 3, a(11) <= 43, a(12) = 0, a(13) <= 4756, a(14) <= 1446, a(15) <= 15510, a(16) <= 898988, a(17) <= 12058840, a(18) <= 82577875, a(19) <= 592174879, a(20) <= 4488686380. - Eduard I. Vatutin, Sep 26 2021, updated Jan 20 2025
LINKS
E. I. Vatutin, Discussion about properties of diagonal Latin squares, forum.boinc.ru (in Russian)
Eduard I. Vatutin, Best known examples.
E. I. Vatutin, S. E. Kochemazov and O. S. Zaikin, Estimating of combinatorial characteristics for diagonal Latin squares, Recognition — 2017 (2017), pp. 98-100 (in Russian)
E. I. Vatutin, S. E. Kochemazov, O. S. Zaikin and S. Yu. Valyaev, Enumerating the Transversals for Diagonal Latin Squares of Small Order. CEUR Workshop Proceedings. Proceedings of the Third International Conference BOINC-based High Performance Computing: Fundamental Research and Development (BOINC:FAST 2017). Vol. 1973. Technical University of Aachen, Germany, 2017. pp. 6-14. urn:nbn:de:0074-1973-0.
E. I. Vatutin, S. E. Kochemazov, O. S. Zaikin and S. Yu. Valyaev, Using Volunteer Computing to Study Some Features of Diagonal Latin Squares. Open Engineering. Vol. 7. Iss. 1. 2017. pp. 453-460. DOI: 10.1515/eng-2017-0052
E. I. Vatutin, S. E. Kochemazov, O. S. Zaikin, S. Yu. Valyaev and V. S. Titov, Estimating the Number of Transversals for Diagonal Latin Squares of Small Order, Telecommunications. 2018. No. 1. pp. 12-21 (in Russian).
E. I. Vatutin, N. N. Nikitina, M. O. Manzuk, A. M. Albertyan, and I. I. Kurochkin, On the construction of spectra of fast-computable numerical characteristics for diagonal Latin squares of small order, Intellectual and Information Systems (Intellect - 2021). Tula, 2021. pp. 7-17. (in Russian)
E. I. Vatutin, N. N. Nikitina, M. O. Manzuk, I. I. Kurochkin, A. M. Albertyan, A. V. Kripachev, and A. I. Pykhtin, Methods for getting spectra of fast computable numerical characteristics of diagonal Latin squares, Cloud and distributed computing systems in electronic control conference, within the National supercomputing forum (NSCF - 2022). Pereslavl-Zalessky, 2023. pp. 19-23. (in Russian)
E. I. Vatutin, V. S. Titov, A. I. Pykhtin, A. V. Kripachev, N. N. Nikitina, M. O. Manzuk, A. M. Albertyan and I. I. Kurochkin, Estimation of the Cardinalities of the Spectra of Fast-computable Numerical Characteristics for Diagonal Latin Squares of Orders N>9 (in Russian) // Science and education in the development of industrial, social and economic spheres of Russian regions. Murom, 2022. pp. 314-315.
EXAMPLE
From Eduard I. Vatutin, Apr 26 2021: (Start)
For example, the diagonal Latin square
0 1 2 3
3 2 1 0
1 0 3 2
2 3 0 1
has 4 diagonal transversals:
0 . . . . 1 . . . . 2 . . . . 3
. . 1 . . . . 0 3 . . . . 2 . .
. . . 2 . . 3 . . 0 . . 1 . . .
. 3 . . 2 . . . . . . 1 . . 0 .
In addition there are 4 other transversals that are not diagonal transversals and are therefore not included here. (End)
CROSSREFS
KEYWORD
nonn,more,hard
AUTHOR
Eduard I. Vatutin, May 29 2017
EXTENSIONS
a(8) added by Eduard I. Vatutin, Oct 29 2017
a(9) added by Eduard I. Vatutin, Sep 20 2020
STATUS
approved
Maximum number of diagonal transversals in a diagonal Latin square of order n.
+10
10
1, 0, 0, 4, 5, 6, 27, 120, 333
OFFSET
1,4
COMMENTS
From Eduard I. Vatutin, Oct 04 2020: (Start)
A diagonal Latin square is a Latin square in which both the main diagonal and main antidiagonal contain each element.
A diagonal transversal is a transversal that includes exactly one element from the main diagonal and exactly one from the antidiagonal. For squares of odd orders, these elements can coincide at the intersection of the diagonals. (End)
A007016 is an upper bound for the number of diagonal transversals in a Latin square: A287647(n) <= a(n) <= A007016(n). - Eduard I. Vatutin, Jan 02 2020
a(11) >= 4828, a(12) >= 24901, a(13) >= 131106, a(14) >= 364596, a(15) >= 389318. - Natalia Makarova, Tomáš Brada, Harry White, Oct 04 2020
a(16) >= 32172800, a(18) >= 280308432. - Natalia Makarova, Tomáš Brada, Dec 25 2020
a(12) >= 28496. - Natalia Makarova, Harry White, Jan 23 2021
a(14) >= 380718, a(20) >= 90010806304, a(21) >= 51162162017, a(22) >= 3227747329246. The number of D-transversals for orders 20 - 22 was calculated by a volunteer. - Natalia Makarova, Tomáš Brada, Harry White, Mar 17 2021
All cyclic diagonal Latin squares (see A338562) are diagonal Latin squares, so A342997((n-1)/2) <= a(n). - Eduard I. Vatutin, Apr 26 2021
a(14) >= 383578, a(15) >= 398974. - Natalia Makarova, Tomáš Brada, Jan 13 2022
a(10) >= 890, a(12) >= 30192, a(14) >= 490218, a(15) >= 4620434, a(17) >= 204995269, a(18) >= 281593874, a(19) >= 11254190082. - Eduard I. Vatutin, Jul 22 2020, updated Mar 01 2025
For most orders n, at least one diagonal Latin square with the maximal number of diagonal transversals has an orthogonal mate and a(n) = A360220(n). Known exceptions: n=6 and n=10. - Eduard I. Vatutin, Feb 17 2023
REFERENCES
J. W. Brown, F. Cherry, L. Most, M. Most, E. T. Parker, and W. D. Wallis, Completion of the spectrum of orthogonal diagonal Latin squares, Lecture notes in pure and applied mathematics. 1992. Vol. 139. pp. 43-49.
LINKS
Natalia Makarova, ODLS of order n>10
Eduard I. Vatutin, Enumerating the Main Classes of Cyclic and Pandiagonal Latin Squares, Recognition - 2021, pp. 77-79. (in Russian)
Eduard Vatutin, Alexey Belyshev, Natalia Nikitina, Maxim Manzuk, Alexander Albertian, Ilya Kurochkin, Alexander Kripachev, and Alexey Pykhtin, Diagonalization and Canonization of Latin Squares, Supercomputing, Russian Supercomputing Days (RuSCDays 2023) Rev. Selected Papers Part II, LCNS Vol. 14389, Springer, Cham, 48-61.
E. I. Vatutin, S. E. Kochemazov, and O. S. Zaikin, Estimating of combinatorial characteristics for diagonal Latin squares, Recognition — 2017 (2017), pp. 98-100 (in Russian).
Eduard I. Vatutin, Stepan E. Kochemazov, Oleg S. Zaikin, Maxim O. Manzuk, Natalia N. Nikitina, and Vitaly S. Titov, Central symmetry properties for diagonal Latin squares, Problems of Information Technology (2019) No. 2, 3-8.
E. I. Vatutin, S. E. Kochemazov, O. S. Zaikin, and S. Yu. Valyaev, Enumerating the Transversals for Diagonal Latin Squares of Small Order, CEUR Workshop Proceedings. Proceedings of the Third International Conference BOINC-based High Performance Computing: Fundamental Research and Development (BOINC:FAST 2017). Vol. 1973. Technical University of Aachen, Germany, 2017. pp. 6-14. urn:nbn:de:0074-1973-0.
E. I. Vatutin, S. E. Kochemazov, O. S. Zaikin, and S. Yu. Valyaev, Using Volunteer Computing to Study Some Features of Diagonal Latin Squares, Open Engineering. Vol. 7. Iss. 1. 2017. pp. 453-460. DOI: 10.1515/eng-2017-0052.
E. I. Vatutin, S. E. Kochemazov, O. S. Zaikin, S. Yu. Valyaev, and V. S. Titov, Estimating the Number of Transversals for Diagonal Latin Squares of Small Order, Telecommunications. 2018. No. 1. pp. 12-21 (in Russian).
E. I. Vatutin, N. N. Nikitina, M. O. Manzuk, A. M. Albertyan, I. I. Kurochkin, On the construction of spectra of fast-computable numerical characteristics for diagonal Latin squares of small order, Intellectual and Information Systems (Intellect - 2021). Tula, 2021. pp. 7-17. (in Russian)
E. I. Vatutin, V. S. Titov, A. I. Pykhtin, A. V. Kripachev, N. N. Nikitina, M. O. Manzuk, A. M. Albertyan and I. I. Kurochkin, Estimation of the Cardinalities of the Spectra of Fast-computable Numerical Characteristics for Diagonal Latin Squares of Orders N>9 (in Russian) // Science and education in the development of industrial, social and economic spheres of Russian regions. Murom, 2022. pp. 314-315.
Eduard I. Vatutin, Best known examples.
EXAMPLE
For example, the diagonal Latin square
0 1 2 3
3 2 1 0
1 0 3 2
2 3 0 1
has 4 diagonal transversals:
0 . . . . 1 . . . . 2 . . . . 3
. . 1 . . . . 0 3 . . . . 2 . .
. . . 2 . . 3 . . 0 . . 1 . . .
. 3 . . 2 . . . . . . 1 . . 0 .
In addition there are 4 other transversals that are not diagonal transversals and are therefore not included here.
From Natalia Makarova, Oct 04 2020: (Start)
The following DLS of order 14 has 364596 diagonal transversals:
0 7 6 11 9 3 4 5 2 12 13 8 10 1
6 1 11 5 10 12 2 3 9 7 4 13 0 8
5 11 2 12 8 1 7 10 0 6 9 3 13 4
13 6 5 3 1 10 9 12 7 0 2 4 8 11
12 3 10 1 4 13 8 6 11 5 0 7 2 9
10 12 1 8 2 5 11 13 4 3 6 0 9 7
9 2 7 0 5 11 6 8 13 4 1 10 3 12
4 13 3 9 6 0 10 7 1 8 12 2 11 5
2 4 9 10 11 6 1 0 8 13 7 12 5 3
1 10 8 13 12 2 5 4 3 9 11 6 7 0
3 5 12 7 13 8 0 1 6 11 10 9 4 2
8 0 13 4 7 9 3 2 12 10 5 11 1 6
7 9 0 6 3 4 13 11 5 2 8 1 12 10
11 8 4 2 0 7 12 9 10 1 3 5 6 13
(End)
KEYWORD
nonn,more,hard,changed
AUTHOR
Eduard I. Vatutin, May 29 2017
EXTENSIONS
a(8) added by Eduard I. Vatutin, Oct 29 2017
a(9) added by Eduard I. Vatutin, Dec 08 2020
STATUS
approved
Irregular triangle where T(H(u),H(v)) is the number of ways to partition the Young diagram of u into vertical sections whose sizes are the parts of v, where H is Heinz number.
+10
10
1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 2, 1, 0, 0, 0, 0, 1, 1, 3, 1, 0, 2, 0, 4, 1, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 1, 0, 2, 2, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 4, 1, 0, 0, 0, 6, 0, 6, 1, 1, 3, 4, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
OFFSET
1,11
COMMENTS
Row n has length A000041(A056239(n)).
A vertical section is a partial Young diagram with at most one square in each row.
EXAMPLE
Triangle begins:
1
1
0 1
1 1
0 0 1
0 2 1
0 0 0 0 1
1 3 1
0 2 0 4 1
0 0 0 3 1
0 0 0 0 0 0 1
0 2 2 5 1
0 0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 4 1
0 0 0 6 0 6 1
1 3 4 6 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
0 0 4 10 4 8 1
The 12th row counts the following partitions of the Young diagram of (211) into vertical sections (shown as colorings by positive integers):
T(12,7) = 0:
.
T(12,9) = 2: 1 2 1 2
1 2
2 1
.
T(12,10) = 2: 1 2 1 2
2 1
2 1
.
T(12,12) = 5: 1 2 1 2 1 2 1 2 1 2
3 2 3 1 3
3 3 2 3 1
.
T(12,16) = 1: 1 2
3
4
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
spsu[_, {}]:={{}}; spsu[foo_, set:{i_, ___}]:=Join@@Function[s, Prepend[#, s]&/@spsu[Select[foo, Complement[#, Complement[set, s]]=={}&], Complement[set, s]]]/@Cases[foo, {i, ___}];
ptnpos[y_]:=Position[Table[1, {#}]&/@y, 1];
ptnverts[y_]:=Select[Rest[Subsets[ptnpos[y]]], UnsameQ@@First/@#&];
Table[With[{y=Reverse[primeMS[n]]}, Table[Length[Select[spsu[ptnverts[y], ptnpos[y]], Sort[Length/@#]==primeMS[k]&]], {k, Sort[Times@@Prime/@#&/@IntegerPartitions[Total[primeMS[n]]]]}]], {n, 18}]
KEYWORD
nonn,tabf
AUTHOR
Gus Wiseman, Nov 19 2018
STATUS
approved
Heinz numbers of integer partitions that can be arranged into a matrix with equal row-sums and equal column-sums.
+10
9
1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 36, 37, 41, 43, 47, 49, 53, 59, 61, 64, 67, 71, 73, 79, 81, 83, 89, 97, 100, 101, 103, 107, 109, 113, 121, 125, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193
OFFSET
1,2
COMMENTS
First differs from A137944 in lacking 120.
The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).
EXAMPLE
6480 belongs to the sequence because it is the Heinz number of (3,2,2,2,2,1,1,1,1), which can be arranged in the following ways:
[1 1 3] [1 2 2] [1 2 2] [1 3 1] [2 1 2] [2 1 2] [2 2 1] [2 2 1] [3 1 1]
[2 2 1] [1 2 2] [3 1 1] [2 1 2] [1 3 1] [2 1 2] [1 1 3] [2 2 1] [1 2 2]
[2 2 1] [3 1 1] [1 2 2] [2 1 2] [2 1 2] [1 3 1] [2 2 1] [1 1 3] [1 2 2]
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
facs[n_]:=If[n<=1, {{}}, Join@@Table[Map[Prepend[#, d]&, Select[facs[n/d], Min@@#>=d&]], {d, Rest[Divisors[n]]}]];
ptnmats[n_]:=Union@@Permutations/@Select[Union@@(Tuples[Permutations/@#]&/@Map[primeMS, facs[n], {2}]), SameQ@@Length/@#&];
Select[Range[100], !Select[ptnmats[#], And[SameQ@@Total/@#, SameQ@@Total/@Transpose[#]]&]=={}&]
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jan 13 2019
STATUS
approved

Search completed in 0.034 seconds