cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

1, 1, 10, 195, 7000, 397445, 32540976, 3612881587, 520731462784
Offset: 0

Views

Author

Chad Brewbaker, Mar 26 2014

Keywords

Crossrefs

Programs

  • Maple
    s:= proc(n, i) option remember; `if`(i=0, [[]],
           map(x-> seq([j, x[]], j=1..n), s(n, i-1)))
        end:
    a:= proc(n) (l-> add(add(`if`([true$n]=[seq(evalb(
           f[g[f[i]]]=g[g[f[i]]]), i=1..n)], 1, 0), g=l), f=l))(s(n$2))
        end:
    seq(a(n), n=0..5);  # Alois P. Heinz, Jul 16 2014
  • Mathematica
    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]&]];
    Table[Print[n, " ", a[n]]; a[n], {n, 0, 5}] (* Jean-François Alcover, Sep 22 2022 *)

Extensions

a(6)-a(7) from Giovanni Resta, Mar 28 2014
a(8) from Max Alekseyev, Dec 20 2024