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 A111987 #3 Mar 30 2012 17:22:41 %S A111987 1,2,5,6,0,10,13,14,17,19,25,22,0,26,29,31,0,34,37,38,41,43,128,46,0, %T A111987 0,53,78,0,58,61,62,135,67,0,71,73,74,0,79,0,82,0,86,89,384,0,94,97,0, %U A111987 101,103,125,106,109,121,113,0,0,118,0,122,205,127,0,131,0,134,137,139,0 %N A111987 Least number having n quadratic residues, or 0 if there is no number. %e A111987 a(4)=6 because, of the five numbers having 4 quadratic residues (6,7,9,12,16), the least is 6. %t A111987 t=Table[Length[Union[Mod[Range[0, n/2]^2, n]]], {n, 10000}]; Table[pos=Flatten[Position[t, n]]; If[Length[pos]==0, 0, First[pos]], {n, 100}] %Y A111987 Cf. A037046 (n such that a(n)=0), A111986 (number of numbers having n quadratic residues), A111988 (greatest number having n quadratic residues). %K A111987 nonn %O A111987 1,2 %A A111987 _T. D. Noe_, Aug 25 2005