Do you know where your variables are?  
PerlMonks 
Re: compute paths in Pascal's triangle (aka Tartaglia's one)by hdb (Monsignor) 
on Mar 22, 2018 at 13:58 UTC ( #1211524=note: print w/replies, xml )  Need Help?? 
The property you mention is simple to prove: "the number in a specific tile is also the number of different shortest path from the top tile". In any path to a tile nk, you have (nk) (n minus k) moves left, and k moves right. Only the order of these moves determine the specific path. The number of possible permutations of (nk) and k identical elements each is n! / k! / (nk)! which is the number in the tile.
In Section
Seekers of Perl Wisdom

