This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A126256 #30 Feb 11 2024 17:33:28 %S A126256 1,1,2,3,5,7,9,12,16,20,24,29,35,41,48,53,60,68,77,86,95,103,114,125, %T A126256 137,149,162,175,188,202,217,232,248,264,281,297,314,332,351,370,390, %U A126256 410,431,452,474,495,518,541,565,589,614,639,665,691,718,744,770,798 %N A126256 Number of distinct terms in rows 0 through n of Pascal's triangle. %C A126256 An easy upper bound is 1 + floor(n^2/4) = A033638(n). %C A126256 First differences are in A126257. %H A126256 Nick Hobson, <a href="/A126256/b126256.txt">Table of n, a(n) for n = 0..1000</a> %H A126256 Nick Hobson, <a href="/A126256/a126256.py.txt">Python program for this sequence</a> %e A126256 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. %p A126256 seq(nops(`union`(seq({seq(binomial(n,k),k=0..n)},n=0..m))),m=0..57); # _Emeric Deutsch_, Aug 26 2007 %t A126256 Table[Length[Union[Flatten[Table[Binomial[n,k],{n,0,x},{k,0,n}]]]],{x,0,60}] (* _Harvey P. Dale_, Sep 10 2022 *) %o A126256 (PARI) lim=57; z=listcreate(1+lim^2\4); for(n = 0, lim, for(r=1, n\2, s=Str(binomial(n, r)); f=setsearch(z, s, 1); if(f, listinsert(z, s, f))); print1(1+#z, ", ")) %o A126256 (Haskell) %o A126256 -- import Data.List.Ordered (insertSet) %o A126256 a126256 n = a126256_list !! n %o A126256 a126256_list = f a007318_tabl [] where %o A126256 f (xs:xss) zs = g xs zs where %o A126256 g [] ys = length ys : f xss ys %o A126256 g (x:xs) ys = g xs (insertSet x ys) %o A126256 -- _Reinhard Zumkeller_, May 26 2015, Nov 09 2011 %o A126256 (Python) %o A126256 def A126256(n): %o A126256 s, c = (1,), {1} %o A126256 for i in range(n): %o A126256 s = (1,)+tuple(s[j]+s[j+1] for j in range(len(s)-1)) + (1,) %o A126256 c.update(set(s)) %o A126256 return len(c) # _Chai Wah Wu_, Oct 17 2023 %Y A126256 Cf. A007318, A027424, A061786, A126254, A126255, A126257. %Y A126256 Cf. A199425. %Y A126256 Cf. A258318. %K A126256 easy,nonn %O A126256 0,3 %A A126256 _Nick Hobson_, Dec 24 2006