OFFSET
1,9
COMMENTS
For an integer n > 0, a permutation s = s_1...s_k is an n-alternating permutation if it has the property that s_i < s_{i+1} if and only if n divides i.
The classical Euler numbers count 2-alternating permutations of length 2n.
Ludwig Seidel gave in 1877 an efficient algorithm to compute the coefficients of sec which carries immediately over to the computation of the generalized Euler numbers (see the Maple script).
LINKS
Peter Luschny, An old operation on sequences: the Seidel transform.
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
n\k [0][1] [2] [3] [4] [5]
[1] 1, 1, 1, 1, 1, 1
[2] 1, 1, 5, 61, 1385, 50521 [A000364]
[3] 1, 1, 19, 1513, 315523, 136085041 [A002115]
[4] 1, 1, 69, 33661, 60376809, 288294050521 [A211212]
[5] 1, 1, 251, 750751, 11593285251, 613498040952501
[6] 1, 1, 923, 17116009, 2301250545971, 1364944703949044401
The (n,n)-diagonal is A181992.
MAPLE
A181985_list := proc(n, len) local E, dim, i, k;
dim := n*(len-1); E := array(0..dim, 0..dim); E[0, 0] := 1;
for i from 1 to dim do
if i mod n = 0 then E[i, 0] := 0 ;
for k from i-1 by -1 to 0 do E[k, i-k] := E[k+1, i-k-1] + E[k, i-k-1] od;
else E[0, i] := 0;
for k from 1 by 1 to i do E[k, i-k] := E[k-1, i-k+1] + E[k-1, i-k] od;
fi od;
seq(E[0, n*k], k=0..len-1) end:
for n from 1 to 6 do print(A181985_list(n, 6)) od;
MATHEMATICA
nmax = 9; A181985[n_, len_] := Module[{e, dim = n*(len - 1)}, e[0, 0] = 1; For[i = 1, i <= dim, i++, If[Mod[i, n] == 0 , e[i, 0] = 0 ; For[k = i-1, k >= 0, k--, e[k, i-k] = e[k+1, i-k-1] + e[k, i-k-1] ], e[0, i] = 0; For[k = 1, k <= i, k++, e[k, i-k] = e[k-1, i-k+1] + e[k-1, i-k] ]; ]]; Table[e[0, n*k], { k, 0, len-1}]]; t = Table[A181985[n, nmax], {n, 1, nmax}]; a[n_, k_] := t[[n, k+1]]; Table[a[n-k, k], {n, 1, nmax}, {k, 0, n-1}] // Flatten (* Jean-François Alcover, Jun 27 2013, translated and adapted from Maple *)
PROG
(Sage)
def A181985(m, n):
shapes = ([x*m for x in p] for p in Partitions(n))
return (-1)^n*sum((-1)^len(s)*factorial(len(s))*SetPartitions(sum(s), s).cardinality() for s in shapes)
for m in (1..6): print([A181985(m, n) for n in (0..7)]) # Peter Luschny, Aug 10 2015
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, Apr 04 2012
STATUS
approved