A254570 The number of unordered 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) where f and g are distinct.
0, 3, 57, 1284, 34220, 1098720, 41579328, 1832244288, 92830006368, 5353120671120, 348383876993900, 25409389391925264, 2064511110000765192, 185885772163424273304, 18458953746901624026000, 2012589235930543617012480, 239897773975844015012351360, 31132547318002718989156350240, 4380969784826872849927354999092, 665896601825393760478978112600400
Offset: 1
Keywords
Examples
The a(2) = 3 pairs of maps [2] -> [2] are: 01: [ 1 1 ] [ 1 2 ] 02: [ 1 2 ] [ 2 1 ] 03: [ 1 2 ] [ 2 2 ]
Formula
a(n) = (A181162(n) - n^n)/2.