login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A239769 Number of pairs of functions (f, g) from a size n set into itself satisfying f(g(f(x))) = g(g(f(x))). 12

%I #16 Sep 22 2022 08:58:31

%S 1,1,10,195,7000,397445,32540976,3612881587

%N Number of pairs of functions (f, g) from a size n set into itself satisfying f(g(f(x))) = g(g(f(x))).

%p s:= proc(n, i) option remember; `if`(i=0, [[]],

%p map(x-> seq([j, x[]], j=1..n), s(n, i-1)))

%p end:

%p a:= proc(n) (l-> add(add(`if`([true$n]=[seq(evalb(

%p f[g[f[i]]]=g[g[f[i]]]), i=1..n)], 1, 0), g=l), f=l))(s(n$2))

%p end:

%p seq(a(n), n=0..5); # _Alois P. Heinz_, Jul 16 2014

%t 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[f[i]]] == g[g[f[i]]], {i, n}], {j, n^n}, {k, n^n}] // Flatten // Count[#, True]&]];

%t Table[Print[n, " ", a[n]]; a[n], {n, 0, 5}] (* _Jean-François Alcover_, Sep 22 2022 *)

%Y Cf. A181162, A239773.

%K nonn,more

%O 0,3

%A _Chad Brewbaker_, Mar 26 2014

%E a(6)-a(7) from _Giovanni Resta_, Mar 28 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 12:14 EDT 2024. Contains 371792 sequences. (Running on oeis4.)