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!)
A273998 Number of endofunctions on [n] whose cycle lengths are primes. 6

%I #12 Jun 10 2018 16:18:05

%S 1,0,1,8,75,904,13255,229536,4587961,103971680,2634212961,73787255200,

%T 2264440519891,75563445303072,2724356214102055,105546202276277504,

%U 4373078169296869425,192970687573630633216,9035613818754820178689,447469496697658409400960

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

%H Alois P. Heinz, <a href="/A273998/b273998.txt">Table of n, a(n) for n = 0..386</a>

%p b:= proc(n) option remember; local r, p;

%p if n=0 then 1 else r, p:=0, 2;

%p while p<=n do r:= r+(p-1)!*b(n-p)*

%p binomial(n-1, p-1); p:= nextprime(p)

%p od; r fi

%p end:

%p a:= n-> add(b(j)*n^(n-j)*binomial(n-1, j-1), j=0..n):

%p seq(a(n), n=0..20);

%t 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 a[0] = 1; a[n_] := Sum[b[j]*n^(n - j)*Binomial[n - 1, j - 1], {j, 0, n}];

%t Table[a[n], {n, 0, 20}] (* _Jean-François Alcover_, Jun 06 2018, from Maple *)

%Y Cf. A000040, A060435, A116956, A218002, A273994, A273996, A273997, A305824.

%K nonn

%O 0,4

%A _Alois P. Heinz_, Jun 06 2016

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 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)