A181162 Number of commuting functions: the number of ordered pairs (f,g) of functions from {1..n} to itself such that fg=gf (i.e., f(g(i))=g(f(i)) for all i).
1, 1, 10, 141, 2824, 71565, 2244096, 83982199, 3681265792, 186047433225, 10716241342240, 697053065658411, 50827694884298784, 4129325095108122637, 371782656333674104624, 36918345387693628911375, 4025196918605160943576576, 479796375191949916361466897
Offset: 0
Examples
The a(2) = 10 pairs of maps [2] -> [2] are: 01: [ 1 1 ] [ 1 1 ] 02: [ 1 1 ] [ 1 2 ] 03: [ 1 2 ] [ 1 1 ] 04: [ 1 2 ] [ 1 2 ] 05: [ 1 2 ] [ 2 1 ] 06: [ 1 2 ] [ 2 2 ] 07: [ 2 1 ] [ 1 2 ] 08: [ 2 1 ] [ 2 1 ] 09: [ 2 2 ] [ 1 2 ] 10: [ 2 2 ] [ 2 2 ] - _Joerg Arndt_, Jul 22 2014
Links
- Martin Fuller, Table of n, a(n) for n = 0..20
- Joerg Arndt, the a(3) = 141 pairs of maps [3] -> [3]
- Stephen M. Buckley, Minimal order semigroups with specified commuting probability, 04-03-2013. - _W. Edwin Clark_, Jul 21 2014
- Martin Fuller, a(6) from the A001372(6)=130 mapping patterns
- M. Holloway and M. Shattuck, Commuting pairs of functions on a finite set, 2015.
- Math Overflow, What is the probability two random maps on n symbols commute?, 2013. - _W. Edwin Clark_, Jul 21 2014
- Math Overflow, Counting and understanding commuting functions, 2010.
Crossrefs
Programs
-
Mathematica
(* This brute force code allows to get a few terms *) a[n_] := a[n] = If[n == 0, 1, Module[{f, g, T}, T = Tuples[Range[n], n]; Table[f = T[[j, #]]&; g = T[[k, #]] &; Table[True, {n}] == Table[f[g[i]] == g[f[i]], {i, n}], {j, n^n}, {k, n^n}] // Flatten // Count[#, True]&]]; Table[Print[n, " ", a[n]]; a[n], {n, 0, 5}] (* Jean-François Alcover, Sep 24 2022 *)
Extensions
a(11)-a(20) from Martin Fuller, Feb 01 2015
Comments