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!)
A209350 Number of initially rising meander words, where each letter of the cyclic n-ary alphabet occurs twice. 4
1, 0, 1, 5, 9, 11, 16, 19, 25, 29, 36, 41, 49, 55, 64, 71, 81, 89, 100, 109, 121, 131, 144, 155, 169, 181, 196, 209, 225, 239, 256, 271, 289, 305, 324, 341, 361, 379, 400, 419, 441, 461, 484, 505, 529, 551, 576, 599, 625, 649, 676, 701, 729, 755, 784, 811, 841 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
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) is also the number of (2*n-1)-step walks on n-dimensional cubic lattice from (1,0,...,0) to (2,2,...,2) 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,n}.
LINKS
FORMULA
G.f.: -(3*x^6-5*x^5-2*x^4+5*x^3+x^2-2*x+1) / ((x+1)*(x-1)^3).
a(n) = (n-1)^2 if n<3, a(n) = (n/2+1)^2 - (n mod 2)*5/4 else.
EXAMPLE
a(0) = 1: the empty word.
a(1) = 0 = |{ }|.
a(2) = 1 = |{abab}|.
a(3) = 5 = |{abacbc, abcabc, abcacb, abcbac, abcbca}|.
a(4) = 9 = |{ababcdcd, abadcbcd, abadcdcb, abcbadcd, abcbcdad, abcdabcd, abcdadcb, abcdcbad, abcdcdab}|.
MAPLE
a:= n-> `if`(n<3, (n-1)^2, (n/2+1)^2 -(n mod 2)*5/4):
seq(a(n), n=0..60);
MATHEMATICA
LinearRecurrence[{2, 0, -2, 1}, {1, 0, 1, 5, 9, 11, 16}, 60] (* Harvey P. Dale, Jan 02 2020 *)
CROSSREFS
Row n=2 of A209349.
First differences for n>2 give: A084964(n+1), A097065(n+3).
Cf. A245578.
Sequence in context: A314596 A314597 A314598 * A314599 A292089 A314600
KEYWORD
nonn,walk,easy
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 02:53 EDT 2024. Contains 371906 sequences. (Running on oeis4.)