Automatic Solution of Richard Stanley's Amer. Math. Monthly Problem #11610
and ANY Problem of That Type
By
Shalosh B. Ekhad and Doron Zeilberger
.pdf
.ps
.tex
(Exclusively published in the Personal Journal of
Shalosh B. Ekhad and Doron Zeilberger and arxiv.org)
Written: Dec. 28, 2012.
Richard Stanely proposed, in a recent Amer. Math. Monthly Problem (Dec. 2011) to prove a nice
explicit formula for the generating function for the number of nletter words in {H,T} that
have as many occurrences of HT as HH. In this article, we show how to prove this
problem automatically, and ANY problem of that type, regardless of the size of the alphabet
and the length of the two chosen strings.
Maple Packages

RPS
A Maple package for solving any problems of the type: "number of nletter words using an mletter alphabet
that contain exactly the same number of occurrences as factors of w_{1} and w_{2} for
any two different words w_{1}, w_{2}, of the same length.

RPSplus
A Maple package for solving any problems of the more general type: "number of nletter words using an mletter alphabet
such that a_{1}#w_{1} a_{2}#w_{2}=r for any positive integers a_{1}
and a_{2} and r (the former case, dealt by RPS does the special case a_{1}=1, a_{2}=1, r=0)
for any two different words w_{1}, w_{2} of the same length.
Webbooks

If you want to see the quadratic equation satisfies by the
ordinary generating function of the sequence enumerating
nletter words in the twoletter alphabet {1,2} that
contain as many occurrences, as (consecutive) substrings,
of w1 and w2 FOR all pairs of words {w1,w2} of length 2,
as well as linear recurrences and asymptotic formulas for
the enumerating sequence itself,
the
input file
would yield the
output file

If you want to see the quadratic equation satisfies by the
ordinary generating function of the sequence enumerating
nletter words in the twoletter alphabet {1,2} that
contain as many occurrences, as (consecutive) substrings,
of w1 and w2 FOR all pairs of words {w1,w2} of length 3,
as well as linear recurrences and asymptotic formulas for
the enumerating sequence itself,
the
input file
would yield the
output file

If you want to see the quadratic equation satisfies by the
ordinary generating function of the sequence enumerating
nletter words in the twoletter alphabet {1,2} that
contain as many occurrences, as (consecutive) substrings,
of w1 and w2 FOR all pairs of words {w1,w2} of length 4,
as well as linear recurrences and asymptotic formulas for
the enumerating sequence itself,
the
input file
would yield the
output file

If you want to see the quadratic equation satisfies by the
ordinary generating function of the sequence enumerating
nletter words in the twoletter alphabet {1,2} that
contain as many occurrences, as (consecutive) substrings,
of w1 and w2 FOR all pairs of words {w1,w2} of length 5,
as well as linear recurrences and asymptotic formulas for
the enumerating sequence itself,
the
input file
would yield the
output file

If you want to see the quadratic equation satisfies by the
ordinary generating function of the sequence enumerating
nletter words in the threeletter alphabet {1,2,3} that
contain as many occurrences, as (consecutive) substrings,
of w1 and w2 FOR all pairs of words {w1,w2} of length 2,
as well as linear recurrences and asymptotic formulas for
the enumerating sequence itself,
the
input file
would yield the
output file

If you want to see the quadratic equation satisfies by the
ordinary generating function of the sequence enumerating
nletter words in the threeletter alphabet {1,2,3} that
contain as many occurrences, as (consecutive) substrings,
of w1 and w2 FOR all pairs of words {w1,w2} of length 3,
as well as linear recurrences and asymptotic formulas for
the enumerating sequence itself,
the
input file
would yield the
output file

If you want to see the quadratic equation satisfies by the
ordinary generating function of the sequence enumerating
nletter words in the fourletter alphabet {1,2,3,4} that
contain as many occurrences, as (consecutive) substrings,
of w1 and w2 FOR all pairs of words {w1,w2} of length 2,
as well as linear recurrences and asymptotic formulas for
the enumerating sequence itself,
the
input file
would yield the
output file

If you want to see the quadratic equation satisfies by the
ordinary generating function of the sequence enumerating
nletter words in the fourletter alphabet {1,2,3,4} that
contain as many occurrences, as (consecutive) substrings,
of w1 and w2 FOR all pairs of words {w1,w2} of length 3,
as well as linear recurrences and asymptotic formulas for
the enumerating sequence itself,
the
input file
would yield the
output file

If you want to see the quadratic equation satisfies by the
ordinary generating function of the sequence enumerating
nletter words in the fourletter alphabet {1,2,3,4,5} that
contain as many occurrences, as (consecutive) substrings,
of w1 and w2 FOR all pairs of words {w1,w2} of length 2,
as well as linear recurrences and asymptotic formulas for
the enumerating sequence itself,
the
input file
would yield the
output file

If you want to see the quadratic equation satisfies by the
ordinary generating function of the sequence enumerating
nletter words in the fiveletter alphabet {1,2,3,4,5} that
contain as many occurrences, as (consecutive) substrings,
of w1 and w2 FOR all pairs of words {w1,w2} of length 3,
as well as linear recurrences and asymptotic formulas for
the enumerating sequence itself,
the
input file
would yield the
output file

If you want to see the quadratic equation satisfies by the
ordinary generating function of the sequence enumerating
nletter words in the sixletter alphabet {1,2,3,4,5,6} that
contain as many occurrences, as (consecutive) substrings,
of w1 and w2 FOR all pairs of words {w1,w2} of length 2,
as well as linear recurrences and asymptotic formulas for
the enumerating sequence itself,
the
input file
would yield the
output file

If you want to see the quadratic equation satisfies by the
ordinary generating function of the sequence enumerating
nletter words in the sixletter alphabet {1,2,3,4,5,6} that
contain as many occurrences, as (consecutive) substrings,
of w1 and w2 FOR all pairs of words {w1,w2} of length 3,
as well as linear recurrences and asymptotic formulas for
the enumerating sequence itself,
the
input file
would yield the
output file
Personal Journal of Shalosh B. Ekhad and Doron Zeilberger
Doron Zeilberger's Home Page