[seqfan] Mathematica code for A050446.

Ed Jeffery ed.jeffery at yahoo.com
Wed Dec 14 06:42:55 CET 2011


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 Mathcad, just reads the array t[n,m] by anti-diagonals transforming the 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.


Thanks in advance,

Ed Jeffery



More information about the SeqFan mailing list