login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A250283
Number of permutations p of [n] such that p(i) > p(i+1) iff i == 0 (mod 6).
4
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
OFFSET
0,8
LINKS
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]
EXAMPLE
a(6) = 1: 123456.
a(7) = 6: 1234576, 1234675, 1235674, 1245673, 1345672, 2345671.
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);
MATHEMATICA
nmax = 30; CoefficientList[Series[1 + Sum[(x^(6 - k) * HypergeometricPFQ[{1}, {7/6 - k/6, 4/3 - k/6, 3/2 - k/6, 5/3 - k/6, 11/6 - k/6, 2 - k/6}, -x^6/46656])/(6 - k)!, {k, 0, 5}] / HypergeometricPFQ[{}, {1/6, 1/3, 1/2, 2/3, 5/6}, -x^6/46656], {x, 0, nmax}], x] * Range[0, nmax]! (* Vaclav Kotesovec, Apr 21 2021 *)
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
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Nov 16 2014
STATUS
approved