This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A324372 Number of permutations p of [n] whose absolute displacements |p(i)-i| are prime numbers. 4
 1, 0, 0, 0, 1, 2, 9, 28, 144, 640, 2348, 6740, 37161, 208186, 1410137, 8322892, 47973920, 231922220, 1747678465, 11712495736, 101585559496, 776251710048, 6154289307912, 41248110305520, 397850617247393 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,6 LINKS Wikipedia, Permutation EXAMPLE a(4) = 1: 3412. a(5) = 2: 34512, 45123. a(6) = 9: 345621, 351624, 356124, 451623, 456123, 456231, 645123, 645231, 651234. MAPLE b:= proc(s) option remember; (n-> `if`(n=0, 1, add(`if`(      isprime(abs(n-j)), b(s minus {j}), 0), j=s)))(nops(s))     end: a:= n-> b({\$1..n}): seq(a(n), n=0..16); CROSSREFS Cf. A000040, A000142, A324373, A324374, A324375, A324376. Sequence in context: A323682 A086511 A291632 * A138912 A002747 A110377 Adjacent sequences:  A324369 A324370 A324371 * A324373 A324374 A324375 KEYWORD nonn AUTHOR Alois P. Heinz, Feb 25 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 20 08:13 EDT 2019. Contains 327214 sequences. (Running on oeis4.)