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 A159935 #2 Mar 30 2012 17:35:23 %S A159935 5,3,2,4,3,5,4,3,4,7,6,4,5,9,4,5,6,5,6,6,5,11,12,5,7,15,6,8,6,7,8,6,7, %T A159935 13,6,8,7,21,8,7,9,7,10,12,7,15,8,7,10,9,10,8,9,11,8,9,8,17,30,8,10,9, %U A159935 8,9,9,13,10,18,9,11,12,9,12,9,10,10,9,15,16,9,10,11,10,10,11,21,12,10,15 %N A159935 Least integer such that a(n)^2 - n is the sum of two nonzero squares. %o A159935 (PARI) issum2sq(n) = local(fm, hf); hf=0;fm=factor(n);for(i=1,matsize(fm)[1],if(fm[i,1]==2,if(fm[i,2]%2,hf=1),if(fm[i,1]%4==1,hf=1,if(fm[i, 2]%2,return(0)))));hf %o A159935 minsum2sq(n) = local(k); k=1;while(!issum2sq(k^2-n),k++);k %o A159935 /* Note: the issum2sq function depends on PARI returning -1 as a factor for negative n. */ %Y A159935 Cf. A008846, A050795. %K A159935 nonn %O A159935 0,1 %A A159935 _Franklin T. Adams-Watters_, Apr 26 2009