A064636 Number of derangements up to cyclic rotations; permutation siteswap necklaces, with no fixed points (no "zero-throws", i.e., empty hands, if we use the mapping Perm2SiteSwap1 of A060495 and A060498).
0, 0, 1, 2, 5, 12, 55, 270, 1893, 14864, 133749, 1334970, 14687195, 176214852, 2290820923, 32071104006, 481066907653, 7697064251760, 130850098582189, 2355301661033970, 44750731672347273, 895014631193654828, 18795307257304746591, 413496759611120779902, 9510425471105377569963, 228250211305338670543432
Offset: 0
Keywords
Links
- Juggling Information Service, Site Swap notation
Programs
-
Maple
with(numtheory); A064636 := proc(n) local d,k,s; s := 0; for d in divisors(n) do s := s + (1/n) * phi(n/d) * ( (((n/d)^d)*A000166(d)) + add((((n/d)^(d-k)) * (((n/d)-1)^k) * (A000166(d-k)*binomial(d,k))),k=1..d)); od; RETURN(s); end;
-
Mathematica
Unprotect[Power]; 0^0 = 1; a[n_] := (1/n) DivisorSum[n, EulerPhi[n/#]*Sum[ (n/#)^(# - k)*(n/# - 1)^k*#!*Gamma[# - k + 1, -1]/(E*k!*(# - k)!), {k, 0, #}]&] // FunctionExpand; a[0] = 0; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Mar 06 2016 *)
Formula
a(n) = Sum_{d|n} (1/n) * Phi(n/d) * Sum_{k=0..d} [ ((n/d)^(d-k)) * (((n/d)-1)^k) * A008290(d, k) ]. (Note: this abbreviated formula supposes that 0^0 = 1. For a practical implementation, see the Maple procedure below.)
Comments