[seqfan] Re: Mathematica code for A050446.

Harvey P. Dale hpd1 at nyu.edu
Wed Dec 14 15:15:26 CET 2011

```	The Mathematica code does generate the terms of the sequence.
Best,
Harvey

-----Original Message-----
From: seqfan-bounces at list.seqfan.eu
[mailto:seqfan-bounces at list.seqfan.eu] On Behalf Of Ed Jeffery
Sent: Wednesday, December 14, 2011 12:43 AM
To: seqfan at list.seqfan.eu
Subject: [seqfan] Mathematica code for A050446.

Could someone please verify the Mathematica code for A050446
(https://oeis.org/A050446) and let me know if it correctly generates the
table given in the example there? I can't get the right table using
Mathcad even single-stepping through the calculations according to that
code. The Mathematica code is:

t[n_, m_?Positive] := t[n, m] = t[n, m-1] + Sum[t[2k, m-1]*t[n-1 - 2k,
m], {k, 0, (n-1)/2}]; t[n_, 0] = 1; Table[t[i-k , k-1], {i, 1, 12}, {k,
1, i}] // Flatten

I think the second part of the code, Table[t[etc.]], which I can't do in
array into a table, although I have no experience with Mathematica. I
also assumed that the implied range for k in the summation is {k, 0,
floor((n-1)/2)}, since in the summation using Mathcad I have to have
(n-1)/2 a positive integer. Maybe someone could take a minute to give me
a detailed description of what that code actually does, since evidently
I have misunderstood it somehow.