# [seqfan] Re: Concerning William Orrick's message

William Orrick will.orrick at gmail.com
Sat Aug 8 20:15:00 CEST 2020

```Dear SeqFans,

Neil: Thank you for your attention to these sequences.

Sorry for another long post.  Short summary: someone needs to decide
whether A170904 is worth keeping and, if so, edit it. Also, someone needs
to edit A000186. That person could be me, but I need someone to test that
the Maple code below correctly produces A000186 before I make any changes.

Main post: There were three sequences, A000186, A174563, and A176901, that
linked to A102761 and that assumed the "desymmetrized" values, 1, -1, 0, 1,
2, 13, ... of the menage numbers. All three should now link to A000179.
I've taken care of the latter two, but I'm going to need some help with the
first one. (There are seven other sequences that depend on A102761, all of
which are fine since they assume the current values.)

As for the first sequence, A000186 is the sequence that started the whole
thing off with variant forms of the menage numbers. Under "Formula" there's
the remark,

"Note that the formula Sum_{k=0..n, k <= n/2} binomial(n,
k)D(n-k)*D(k)*U(n-2*k), where D() = A000166, U() = A000179 given by
Riordan, p. 209 gives the wrong answers unless we set U(1) = -1 (or in
other words we must take U() = A102761). With U(1) = 0 it produces A170904.
See the Maple code here."

This may be slightly cryptic to readers since U(1) now equals -1. At the
very least, the parenthetical remark, "or in other words...", should be
removed. I'm also not sure that A170904 serves a useful purpose anymore. If
it is to be kept, it should refer to the new sequence, A335700, but I don't
think that's going to help anyone. Well, I suppose someone might make the
same mistake, using U(1) = 0, and query the OEIS with the confusing
result...

The main issue I need assistance with is the first of the two Maple
programs. I unfortunately don't have Maple installed in order to test any
changes. The current code, of course, still produces the right numbers, but
the comments no longer refer to the correct sequences. Just changing the
comments, however, is going to produce some rather contorted logic.

The remark preceding the code is also puzzling and perhaps should be
removed. It says,

"Maple code for A000186 based on Eq. (30) of Riordan, p. 205. Eq. (30a) on
p. 206 is wrong."

As pointed out by Vladimir Shevelev on SeqFans in April 2010, Riordan's
formula is fine as long as you know that Riordan considered the menage
number for n=1 to be -1. What's puzzling about the remark is that equations
(30) and (30a) are either both right, or both wrong. But there is nothing
wrong with either of them. Both require the n=1 term in the menage numbers
to be -1. The only difference is that (30) is a symmetric sum requiring the
n=0 menage number to be 2 and requiring that the menage numbers be defined
for negative index, whereas (30a) is a "desymmetrized" sum, requiring the
n=0 menage number to be 1 and only using menage numbers of nonnegative
index.

I suggest using (30a), which is the more classic of the two formulas and
has half as many terms. This means streamlining the code as follows:

# A000166
unprotect(D);
D := proc(n) option remember; if n<=1 then 1-n else (n-1)*(D(n-1)+D(n-2));
fi; end;
[seq(D(n), n=0..30)];

# A000179
U := proc(n) if n==0 then 1 else
add ((-1)^k*(2*n)*binomial(2*n-k, k)*(n-k)!/(2*n-k), k=0..n); fi; end;
[seq(U(n), n=0..30)];

# A000186
K:=proc(n) local k; global D, fU; (1/2)*add( binomial(n,
k)*D(n-k)*D(k)*U(n-2*k), k=0..floor(n/2) ); end;
[seq(K(n), n=0..30)];

The definition of U has been slightly simplified and the need for fU has
been eliminated entirely. The upper limit of the sum for K has been changed
from n to floor(n/2).

My opinion is that the current code should be replaced with the version
above. If the current code is to be kept, however, the code comments should
be changed to say that U is A335700 and fU is A102761. The sequence
A000179, in its present form, is not used in the current code.

Best,
Will Orrick

On Thu, Aug 6, 2020 at 1:42 PM Neil Sloane <njasloane at gmail.com> wrote:

> Hmmm...
>
> I'm inclined to think that when William Orrick said
>
> >>> 3) A "desymmetrized" choice:
> >>>
> >>> 1, -1, 0, 2, 13, 80, 579, 4738, ...
>
> this was a mistake, and he really meant to say
>
> >>> 3) A "desymmetrized" choice:
> >>>
> >>> 1, -1, 0, 1, 2, 13, 80, 579, 4738, ...
>
> which of course is A000179.
>
> So I am just going to create one new sequence (A335700) not two.
>
>
> Best regards
> Neil
>
> Neil J. A. Sloane, President, OEIS Foundation.
> 11 South Adelaide Avenue, Highland Park, NJ 08904, USA.
> Also Visiting Scientist, Math. Dept., Rutgers University, Piscataway, NJ.
> Email: njasloane at gmail.com
>
>
>
> On Thu, Aug 6, 2020 at 1:59 PM Neil Sloane <njasloane at gmail.com> wrote:
>
> >
> > (I am starting a new thread, that one was already too long)
> >
> > In an earlier message in the thread, William Orrick said there are 3
> > possibilities for the start of the sequence:
> > >>> 1) The physically correct choice: there is one empty arrangement, no
> >
> > >>> 1, 0, 0, 1, 2, 13, 80, 579, 4738, ... This will be the new A335700
> >
> > >>> 2) The mathematically nicest choice: Touchard gives an expression for
> > the ...
> > >>>
> > >>> 2, -1, 0, 1, 2, 13, 80, 579, 4738, ... This is A102761
> > >>>
> >
> > >>> 3) A "desymmetrized" choice:
> > >>>
> > >>> 1, -1, 0, 2, 13, 80, 579, 4738, ...  This will be the new A335701
> >
> > Then there is the existing sequence A000179, which is a fourth candidate:
> >
> > 4)  1, -1, 0, 1, 2, 13, 80, 579, 4738, 43387, ... This is A000179
> >
> > I think the way to resolve this is to have all 4 sequences  in the OEIS
> > with distinct  A-numbers.
> >
> > In his email, Will favors sequence 2), which is A102761. And A000179 has
> > to stay because it has existed as an OEIS entry for about 50 years
> >
> > I am going to create two entries, for 1) and 3), which will be A335700
> and
> > A335701.
> >
> > They will say something like "alternative starts to A000179 and A102761"
> >
> >
> >
> >
>
> --
> Seqfan Mailing list - http://list.seqfan.eu/
>

```