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.

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

This page as a plain text file.
%I A239777 #20 Nov 03 2016 09:32:54
%S A239777 1,1,12,249,7744,326745,17773056,1197261289,97165842432,9294416254161,
%T A239777 1030298497753600,130527793649586201,18685034341191917568,
%U A239777 2993332161753700720681,532270629438646194561024,104316725427708352041239625,22394627939996943667912769536
%N A239777 Number of pairs of functions f, g on a size n set into itself satisfying f(g(g(x))) = f(x).
%H A239777 Alois P. Heinz, <a href="/A239777/b239777.txt">Table of n, a(n) for n = 0..200</a>
%p A239777 s:= proc(n, i) option remember; `if`(i=0, [[]],
%p A239777        map(x-> seq([j, x[]], j=1..n), s(n, i-1)))
%p A239777     end:
%p A239777 a:= proc(n) (l-> add(add(`if`([true$n]=[seq(evalb(
%p A239777        f[g[g[i]]]=f[i]), i=1..n)], 1, 0), g=l), f=l))(s(n$2))
%p A239777     end:
%p A239777 seq(a(n), n=0..5);  # _Alois P. Heinz_, Jul 16 2014
%p A239777 # second Maple program:
%p A239777 with(combinat):
%p A239777 b:= proc(n, i) option remember; `if`(n=0 or i=1, x^n,
%p A239777       expand(add((i-1)!^j*multinomial(n, n-i*j, i$j)/j!
%p A239777        *x^((2-irem(i, 2))*j)*b(n-i*j, i-1), j=0..n/i)))
%p A239777     end:
%p A239777 a:= n-> add((p-> add(n^i*binomial(n-1, k-1)*n^(n-k)*
%p A239777     coeff(p, x, i), i=0..degree(p)))(b(k$2)), k=0..n):
%p A239777 seq(a(n), n=0..20);  # _Alois P. Heinz_, Aug 06 2014
%t A239777 c[n_] := c[n] =
%t A239777     Sum[(n - 1)! n^(n - k)/(n - k)! t^(1 + Mod[k + 1, 2]), {k, 1, n}]
%t A239777 d[0] = 1
%t A239777 d[n_] := d[n] = Sum[Binomial[n - 1, k]*d[k]*c[n - k], {k, 0, n - 1}]
%t A239777 a[n_] := d[n] /. t -> n
%t A239777 Table[a[n], {n, 1, 10}] (* _David Einstein_, Nov 02 2016*)
%Y A239777 Cf. A181162, A239769, A239773.
%Y A239777 Column k=2 of A245910.
%K A239777 nonn
%O A239777 0,3
%A A239777 _Chad Brewbaker_, Mar 26 2014
%E A239777 a(6)-a(7) from _Giovanni Resta_, Mar 28 2014
%E A239777 a(8)-a(16) from _Alois P. Heinz_, Aug 06 2014