The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A329944 Number of permutations of [n] whose cycle lengths avoid primes. 4
1, 1, 1, 1, 7, 31, 211, 1051, 10081, 107857, 1227241, 8969401, 108817831, 1173362191, 19426473067, 320062090531, 5692838161921, 70426164947041, 1346222143950481, 21952313047471537, 493701484264143751, 10971915198235355071, 266542798822750395331 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
LINKS
FORMULA
a(n) mod 2 = 1.
a(n) mod 10 = period 5: repeat [1,1,1,1,7], g.f.: (7*x^4+x^3+x^2+x+1)/(1-x^5).
EXAMPLE
a(4) = 7: (1)(2)(3)(4), (1234), (1243), (1324), (1342), (1423), (1432).
MAPLE
a:= proc(n) option remember; `if`(n=0, 1, add(`if`(isprime(j), 0,
a(n-j)*binomial(n-1, j-1)*(j-1)!), j=1..n))
end:
seq(a(n), n=0..25);
MATHEMATICA
a[n_] := a[n] = If[n == 0, 1, Sum[If[PrimeQ[j], 0,
a[n-j] Binomial[n-1, j-1] (j-1)!], {j, 1, n}]];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Oct 31 2021, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A223144 A155521 A201116 * A060015 A261558 A241456
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Nov 24 2019
STATUS
approved

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 June 7 08:50 EDT 2024. Contains 373161 sequences. (Running on oeis4.)