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 A127689 #6 Mar 01 2019 09:35:00 %S A127689 3,4,12,84,132,12324,15960,26280,27300,66660,115188,9777193284, %T A127689 23465263884,48701491080,40900397690640,680008604512020, %U A127689 127049882801497788,247290967245178188,335580091290976716,1045885075937364972,1607091702050097396,3419793695168900508,5138020847719969956,10059508412964112740 %N A127689 a(1)=3; for n>1, a(n) is least number such that a(n) > a(n-1) and a(1)^2+...+a(n)^2 is a square. %C A127689 Without the a(n) > a(n-1) constraint, the sequence would be A018930. %e A127689 a(2)=4 because 3^2+4^2=5^2, a(3)=12 because 3^2+4^2+12^2=13^2 etc. %t A127689 a = {3}; For[k = 1 + a[[Length[a]]], Length[a] < 11, While[ ! IntegerQ[Sqrt[(k)^2 + Sum[(a[[t]])^2, {t, 1, Length[a]}]]], k++ ]; AppendTo[a, k]]; a %o A127689 (PARI) q=3; s=9; for(n=1,30, b=0; fordiv(s,d, if(d*d>=s,break); t=(s\d-d)/2; if(t>q,b=t); ); q=b; print1(q,", "); s+=q^2); \\ _Max Alekseyev_, Nov 23 2012 %Y A127689 Cf. A018930, A127690, A127691. %K A127689 nonn %O A127689 1,1 %A A127689 _Artur Jasinski_, Jan 23 2007 %E A127689 More terms from _Max Alekseyev_, Nov 23 2012