|
|
A260938
|
|
Number of balanced ternary words of length n.
|
|
1
|
|
|
1, 3, 9, 27, 63, 141, 249, 435, 663, 969, 1293, 1713, 2169, 2751, 3333, 4047, 4827, 5733, 6711, 7875, 9081, 10437, 11817, 13425, 15171, 17091, 19017, 21183, 23475, 26001, 28611, 31521, 34515, 37755, 41067, 44631, 48363, 52389, 56499, 60915, 65493, 70419, 75417
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
A word w is balanced if, for every pair of factors (consecutive blocks occurring within it) of the same length, the number of occurrences of each letter in the two factors differs by at most 1. For example, the word "banana" has this property.
|
|
LINKS
|
|
|
EXAMPLE
|
a(4) = 63, since all words of length 4 are balanced except 0011, 0012, 0021, 0022, 0122, 0211 (and renamings of those).
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|