Number of distinct terms in rows 0 through n of Pascal's triangle

Nick Hobson nickh at qbyte.org
Fri Dec 22 11:06:22 CET 2006


Hi Seqfans,

Is this an interesting sequence: 1, 1, 2, 3, 5, 7, 9, 12, 16, 20, 24, 29,  
35, 41, 48, 53, 60, 68, 77, 86, 95, 103, 114, 125, 137, 149, 162, 175,  
188, 202, 217, 232, 248, 264, 281, 297, 314, 332, 351, 370, 390, 410, 431,  
452, 474, 495, 518, 541, 565, 589, 614, 639, 665, 691, 718, 744, 770, 798,  
... ?

Example: There are 9 distinct terms in rows 0 through 6 of Pascal's  
triangle (1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 6, 4, 1, 1, 5, 10, 10, 5, 1,  
1, 6, 15, 20, 15, 6, 1); hence a(6)=9.

An easy upper bound is 1 + floor(n^2/4) = A033638(n).  The first  
differences, number of distinct new terms in row n of Pascal's triangle,  
may also be worth listing?

PARI script:
g(lim)={local(z,c,f); z=listcreate(1+lim^2\4); print1(1, ", "); for(n=1,  
lim, for(r=1, n\2, c=Str(binomial(n, r)); f=setsearch(z, c, 1); if(f,  
listinsert(z, c, f))); print1(1+#z, ", "))};
g(57)

Nick






More information about the SeqFan mailing list