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!)
A338614 Number of permutations p of [n] such that |p(i) - p(i-1)| <= 3 and |p(i) - p(i-2)| <= 4. 2
1, 1, 2, 6, 24, 72, 124, 210, 394, 810, 1652, 3168, 5816, 10640, 19794, 37292, 70298, 131618, 245146, 456430, 851670, 1592008, 2976326, 5559808, 10379010, 19374184, 36175422, 67562524, 126185322, 235650426, 440038528 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Table of n, a(n) for n=0..30.

Wikipedia, Permutation

MAPLE

b:= proc(s, x, y) option remember; `if`(s={}, 1, add(

      `if`((x=0 or abs(x-j)<=4) and (y=0 or abs(y-j)<=3),

          b(s minus {j}, y, j), 0), j=s))

    end:

a:= n-> b({$1..n}, 0$2):

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

CROSSREFS

Cf. A263690, A263696, A263745, A333833, A338738.

Sequence in context: A027562 A236625 A096259 * A087645 A174700 A216158

Adjacent sequences:  A338611 A338612 A338613 * A338615 A338616 A338617

KEYWORD

nonn,more

AUTHOR

Alois P. Heinz, Nov 03 2020

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 October 4 08:55 EDT 2022. Contains 357239 sequences. (Running on oeis4.)