[seqfan] funny recursion producing a known table

Wouter Meeussen wouter.meeussen at telenet.be
Fri Apr 26 23:52:24 CEST 2013


hi All,

try this one out:

Clear[T];
T[0, 0]:= 1;
T[n_, k_]:= 0 /; ( n<= 0|| OddQ[n +k] ); (* aerated triangular table *)
T[n_, k_]:=T[n, k]=  If[ k==0,   Sum[ T[ n/2, m],{m, 0, n}],  T[n -1, k -1]+ 
T[ n- 2*k ,k] ];

(* and then show it using *)  Table[T[n, k], {n, 0, 12}, {k, 0, n}]

The fun is in the surprising row sums and the familiar columns down to the 
diagonal :
why does such a silly  "T[n -1, k -1]+ T[ n- 2*k ,k] " produce this cute 
result (from Wolfdieter Lang)?

And what on earth does it have to do with its GF? (from Emeric Deutsch)
GF :  1/ Product[ (1-t*x^(2*j-1)) * (1-x^(2*j) )

hope the Mathematica code is readable to all,
enjoy,

Wouter. 



More information about the SeqFan mailing list