The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A324631 Number of permutations p of [n] such that four is the maximum of the number of elements in any integer interval [p(i)..i+n*[i

%I #15 Sep 08 2022 08:46:24

%S 15,31,60,113,215,406,763,1431,2676,4993,9299,17290,32103,59535,

%T 110292,204137,377535,697742,1288763,2379167,4390148,8097681,14931075,

%U 27522586,50719103,93444207,172125100,316999057,583718215,1074702870,1978430491,3641722423

%N Number of permutations p of [n] such that four is the maximum of the number of elements in any integer interval [p(i)..i+n*[i<p(i)]].

%H Alois P. Heinz, <a href="/A324631/b324631.txt">Table of n, a(n) for n = 4..2000</a>

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

%F G.f.: -x^4*(10*x^4+23*x^3+17*x^2-x-15)/((x^2+x-1)*(x^3+x^2+x-1)).

%e a(4) = 15: 1243, 1324, 1342, 2134, 2143, 2314, 2341, 2413, 2431, 3142, 3241, 3421, 4231, 4312, 4321.

%e a(5) = 31: 12534, 12543, 14235, 14325, 14523, 14532, 15342, 31245, 31524, 31542, 32145, 32514, 34125, 34215, 34512, 35124, 35142, 35214, 41523, 41532, 42315, 42513, 45132, 45213, 45312, 51342, 52314, 54123, 54132, 54213, 54312.

%p a:= n-> `if`(n<4, 0, (<<0|1|0|0|0>, <0|0|1|0|0>, <0|0|0|1|0>,

%p <0|0|0|0|1>, <-1|-2|-1|1|2>>^n. <<4, 1, 3, 10, 15>>)[1\$2]):

%p seq(a(n), n=4..40);

%t LinearRecurrence[{2, 1, -1, -2, -1}, {15, 31, 60, 113, 215}, 40] (* _Vincenzo Librandi_, Jun 06 2019 *)

%o (Magma) I:=[15,31,60,113,215]; [n le 5 select I[n] else 2*Self(n-1)+Self(n-2)-Self(n-3)-2*Self(n-4)+Self(n-5): n in [1..40]]; // _Vincenzo Librandi_, Jun 06 2019

%Y Column k=4 of A324563.

%K nonn,easy

%O 4,1

%A _Alois P. Heinz_, Mar 09 2019

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.

Last modified September 7 23:15 EDT 2024. Contains 375749 sequences. (Running on oeis4.)