login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A250283 Number of permutations p of [n] such that p(i) > p(i+1) iff i=0 (mod 6). 2
1, 1, 1, 1, 1, 1, 1, 6, 27, 83, 209, 461, 923, 10284, 80991, 414961, 1671853, 5699149, 17116009, 278723178, 3135810159, 22493048843, 124606826189, 574688719793, 2301250545971, 49308397822776, 721175428306971, 6650954153090521, 46893517738791361 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,8

LINKS

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

Ludwig Seidel, Über eine einfache Entstehungsweise der Bernoulli'schen Zahlen und einiger verwandten Reihen, Sitzungsberichte der mathematisch-physikalischen Classe der königlich bayerischen Akademie der Wissenschaften zu München, volume 7 (1877), 157-187. [USA access only through the HATHI TRUST Digital Library]

Ludwig Seidel, Über eine einfache Entstehungsweise der Bernoulli'schen Zahlen und einiger verwandten Reihen, Sitzungsberichte der mathematisch-physikalischen Classe der königlich bayerischen Akademie der Wissenschaften zu München, volume 7 (1877), 157-187. [Access through ZOBODAT]

MAPLE

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

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

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

    end:

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

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

PROG

(Sage)

# From Peter Luschny, Feb 06 2017 (Start)

@cached_function

def b(u, o, t):

    if u ==-o: return 1

    if t == 0: return sum(b(u-j, o+j-1, (t+1) % 6) for j in (1..u))

    return sum(b(u+j-1, o-j, (t+1) % 6) for j in (1..o))

a = lambda n: b(n, 0, 0)

print([a(n) for n in (0..28)]) # after Maple program

# Alternatively:

@cached_function

def A(m, n):

    if n == 0: return 1

    s = -1 if m.divides(n) else 1

    t = [m*k for k in (0..(n-1)//m)]

    return s*add(binomial(n, k)*A(m, k) for k in t)

A250283 = lambda n: (-1)^int(is_odd(n//6))*A(6, n)

print([A250283(n) for n in (0..28)])

# (End)

CROSSREFS

Row n=6 of A181937.

Sequence in context: A217365 A307040 A124089 * A100188 A131985 A125196

Adjacent sequences:  A250280 A250281 A250282 * A250284 A250285 A250286

KEYWORD

nonn

AUTHOR

Alois P. Heinz, Nov 16 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 April 8 03:01 EDT 2020. Contains 333312 sequences. (Running on oeis4.)