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

 

Logo

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 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A209349 Number A(n,k) of initially rising meander words, where each letter of the cyclic k-ary alphabet occurs n times; square array A(n,k), n>=0, k>=0, read by antidiagonals. 6
1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 5, 1, 0, 1, 1, 1, 9, 29, 1, 0, 1, 1, 1, 11, 100, 182, 1, 0, 1, 1, 1, 16, 182, 1225, 1198, 1, 0, 1, 1, 1, 19, 484, 3542, 15876, 8142, 1, 0, 1, 1, 1, 25, 902, 17956, 76258, 213444, 56620, 1, 0, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

0,18

COMMENTS

In a meander word letters of neighboring positions have to be neighbors in the alphabet, where in a cyclic alphabet the first and the last letters are considered neighbors too.  The words are not considered cyclic here.

A word is initially rising if it is empty or if it begins with the first letter of the alphabet that can only be followed by the second letter in this word position.

A(n,k) is also the number of (n*k-1)-step walks on k-dimensional cubic lattice from (1,0,...,0) to (n,n,...,n) with positive unit steps in all dimensions such that the indices of dimensions used in consecutive steps differ by 1 or are in the set {1,k}.

LINKS

Alois P. Heinz, Antidiagonals n = 0..15, flattened

EXAMPLE

A(0,0) = A(0,k) = A(n,0) = 1: the empty word.

A(1,1) = 1 = |{a}|.

A(2,1) = 0 = |{ }|.

A(2,2) = 1 = |{abab}|.

A(2,3) = 5 = |{abacbc, abcabc, abcacb, abcbac, abcbca}|.

A(1,4) = 1 = |{abcd}|.

A(2,4) = 9 = |{ababcdcd, abadcbcd, abadcdcb, abcbadcd, abcbcdad, abcdabcd, abcdadcb, abcdcbad, abcdcdab}|.

Square array A(n,k) begins:

1,  1,  1,    1,      1,       1,        1, ...

1,  1,  1,    1,      1,       1,        1, ...

1,  0,  1,    5,      9,      11,       16, ...

1,  0,  1,   29,    100,     182,      484, ...

1,  0,  1,  182,   1225,    3542,    17956, ...

1,  0,  1, 1198,  15876,   76258,   749956, ...

1,  0,  1, 8142, 213444, 1753522, 33779344, ...

MAPLE

b:= proc() option remember; local n; n:= nargs;

     `if`({args}={0}, 1,

       `if`(args[2]>0, b(args[2]-1, args[i]$i=3..n, args[1]), 0)+

       `if`(n>2 and args[n]>0, b(args[n]-1, args[i]$i=1..n-1), 0))

    end:

A:= (n, k)-> `if`(n<2, 1, `if`(k<2, 1-k, b((n-1)$2, n$(k-2)))):

seq(seq(A(n, d-n), n=0..d), d=0..10);

MATHEMATICA

b[args_List] := b[args] = Module[{n = Length[args]}, If[Union[args] == {0}, 1, If[args[[2]] > 0, b[Join[{args[[2]] - 1}, args[[3 ;; n]], { args[[1]]}]], 0] + If[n > 2 && args[[n]] > 0, b[Join[{args[[n]] - 1}, args[[1 ;; n - 1]]]], 0]]]; A[n_, k_] := If[n < 2, 1, If[k < 2, 1 - k, b[Join[{n - 1, n - 1}, Array[n&, k - 2]]]]]; Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Jan 21 2015, after Alois P. Heinz *)

CROSSREFS

Rows n=0+1, 2-3 give: A000012, A209350, A240954.

Columns k=0+2, 3-7 give: A000012, A190917 = A110706/6, A060150 = A088218^2, A209351, A209352, A209353.

Sequence in context: A283784 A281563 A293087 * A242095 A336169 A007912

Adjacent sequences:  A209346 A209347 A209348 * A209350 A209351 A209352

KEYWORD

nonn,tabl,walk

AUTHOR

Alois P. Heinz, Mar 06 2012

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 December 3 05:05 EST 2021. Contains 349445 sequences. (Running on oeis4.)