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!)
A317128 Number of permutations of [n] whose lengths of increasing runs are Fibonacci numbers. 7

%I #16 Mar 29 2021 08:00:25

%S 1,1,2,6,23,112,652,4425,34358,299971,2910304,31059715,361603228,

%T 4560742758,61947243329,901511878198,13994262184718,230811430415207,

%U 4030772161073249,74301962970014978,1441745847111969415,29374226224980834077,626971133730275593916

%N Number of permutations of [n] whose lengths of increasing runs are Fibonacci numbers.

%H Alois P. Heinz, <a href="/A317128/b317128.txt">Table of n, a(n) for n = 0..400</a>

%p g:= n-> (t-> `if`(issqr(t+4) or issqr(t-4), 1, 0))(5*n^2):

%p b:= proc(u, o, t) option remember; `if`(u+o=0, g(t),

%p `if`(g(t)=1, add(b(u-j, o+j-1, 1), j=1..u), 0)+

%p add(b(u+j-1, o-j, t+1), j=1..o))

%p end:

%p a:= n-> b(n, 0$2):

%p seq(a(n), n=0..27);

%t g[n_] := With[{t = 5n^2}, If[IntegerQ@Sqrt[t+4] || IntegerQ@Sqrt[t-4], 1, 0]];

%t b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, g[t],

%t If[g[t] == 1, Sum[b[u - j, o + j - 1, 1], {j, 1, u}], 0] +

%t Sum[b[u + j - 1, o - j, t + 1], {j, 1, o}]];

%t a[n_] := b[n, 0, 0];

%t a /@ Range[0, 27] (* _Jean-François Alcover_, Mar 29 2021, after _Alois P. Heinz_ *)

%Y Cf. A000045, A097597, A273001, A317111, A317129, A317130, A317131, A317132, A317444.

%K nonn

%O 0,3

%A _Alois P. Heinz_, Jul 21 2018

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 20 05:04 EDT 2024. Contains 371798 sequences. (Running on oeis4.)