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 A158464 #25 Nov 08 2017 22:30:34 %S A158464 1,1,1,1,2,1,1,1,1,3,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1, %T A158464 1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,2,3,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1, %U A158464 1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1 %N A158464 Number of distinct squares in row n of Pascal's triangle. %C A158464 It seems that some subset of terms in A055997 (A115599) gives the positions of 3's. E.g., we have a(9) = a(50) = a(289) = a(9801) = 3, but on the other hand, a(1682) = a(57122) = 2. - _Antti Karttunen_, Nov 03 2017 %H A158464 Antti Karttunen, <a href="/A158464/b158464.txt">Table of n, a(n) for n = 0..11111</a> %H A158464 <a href="/index/Pas#Pascal">Index entries for triangles and arrays related to Pascal's triangle</a> %F A158464 a(n) = Sum_{k=0..floor(n/2)} A010052(A007318(n,k)); %F A158464 a(A000290(n)) > 1 for n > 1. %e A158464 a(8) = #{1} = 1; %e A158464 a(9) = #{1,9,36} = 3. %p A158464 A158464 := proc(n) %p A158464 local sqset,k ; %p A158464 sqset := {} ; %p A158464 for k from 0 to n do %p A158464 P := binomial(n,k) ; %p A158464 if issqr(P) then %p A158464 sqset := sqset union {P} ; %p A158464 end if; %p A158464 end do: %p A158464 nops(sqset) ; %p A158464 end proc: %p A158464 seq(A158464(n),n=0..120) ; # _R. J. Mathar_, Jul 09 2016 %t A158464 CountDistinct /@ Table[Sqrt@ Binomial[n, k] /. k_ /; ! IntegerQ@ k -> Nothing, {n, 0, 104}, {k, 0, n}] (* _Michael De Vlieger_, Nov 03 2017 *) %o A158464 (PARI) A158464(n) = sum(k=0,n\2,issquare(binomial(n,k))); \\ _Antti Karttunen_, Nov 03 2017 %Y A158464 Cf. A000290, A055997 (A115599). %K A158464 nonn %O A158464 0,5 %A A158464 _Reinhard Zumkeller_, Mar 19 2009 %E A158464 More terms from _Antti Karttunen_, Nov 03 2017