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.

A273998 Number of endofunctions on [n] whose cycle lengths are primes.

This page as a plain text file.
%I A273998 #12 Jun 10 2018 16:18:05
%S A273998 1,0,1,8,75,904,13255,229536,4587961,103971680,2634212961,73787255200,
%T A273998 2264440519891,75563445303072,2724356214102055,105546202276277504,
%U A273998 4373078169296869425,192970687573630633216,9035613818754820178689,447469496697658409400960
%N A273998 Number of endofunctions on [n] whose cycle lengths are primes.
%H A273998 Alois P. Heinz, <a href="/A273998/b273998.txt">Table of n, a(n) for n = 0..386</a>
%p A273998 b:= proc(n) option remember; local r, p;
%p A273998       if n=0 then 1 else r, p:=0, 2;
%p A273998       while p<=n do r:= r+(p-1)!*b(n-p)*
%p A273998          binomial(n-1, p-1); p:= nextprime(p)
%p A273998       od; r fi
%p A273998     end:
%p A273998 a:= n-> add(b(j)*n^(n-j)*binomial(n-1, j-1), j=0..n):
%p A273998 seq(a(n), n=0..20);
%t A273998 b[n_] := b[n] = Module[{r, p}, If[n == 0, 1, {r, p} = {0, 2}; While[p <= n, r = r + (p - 1)!*b[n - p]*Binomial[n-1, p-1]; p = NextPrime[p]]; r]];
%t A273998 a[0] = 1; a[n_] := Sum[b[j]*n^(n - j)*Binomial[n - 1, j - 1], {j, 0, n}];
%t A273998 Table[a[n], {n, 0, 20}] (* _Jean-François Alcover_, Jun 06 2018, from Maple *)
%Y A273998 Cf. A000040, A060435, A116956, A218002, A273994, A273996, A273997, A305824.
%K A273998 nonn
%O A273998 0,4
%A A273998 _Alois P. Heinz_, Jun 06 2016