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!)
A333833 Number of permutations p of [n] such that |p(i) - p(i-1)| <= 2 and |p(i) - p(i-2)| <= 3. 5

%I #29 Oct 26 2021 14:27:36

%S 1,1,2,6,12,14,18,28,42,56,74,102,144,200,274,376,520,720,994,1370,

%T 1890,2610,3604,4974,6864,9474,13078,18052,24916,34390,47468,65520,

%U 90436,124826,172294,237814,328250,453076,625370,863184,1191434,1644510,2269880,3133064

%N Number of permutations p of [n] such that |p(i) - p(i-1)| <= 2 and |p(i) - p(i-2)| <= 3.

%H Alois P. Heinz, <a href="/A333833/b333833.txt">Table of n, a(n) for n = 0..7141</a>

%H Alois P. Heinz, <a href="/A333833/a333833.gif">Animation of a(10) = 74 permutations</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1).

%F G.f.: -(2*x^8+4*x^7+2*x^6+x^5+5*x^4+4*x^3+x^2+1)/(x^4+x-1).

%F a(n) = 2*A302510(n-2) for n >= 6.

%F Limit_{n-> infinity} a(n+1)/a(n) = A086106.

%e a(5) = 14: 12345, 12354, 12435, 12453, 13245, 21345, 31245, 35421, 45321, 53421, 54213, 54231, 54312, 54321.

%e a(6) = 18: 123456, 123465, 123546, 123564, 124356, 132456, 213456, 213465, 312456, 465321, 564312, 564321, 645321, 653421, 654213, 654231, 654312, 654321.

%t Join[{1, 1, 2, 6, 12}, LinearRecurrence[{1, 0, 0, 1}, {14, 18, 28, 42}, 40]] (* _Jean-François Alcover_, Oct 26 2021 *)

%Y Cf. A003274, A086106, A174700, A263690, A263696, A302510, A307269, A328648, A338614.

%K nonn,easy

%O 0,3

%A _Alois P. Heinz_, Apr 07 2020

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 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)