login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A250263 Number of permutations p of [n] such that p(i) > p(i+1) iff i=1 (mod 7). 2
1, 1, 1, 2, 3, 4, 5, 6, 7, 55, 306, 1145, 3454, 8997, 21008, 45031, 630421, 5954062, 36439007, 174011100, 697278853, 2442137774, 7677528495, 154507257827, 2060124800270, 17511127577941, 114431145225190, 619024078342189, 2890746049056048, 11979440405949527 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..500

MAPLE

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

     `if`(t=1, add(b(u-j, o+j-1, irem(t+1, 7)), j=1..u),

               add(b(u+j-1, o-j, irem(t+1, 7)), j=1..o)))

    end:

a:= n-> b(0, n, 0):

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

MATHEMATICA

b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, If[t == 1, Sum[b[u - j, o + j - 1, Mod[t + 1, 7]], {j, 1, u}], Sum[b[u + j - 1, o - j, Mod[t + 1, 7]], {j, 1, o}]]];

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

Table[a[n], {n, 0, 35}] (* Jean-Fran├žois Alcover, Jul 22 2019, after Alois P. Heinz *)

CROSSREFS

Column k=7 of A250261.

Sequence in context: A037406 A237344 A024647 * A024648 A004858 A043312

Adjacent sequences:  A250260 A250261 A250262 * A250264 A250265 A250266

KEYWORD

nonn

AUTHOR

Alois P. Heinz, Nov 15 2014

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 18 15:21 EDT 2019. Contains 328162 sequences. (Running on oeis4.)