login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
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

%I #20 Jan 21 2015 04:44:45

%S 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,

%T 182,1,0,1,1,1,16,182,1225,1198,1,0,1,1,1,19,484,3542,15876,8142,1,0,

%U 1,1,1,25,902,17956,76258,213444,56620,1,0,1

%N 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.

%C 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.

%C 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.

%C 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}.

%H Alois P. Heinz, <a href="/A209349/b209349.txt">Antidiagonals n = 0..15, flattened</a>

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

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

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

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

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

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

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

%e Square array A(n,k) begins:

%e 1, 1, 1, 1, 1, 1, 1, ...

%e 1, 1, 1, 1, 1, 1, 1, ...

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

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

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

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

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

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

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

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

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

%p end:

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

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

%t 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_ *)

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

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

%K nonn,tabl,walk

%O 0,18

%A _Alois P. Heinz_, Mar 06 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 03:28 EDT 2024. Contains 371696 sequences. (Running on oeis4.)