[seqfan] Re: Mathematica code for A050446.
Chris
cgribble263 at btinternet.com
Wed Dec 14 16:20:29 CET 2011
Hi Ed,
The code generates a list (triangle) of antidiagonals of the table read from
bottom left to top right and then flattens it to produce the sequence.
Best regards,
Chris Gribble
-----Original Message-----
From: seqfan-bounces at list.seqfan.eu [mailto:seqfan-bounces at list.seqfan.eu]
On Behalf Of Ed Jeffery
Sent: 14 December 2011 05:43
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
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
_______________________________________________
Seqfan Mailing list - http://list.seqfan.eu/
More information about the SeqFan
mailing list